Run parameters

Last updated Sep 11, 2026 This page lists the configuration flags for the cloudflared tunnel run command. For a remotely-managed tunnel, add these flags to the tunnel service. If you are using a locally-managed tunnel, add these flags to your configuration file as key/value pairs.

Add run parameters to tunnel service

Remotely-managed tunnels run as a service on your OS. To add run parameters to the tunnel service file:

On Linux, Cloudflare Tunnel installs itself as a system service using systemctl. By default, the service will be named cloudflared.service. To configure your tunnel on Linux:

  1. Open cloudflared.service.
   sudo systemctl edit --full cloudflared.service
   ```

2. Modify the `cloudflared tunnel run` command with the desired configuration flag. For example,

```txt
   [Unit]
   Description=Cloudflare Tunnel
   After=network.target

[Service]
   TimeoutStartSec=0
   Type=notify
   ExecStart=/usr/local/bin/cloudflared tunnel --loglevel info --logfile /var/log/cloudflared/cloudflared.log run --token <TOKEN VALUE>
   Restart=on-failure
   RestartSec=5s

[Install]
   WantedBy=multi-user.target
   ```

3. Restart `cloudflared.service`:

```sh
   sudo systemctl restart cloudflared
   ```

4. To verify the new configuration, check the service status:

```sh
   sudo systemctl status cloudflared
   ```

```sh
   ● cloudflared.service - cloudflared
     Loaded: loaded (/etc/systemd/system/cloudflared.service; enabled; preset: enabled)
     Active: active (running) since Wed 2024-10-09 20:02:59 UTC; 2s ago
   Main PID: 2157 (cloudflared)
      Tasks: 8 (limit: 1136)
     Memory: 16.3M
        CPU: 136ms
     CGroup: /system.slice/cloudflared.service
             └─2157 /usr/bin/cloudflared tunnel --loglevel info --logfile /var/log/cloudflared/cloudflared.log run --token eyJhIjoi...
   ```

On macOS, Cloudflare Tunnel installs itself as a launch agent using `launchctl`. By default, the agent will be called `com.cloudflare.cloudflared`. To configure your tunnel on macOS:

1. Stop the `cloudflared` service.

```sh
   sudo launchctl stop com.cloudflare.cloudflared
   ```

2. Unload the configuration file.

```sh
   sudo launchctl unload /Library/LaunchDaemons/com.cloudflare.cloudflared.plist
   ```

3. Open `/Library/LaunchDaemons/com.cloudflare.cloudflared.plist` in a text editor.
4. Modify the `ProgramArguments` key with the desired configuration flag. For example,

```txt
   <plist version="1.0">
       <dict>
           <key>Label</key>
           <string>com.cloudflare.cloudflared</string>
           <key>ProgramArguments</key>
           <array>
               <string>/opt/homebrew/bin/cloudflared</string>
               <string>tunnel</string>
               <string>--logfile</string>
               <string><PATH></string>
               <string>--loglevel</string>
               <string>debug</string>
               <string>run</string>
               <string>--token</string>
               <string><TOKEN VALUE> </string>
           </array>
   ```

5. Load the updated configuration file.

```sh
   sudo launchctl load /Library/LaunchDaemons/com.cloudflare.cloudflared.plist
   ```

6. Start the `cloudflared` service.

```sh
   sudo launchctl start com.cloudflare.cloudflared
   ```

On Windows, Cloudflare Tunnel installs itself as a system service using the Registry Editor. By default, the service will be named `cloudflared`. To configure your tunnel on Windows:

1. Open the Registry Editor.
2. Go to **HKEY\_LOCAL\_MACHINE** > **SYSTEM** > **CurrentControlSet** > **Services** > **cloudflared**.
3. Double-click **ImagePath**.
4. Modify **Value data** with the desired configuration flag. For example,

```txt
   C:\Program Files (x86)\cloudflared\.\cloudflared.exe tunnel --loglevel info --logfile <PATH> run --token <TOKEN VALUE>
   ```

![Modify cloudflared service in the Registry Editor](/uploads/projects/cf-dev-v3/202611/18e71f5eb2650362.png)

## Parameters

### `autoupdate-freq`

| Syntax | Default |
| --- | --- |
| `cloudflared tunnel --autoupdate-freq <FREQ> run <UUID or NAME>` | `24h` |

Configures the frequency of `cloudflared` updates.

Built-in automatic updates are enabled when `cloudflared` is installed as a standalone binary and runs as a service. They are not available on Windows, for package-manager installations, or when `cloudflared` runs interactively in a terminal. When an update is available, `cloudflared` restarts to use the new version. The updater does not wait for the replacement process to connect to Cloudflare before shutting down the old process. Active connections may be interrupted. To control when updates occur, use [`no-autoupdate`](#no-autoupdate).

### `config`

Note

For locally-managed tunnels only.

| Syntax | Default |
| --- | --- |
| `cloudflared tunnel --config <PATH> run <UUID or NAME>` | `~/.cloudflared/config.yml` |

Specifies the path to a [configuration file](https://developers.cloudflare.com/tunnel/features/locally-managed-tunnels/configuration-file/) in YAML format.

### `disable-path-normalization`

Note

Requires `cloudflared` version `2026.10.0` or later.

| Syntax | Default | Environment Variable |
| --- | --- | --- |
| `cloudflared tunnel --disable-path-normalization=<BOOLEAN> run <UUID or NAME>` | `true` | `TUNNEL_DISABLE_PATH_NORMALIZATION` |

When `false`, normalizes URLs before matching ingress rules for tunnels requiring [Cloudflare Access](https://developers.cloudflare.com/cloudflare-one/access-controls/) validation. The URL path sent to your origin stays the same. Set `--disable-path-normalization=false` to turn on normalization.

The default is `true` in version `2026.10.0`. For the planned default change, refer to the [URL normalization changelog](https://developers.cloudflare.com/changelog/post/2026-10-22-cloudflared-path-normalization/).

### `dns-resolver-addrs`

Note

Requires `cloudflared` version 2025.7.0 or later.

| Syntax | Environment Variable |
| --- | --- |
| `cloudflared tunnel run --dns-resolver-addrs <IP:PORT> <UUID or NAME>` | `TUNNEL_DNS_RESOLVER_ADDRS` |

Specifies custom DNS resolver addresses for `cloudflared` to use instead of the host machine's default resolvers. Each address must be in `ip:port` format — providing an IP address without a port will cause `cloudflared` to fail to start. You can specify multiple resolvers by repeating the flag. For example,

```sh
cloudflared tunnel run --dns-resolver-addrs 1.1.1.1:53 --dns-resolver-addrs 1.0.0.1:53 <UUID or NAME>

