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

Config file

You can run cloudflared with:

  • Arguments from the command line
  • a configuration file.

The configuration file format uses YAML syntax. Every command-line argument of cloudflared can be expressed in YAML.

For example, the --hostname [hostname] argument is written in the config file as:

hostname: [hostname]

Default behavior

You can specify a particular Tunnel in the config file by name or ID. When the following stanza is present in the file, the command cloudflaredtunnl run will be treated as if cloudflared tunnel run NAME-OR-ID was run.

tunnel: NAME-OR-ID

File location

You can use --config to point to a non-standard YAML file location:

$ cloudflared tunnel --config tunnels/config.yml

Without specifying --config, cloudflared will default to reading ~/.cloudflared/config.yml. An example config.yml for the above command could look like:

hostname: tunnel.yourdomain.comurl: http://localhost:8000logfile: /var/log/cloudflared.log

Flags that don't expect any value (such as --hello-world) should be specified as boolean true in the YAML:

hello-world: true

See the full set of command-line arguments.