Skip to content
Argo Tunnel
Visit Argo Tunnel on GitHub
Set theme to dark (⇧+D)

Create and run a Tunnel

Before you start
1. Add a website to Cloudflare
2. Change your domain nameservers to Cloudflare
3. Enable Argo Smart Routing for your account
4. Install cloudflared and authenticate the software

Create a Tunnel

Run the following command to create a Tunnel.

cloudflared tunnel create <NAME>

Replace <NAME> with the name you want to give to the Tunnel. The name assigned can be any string and does not need to relate to the hostname where traffic will be served.

This command will create a Tunnel with the name provided and associate it with a UUID. The relationship between the UUID and the name is persistent. The command will not create a connection at this point.

Create a tunnel

Creating a Tunnel generates a credentials file for that specific Tunnel. This file is distinct from the cert.pem file. To run the Tunnel without managing DNS from cloudflared, you only need the credentials file.

Actioncert.pemCredentials file
Create a new TunnelRequired-
Delete a TunnelRequired-
Run a TunnelAvailableRequired
Create DNS records
from cloudflared
Required-
Connect to load balancer
pools from cloudflared
Required-
Route traffic to a running Tunnel
from the Cloudflare dashboard
AvailableAvailable

Run a Tunnel

Once created, you can use Argo Tunnel to proxy traffic from the Tunnel to a locally available URL in your environment. You can specify configuration details for your tunnel in a configuration file.

If you do not specify a configuration file location, cloudflared will attempt to read a configuration file in ~/.cloudflared/config.yml.

To begin, run the Tunnel with the following command.

cloudflared tunnel --config path/config.yaml run <NAME>

If you have deleted the cert.pem file, you must specify the UUID instead of the name.

cloudflared tunnel --config path/config.yaml run <UUID>

You can also specify the Tunnel name or UUID inside of the configuration file, in which case the command below will invoke the run command for that Tunnel.

cloudflared tunnel --config path/config.yaml

You can also run the Tunnel without a configuration file by appending the flags after the run command and before the name or UUID.

cloudflared tunnel run --url localhost:3000 <NAME or UUID>

Run tunnels

Once run, this command will establish an outbound-only connection to Cloudflare’s edge. That connection will not yet serve traffic. Any requests made to the Tunnel directly will fail. To route traffic from a hostname or load balancer pool, follow the routing instructions.

You can also:

List available Tunnels

cloudflared can list all created Tunnels in your account, as well as those actively connected to Cloudflare, by running the following command:

cloudflared tunnel list

Note: the command requires the cert.pem file.

List tunnels