Configure a remote tunnel
If you created a Cloudflare Tunnel from Zero Trust, the tunnel runs as a service on your OS. You can modify the Cloudflare Tunnel service with one or more configuration options.
Linux
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:
Open
cloudflared.service
.$ sudo systemctl edit --full cloudflared.serviceModify the
cloudflared tunnel run
command with the desired configuration flag. The following example changes the tunnelprotocol
to QUIC:[Unit]Description=Cloudflare TunnelAfter=network.target[Service]TimeoutStartSec=0Type=notifyExecStart=/usr/local/bin/cloudflared --protocol quic tunnel run --token <TOKEN VALUE>Restart=on-failureRestartSec=5s
macOS
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:
Stop the
cloudflared
service.$ sudo launchctl stop com.cloudflare.cloudflaredUnload the configuration file.
$ sudo launchctl unload /Library/LaunchDaemons/com.cloudflare.cloudflared.plistOpen
/Library/LaunchDaemons/com.cloudflare.cloudflared.plist
in a text editor.Modify the
ProgramArguments
key with the desired configuration flag. The following example changes the tunnelprotocol
to QUIC:<plist version="1.0"><dict><key>Label</key><string>com.cloudflare.cloudflared</string><key>ProgramArguments</key><array><string>/opt/homebrew/bin/cloudflared</string><string>--protocol</string><string>quic</string><string>tunnel</string><string>run</string><string>--token</string><string>TOKEN VALUE </string></array>Load the updated configuration file.
$ sudo launchctl load /Library/LaunchDaemons/com.cloudflare.cloudflared.plistStart the
cloudflared
service.$ sudo launchctl start com.cloudflare.cloudflared
Windows
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:
Open the Registry Editor.
Navigate to HKEY_LOCAL_MACHINE > SYSTEM > CurrentControlSet > Services > cloudflared.
Double-click ImagePath.
Modify Value data with the desired configuration flag. The following example changes the tunnel
protocol
to QUIC:C:\Program Files (x86)\cloudflared\.\cloudflared.exe --protocol quic tunnel run --token <TOKEN VALUE>