This guide will walk you through setting up Cloudflared on your system.
You need to have administrative (sudo) access to your system.
Here are the steps to install Cloudflared.
# Download the latest version of cloudflared
wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O /usr/bin/cloudflared
# Give executable permissions to the downloaded file
chmod +x /usr/bin/cloudflared
# Check the version of cloudflared to confirm the installation
cloudflared -v
After installing Cloudflared, you need to create a Cloudflare tunnel.
- Visit https://one.dash.cloudflare.com.
- Navigate to
Access -> Tunnels -> Create a tunnel
. - Fill in a name you like and save the tunnel.
- Find the code block below
If you already have cloudflared installed on your machine
.
To start the Cloudflared service on your machine, follow the steps below:
# Start the service
/etc/init.d/cloudflared start
# Remove the service from the default runlevel (just in case it was added earlier)
rc-update del cloudflared
# Add the service to the runlevel again (this ensures that the service starts automatically when the system boots)
rc-update add cloudflared
# Start the service immediately
rc-service cloudflared start
# Add the service to the default runlevel
rc-update add cloudflared default
That's it! You have successfully installed and set up Cloudflared on your system.
If you encounter any issues while following this guide, please check the official Cloudflared documentation for further help.