Linux

Where Is the cloudflared Config File?

cloudflared home directory with config.yml, origin cert and tunnel credentials on Linux.

Last updated

cloudflared reads tunnel ingress rules from config.yml in its home config directory, with per-tunnel credential JSONs beside it. The origin certificate from cloudflared tunnel login lands there too.

Credential files authenticate your tunnels, so they deserve backup plus restricted permissions. Copy the whole directory and tunnels move servers intact.

Where cloudflared stores this, by platform

Linux
~/.cloudflared/config.yml

Ingress rules live here, with <tunnel-id>.json credentials and cert.pem in the same ~/.cloudflared folder. The config file may not exist until you create it; flags alone can run a tunnel. Lock the directory to your user.

Frequently asked questions

How do I move a Cloudflare Tunnel to a new server?

Copy the full ~/.cloudflared directory including the tunnel JSON credentials, install cloudflared, and run the same tunnel name. Recreate rather than copy if credentials ever leak.

Where is the cloudflared origin certificate?

cert.pem inside ~/.cloudflared after login. It authorizes tunnel creation, so keep it private.

Notice an outdated path? Let us know.