Creating a Cloudflare Tunnel
Now that you have a Cloudflare account and your own domain, you can create your first Cloudflare Tunnel. The official docs1 are great, so you can just follow along. But if you’d like to stay on this page, just follow these steps:
-
In the Cloudflare Dashboard, open the side panel and click Zero Trust to go to the Zero Trust Dashboard.
-
In the Zero Trust Dashboard, expand the Networks section in the side panel and click Tunnels.
-
Click Create a tunnel.
-
Select Cloudflared as the tunnel type.
-
Give your tunnel a clear, descriptive name, something memorable, since you can create multiple tunnels later.
-
After naming and creating the tunnel, you’ll see these buttons for displaying the setup instructions for different operating systems. If you’re on Ubuntu, you can safely follow the Debian steps (Ubuntu is based on Debian). Similarly, if you’re on Fedora or another RHEL-based distro, use the Red Hat instructions.

-
Copy the provided configuration commands and paste them into your terminal. This will set up
cloudflared. -
Once the
cloudflaredservice is running, you should see your tunnel marked as Connected in the Cloudflare Dashboard.

- The next step is to add hostnames that route through your tunnel. For now, let’s add a simple public hostname that we will use in the next chapter:
- Subdomain: tunnel
- Domain: select the domain you registered with Cloudflare
- Path: leave blank
- Service: choose HTTP, and set the URL to
localhost:80, or even justlocalhost

- Click Complete Setup, and you’re done!