2025-03-14 21:59:59 -06:00
|
|
|
# cloudflared
|
|
|
|
|
|
|
|
|
|
> Create a persistent connection to the Cloudflare network.
|
2026-02-18 06:55:01 -07:00
|
|
|
> More information: <https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Authenticate and associate the connection to a domain in the Cloudflare account:
|
|
|
|
|
|
|
|
|
|
`cloudflared tunnel login`
|
|
|
|
|
|
|
|
|
|
- Create a tunnel with a specific name:
|
|
|
|
|
|
|
|
|
|
`cloudflared tunnel create {{name}}`
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- List all tunnels in the account:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`cloudflared tunnel list`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
- Create a DNS CNAME record pointing to a tunnel:
|
2025-03-14 21:59:59 -06:00
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`cloudflared tunnel route dns {{name|uuid}} {{hostname}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Save logs to a file:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`cloudflared tunnel --loglevel {{panic|fatal|error|warn|info|debug}} --logfile {{path/to/file}} run {{name}}`
|
|
|
|
|
|
|
|
|
|
- Run a named tunnel (reads configuration from `config.yml`):
|
|
|
|
|
|
|
|
|
|
`cloudflared tunnel run {{name}}`
|
|
|
|
|
|
|
|
|
|
- Start a temporary tunnel to expose a local service (no account required):
|
|
|
|
|
|
|
|
|
|
`cloudflared tunnel --url http://localhost:{{port}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Install cloudflared as a system service:
|
|
|
|
|
|
|
|
|
|
`cloudflared service install`
|