Watch Unraid-Cloudflared-Tunnel video

Watch Unraid-Cloudflared-Tunnel video

Unraid-Cloudflared-Tunnel

Unraid-Cloudflared-Tunnel

Unraid-Cloudflared-Tunnel

Docker app from Figro's Repository

Overview

Simple cloudflared docker container for Unraid. Simply add your token from cloudflare dashboard as a variable and your done. There are advanced environement variables that can be set. The default values in these fields are what cloudflared will use by default if they are not set. There is more environement variables that can be added but will need a value entered or other configuration to use so I have removed them from the template. They can be seen on the github readme or the cloudflared docs. Cloudflared Docs: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/ https://hub.docker.com/r/cloudflare/cloudflared https://github.com/cloudflare/cloudflared Github: https://github.com/AriaGomes/Unraid-Cloudflared-Tunnel DockerHub: https://hub.docker.com/r/figro/Unraid-cloudflared-tunnel Discord: Figro#4064

Unraid Cloudflared Tunnel

A simple way to get a Cloudflared tunnel on Unraid.

Only supportting amd64. If you need other architechure start an issue or feel free to build from source :)

The container now downloads cloudflared only when the local binary is missing or older than the latest upstream release. If you want this optimization to survive container recreation, persist /usr/local/bin/cloudflared or the containing directory with a volume.

Video

Thanks to SpaceInvader One and the Unraid Team

Environment Variables

For more information on these variables visit the Cloudflared docs here

Required

TUNNEL_TOKEN or token - Your cloudflared 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. (TUNNEL_TOKEN should be used over token going forward)

Optional

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

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. More Info

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. More Info

TUNNEL_LOGFILE - Saves application log to this file. Mainly useful for reporting issues. For more details on what information you need when contacting Cloudflare support. (You will need to add a volume or use the console to access this logfile) More Info

TUNNEL_LOGLEVEL - Specifies the verbosity of logging. The default info level does not produce much output, but you may wish to use the warn level in production. Available values are: debug, info, warn, error, fatal. More Info

TUNNEL_METRICS - Exposes a Prometheus endpoint on the specified IP address/port, which you can then query for usage metrics. More Info

NO_AUTOUPDATE - Disables automatic cloudflared updates. More Info

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. More Info

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

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. More Info

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. More Info

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. More Info

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: . More Info

Install Unraid-Cloudflared-Tunnel on Unraid in a few clicks.

Find Unraid-Cloudflared-Tunnel in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.

Open the Apps tab on your Unraid server Search Community Apps for Unraid-Cloudflared-Tunnel Review the template variables and paths Click Install

Download Statistics

467,504
Total Downloads
23,752
This Month
24,988
Avg / Month

Total Downloads Over Time

Loading chart...

Related apps

Details

Repository
figro/unraid-cloudflared-tunnel
Last Updated2026-04-04
First Seen2022-10-20

Runtime arguments

Web UI
http://[IP]:[PORT:46495]
Network
bridge
Shell
sh
Privileged
false

Template configuration

TUNNEL_TOKENVariable

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.

NO_AUTOUPDATEVariable

Disables automatic cloudflared updates. Set to false or delete to autoupdate. Autoupdating can cause tunnel to go down.

Value
true
TUNNEL_RETRIESVariable

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.

Default
5
Value
5
TUNNEL_REGIONVariable

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.

TUNNEL_TRANSPORT_PROTOCOLVariable

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

Value
auto
TUNNEL_EDGE_BIND_ADDRESSVariable

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

TUNNEL_EDGE_IP_VERSIONVariable

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.

Value
auto
TUNNEL_GRACE_PERIODVariable

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.

Value
30s
TUNNEL_ORIGIN_CERTVariable

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.

TUNNEL_METRICSVariable

Exposes a Prometheus endpoint on the specified IP address/port, which you can then query for usage metrics. (You will need to add a port to the unraid template)

Value
0.0.0.0:46495
TUNNEL_LOGLEVELVariable

Specifies the verbosity of logging. The default info level does not produce much output, but you may wish to use the warn level in production. Available values are: debug, info, warn, error, fatal.

Value
info
Metrics PortPorttcp

Exposes prometheus metrics server (Can be removed if you don't care about metrics)

Target
46495
Default
46495
Value
46495
AppdataPathrw

Used in conjuction with log, pid, and cert env variables to get more info or use your own cert. If you don't need this you can delete or ignore this.

Target
/appdata
Default
/mnt/user/appdata/cloudflared
Value
/mnt/user/appdata/cloudflared