When multiple resolvers are specified, cloudflared randomly selects one for each DNS request. A maximum of 10 resolver addresses are allowed.

edge-bind-address

Syntax Environment Variable
cloudflared tunnel --edge-bind-address <IP> run <UUID or NAME> TUNNEL_EDGE_BIND_ADDRESS

Specifies the outgoing IP address used to establish a connection between cloudflared and the Cloudflare global network.

By default, cloudflared lets the operating system decide which IP address to use. This option is useful if you have multiple network interfaces available and want to prefer a specific interface.

The IP version of edge-bind-address will override edge-ip-version (if provided). For example, if you enter an IPv6 source address, cloudflared will always connect to an IPv6 destination.

edge-ip-version

Syntax Default Environment Variable
cloudflared tunnel --edge-ip-version <VERSION> run <UUID or NAME> 4 TUNNEL_EDGE_IP_VERSION

Specifies the IP address version (IPv4 or IPv6) used to establish a connection between cloudflared and the Cloudflare global network. Available values are auto, 4, and 6.

The value auto relies on the host operating system to determine which IP version to select. The first IP version returned from the DNS resolution of the region lookup will be used as the primary set. In dual IPv6 and IPv4 network setups, cloudflared will separate the IP versions into two address sets that will be used to fallback in connectivity failure scenarios.

grace-period

Syntax Default Environment Variable
cloudflared tunnel --grace-period <PERIOD> run <UUID or NAME> 30s TUNNEL_GRACE_PERIOD

When cloudflared receives SIGINT/SIGTERM it will stop accepting new requests, wait for in-progress requests to terminate, then shut down. Waiting for in-progress requests will timeout after this grace period, or when a second SIGTERM/SIGINT is received.

log-directory

Syntax Environment Variable
cloudflared tunnel --log-directory <PATH> run <UUID or NAME> TUNNEL_LOGDIRECTORY

Writes logs to a file named cloudflared.log in the specified directory. When the file reaches 1 MB, cloudflared rotates it and keeps up to five backup files. Rotation is based on file size; there is no age-based retention.

Use log-directory for routine persistent logging. If you also specify logfile, logfile takes precedence.

logfile

Syntax Environment Variable
cloudflared tunnel --logfile <PATH> run <UUID or NAME> TUNNEL_LOGFILE

Saves the application log to this file. cloudflared does not rotate this file. Use logfile for short troubleshooting sessions or when another tool manages log rotation. If you also specify log-directory, logfile takes precedence. For more details on what information you need when contacting Cloudflare support, refer to this guide.