Create and run a Tunnel
|Before you start|
Create a Tunnel
Run the following command to create a Tunnel.
cloudflared tunnel create <NAME>
<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.
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.
|Create a new Tunnel||Required||-|
|Delete a Tunnel||Required||-|
|Run a Tunnel||Available||Required|
|Create DNS records|
|Connect to load balancer|
|Route traffic to a running Tunnel|
from the Cloudflare dashboard
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
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>
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