Run parameters·续

loglevel

Syntax Default Environment Variable
cloudflared tunnel --loglevel <VALUE> run <UUID or NAME> info TUNNEL_LOGLEVEL

Specifies the verbosity of logging for the local cloudflared instance. Available values are debug, info (default), warn, error, and fatal. At the debug level, cloudflared will log and display the request URL, method, protocol, content length, as well as all request and response headers. However, note that this can expose sensitive information in your logs.

metrics

Syntax Default Environment Variable
cloudflared tunnel --metrics <IP:PORT> run <UUID or NAME> Refer to Tunnel metrics TUNNEL_METRICS

Exposes a Prometheus endpoint on the specified IP address and port, which you can then query for usage metrics.

no-autoupdate

Note

This parameter does not apply when cloudflared runs on Windows, was installed by a package manager, or runs interactively in a terminal. Automatic updates are not available in these environments.

You can check if cloudflared was installed by a package manager by running ls -la /usr/local/etc/cloudflared/ and looking for .installedFromPackageManager in the output.

Syntax Environment Variable
cloudflared tunnel --no-autoupdate run <UUID or NAME> NO_AUTOUPDATE

Disables automatic cloudflared updates. To change the automatic update interval instead, refer to autoupdate-freq. For manual update methods and options to minimize downtime, refer to Update cloudflared.

output

Note

Requires cloudflared version 2025.6.1 or later.

Syntax Default Environment variables
cloudflared tunnel --output <FORMAT> run <UUID or NAME> default TUNNEL_LOG_OUTPUT<br>TUNNEL_MANAGEMENT_OUTPUT

Specifies the console log format. Available values are default and json.

The json value formats each log line as a JSON object. This format is useful for Kubernetes deployments and log collection systems that consume JSON.

origincert

Note

For locally-managed tunnels only.

Syntax Default Environment Variable
cloudflared tunnel --origincert <PATH> run <UUID or NAME> ~/.cloudflared/cert.pem TUNNEL_ORIGIN_CERT

Specifies the account certificate for one of your zones, authorizing the client to serve as an origin for that zone. You can obtain a certificate by using the cloudflared tunnel login command or by visiting https://dash.cloudflare.com/argotunnel.

pidfile

Syntax Environment Variable
cloudflared tunnel --pidfile <PATH> run <UUID or NAME> TUNNEL_PIDFILE

Writes the application's process identifier (PID) to this file after the first successful connection. Mainly useful for scripting and service integration.

post-quantum

Syntax Environment Variable
cloudflared tunnel run --post-quantum <UUID or NAME> TUNNEL_POST_QUANTUM

By default, Cloudflare Tunnel connections over quic are encrypted using post-quantum cryptography (PQC) but will fall back to non-PQ if there are issues connecting. If the --post-quantum flag is provided, quic connections are only allowed to use PQ key agreements, with no fallback to non-PQ.

Post-quantum key agreements are not supported when using http2 protocol.

protocol

Syntax Default Environment Variable
cloudflared tunnel --protocol <VALUE> run <UUID or NAME> auto TUNNEL_TRANSPORT_PROTOCOL

Specifies the protocol used to establish a connection between cloudflared and the Cloudflare global network. Available values are auto, http2, and quic.

The auto value will automatically configure the quic protocol. If cloudflared is unable to establish UDP connections, it will fallback to using the http2 protocol.

region

Syntax Environment Variable
cloudflared tunnel --region <VALUE> run <UUID or NAME> TUNNEL_REGION

Allows you to choose the regions to which connections are established. Currently the only available value is us, which routes all connections through data centers in the United States. Omit or leave empty to connect to the global region.

When the region is set to us, cloudflared uses different US-specific hostnames and IPs. Refer to Tunnel with firewall for details.

Note

For FedRAMP High ↗︎ environments, the tunnel token determines routing to FedRAMP data centers automatically — no --region flag is required. Refer to Tunnel with firewall for the FedRAMP-specific endpoints your firewall must allow.

retries

Syntax Default Environment Variable
cloudflared tunnel --retries <VALUE> run <UUID or NAME> 5 TUNNEL_RETRIES

Specifies the maximum number of retries for connection/protocol errors. Retries use exponential backoff (retrying at 1, 2, 4, 8, 16 seconds by default), so it is not recommended that you increase this value significantly.

tag

Syntax Environment Variable
cloudflared tunnel --tag <KEY=VAL> run <UUID or NAME> TUNNEL_TAG

Specifies custom tags used to identify this tunnel. Multiple tags may be specified by adding additional --tag <KEY=VAL> flags to the command. If entering multiple tags into a configuration file, delimit with commas: tag: {KEY1=VALUE1, KEY2=VALUE2}.

token

Note

For remotely-managed tunnels only.

Syntax Environment Variable
cloudflared tunnel run --token <TUNNEL_TOKEN> TUNNEL_TOKEN

Associates the cloudflared instance with a specific tunnel. The tunnel's token is shown in the dashboard when you first create the tunnel. You can also retrieve the token using the API.

token-file

Note

For remotely-managed tunnels only. Requires 2025.4.0 or later.

Syntax Environment Variable
cloudflared tunnel run --token-file <PATH> TUNNEL_TOKEN_FILE

Associates the cloudflared instance with a specific tunnel using a file which contains the token.

Was this helpful?

YesNo

On this page

Run parameters·续 - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/tunnel/reference/run-parameters/#page","headline":"Run parameters","description":"Command-line flags for running cloudflared tunnel.","url":"https://developers.cloudflare.com/tunnel/reference/run-parameters/","inLanguage":"en","image":"https://developers.cloudflare.com/tunnel/reference/run-parameters/og.png?v=175d7c16333ef35e","dateModified":"2026-09-11","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"},"keywords":["CLI"]}


description: Manage tunnel authentication tokens for remote and local tunnels. title: Tunnel tokens image: https://developers.cloudflare.com/tunnel/reference/tunnel-tokens/og.png?v=59eed121404bf998


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/tunnel/llms.txt
Use this file to discover all available pages before exploring further.