Portainer Templates logo

Portainer Templates

Cloudflared-web Cloudflared-web

NetworkingTools

A docker image that packages both cloudflared cli and a simple Web UI to easily start or stop remotely-managed Cloudflare tunnel.

Image details

Pulls: 1.9M
Architectures: amd64, arm64, arm/v7, arm64/v8
Image size: 224 MB
Latest: 2026.7.2
User: wisdomsky
Created: Aug 16, 2023
Updated: 4 days ago
Status: active

Source details

Stars: 431
Forks: 44
Language: Vue
License: GPL-2.0
Updated: 4 days ago

Configuration

Type
Container
Platform
linux
Image
wisdomsky/cloudflared-web:latest
Volumes
/config
Env vars
WEBUI_PORT=14333
Restart
unless-stopped

Installation

  1. Ensure both Docker and Portainer are installed, and up-to-date
  2. Log into your Portainer web UI
  3. Under Settings → App Templates, paste the below URL
  4. Head to Home → App Templates, and the list of apps will show up
  5. Select the app you wish to deploy, fill in any config options, and hit Deploy

Template Import URL

https://raw.githubusercontent.com/Lissy93/portainer-templates/main/templates.json
Show Me demo

docker run -d --name cloudflared-web \
  --network host \
  -e 'WEBUI_PORT=14333' \
  -v /config \
  --restart=unless-stopped \
  wisdomsky/cloudflared-web:latest

Save this file as compose.yaml and run docker compose up -d
Use this only as a guide.

services:
  cloudflared-web:
    image: wisdomsky/cloudflared-web:latest
    volumes:
      - /config
    environment:
      WEBUI_PORT: '14333'
    network_mode: host
    restart: unless-stopped

Save each file below into a folder, then run kubectl apply -f .
Written for k3s, but works on any cluster: bind mounts use hostPath, named volumes get a persistent volume claim, and ports are exposed via a LoadBalancer service.

cloudflared-web-data-0.yaml

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: cloudflared-web-data-0
spec:
  accessModes:
    - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi

cloudflared-web-deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: cloudflared-web
  labels:
    app: cloudflared-web
spec:
  replicas: 1
  selector:
    matchLabels:
      app: cloudflared-web
  template:
    metadata:
      labels:
        app: cloudflared-web
    spec:
      hostNetwork: true
      containers:
        - name: cloudflared-web
          image: wisdomsky/cloudflared-web:latest
          env:
            - name: WEBUI_PORT
              value: '14333'
          volumeMounts:
            - name: cloudflared-web-data-0
              mountPath: /config
      volumes:
        - name: cloudflared-web-data-0
          persistentVolumeClaim:
            claimName: cloudflared-web-data-0

Save this file as ~/.config/containers/systemd/cloudflared-web.container

[Unit]
Description=Cloudflared-web

[Container]
Image=wisdomsky/cloudflared-web:latest
ContainerName=cloudflared-web
Environment=WEBUI_PORT=14333
Volume=/config
Network=host

[Service]
Restart=always

[Install]
WantedBy=default.target

Then reload systemd and start the service:

systemctl --user daemon-reload
systemctl --user start cloudflared-web

For a system-wide service, use /etc/containers/systemd/ and drop --user.

For more installation options, see the Documentation in our GitHub repo

For app-specific guidance, check Cloudflared-web's own repo at wisdomsky/cloudflared-web

Cloudflared-web

Cloudflared-web is a docker image that packages both cloudflared cli and a simple Web UI to easily start or stop remotely-managed Cloudflare tunnel.
Repository: https://github.com/WisdomSky/Cloudflared-web
build latest pulls stars
✅ Easy run-and-forget setup.
✅ Manage cloudflared token from a simple and user-friendly Web UI.
✅ Start and stop cloudflare tunnel anytime with a single click.
---

Application Setup

When manually setting up this image, it is crucial to always set the networking mode into host as without it, the cloudflared service won't be able to access the services running on the host:
docker run --network host wisdomsky/cloudflared-web:latest
or if using docker-compose.yml:
services:
  cloudflared:
    image: wisdomsky/cloudflared-web:latest
    restart: unless-stopped
    network_mode: host

The Web UI where you can setup the Cloudflared token can be accessed from port 14333:
http://localhost:14333

Github Containers

If for some reason you are unable to pull images from Docker's Official Image Registry (docker.io), Cloudflared-web is also synced to Github Container Registry (ghcr.io).
Just prefix the image with ghcr.io/ in order to use the mirrored image in Github.
services:
  cloudflared:
    image: ghcr.io/wisdomsky/cloudflared-web:latest
    restart: unless-stopped
    network_mode: host

Additional Parameters

Environment

| Variable Name | Default value | Required or Optional | Description | |-------------------|---------------|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | WEBUIHOST | 0.0.0.0 | Optional | This will work if you want the WebUI to listen on a different host address | | WEBUIPORT | 14333 | Optional | The port on the host where the WebUI will be running. Useful when an existing process is running on port 14333 and want to assign cloudflared-web into a different available port. | | BASICAUTHPASS | | Optional | Enable Basic Auth by specifying a password. If BASIC_AUTH_USER is not specified, the default value for username admin will be used. | | BASICAUTHUSER | admin | Optional | Specify the username for the Basic Auth. | | EDGEBINDADDRESS | | Optional | Specifies the outgoing IP address used to establish a connection between cloudflared and the Cloudflare global network.

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. | | EDGEIPVERSION | auto | Optional | 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. | | PROTOCOL | auto | Optional | Specifies the protocol used to establish a connection between cloudflared and the Cloudflare global network. Available values are auto, http2, and quic. | | GRACEPERIOD | 30s | Optional | 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. | | REGION | | Optional | 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. | | RETRIES | 5 | Optional | 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. | | METRICSENABLE | false | Optional | Enable tunnel metrics server. | | METRICSPORT | 60123 | Optional | Specify port to run tunnel metrics on. METRICS_ENABLE must be set to true. |
Based on Cloudflare tunel run parameters
documentation.
example docker-compose.yaml:
services:
  cloudflared:
    image: wisdomsky/cloudflared-web:latest
    restart: unless-stopped
    network_mode: host
    environment:
      WEBUI_PORT: 1111
      PROTOCOL: http2

Volume

| Container Path | Required or Optional | Description | |---|---|---| | /config | Optional | The path to the directory where the config.json file containing the Cloudflare token and start status will be saved. |
example docker-compose.yaml:
services:
  cloudflared:
    image: wisdomsky/cloudflared-web:latest
    restart: unless-stopped
    network_mode: host
    volumes:
      - /mnt/storage/cloudflared/config:/config

Using Networks

You can use docker networks for a more fine-grained control of which containers/services your cloudflared-web container has access to.
services:
  cloudflared:
    image: wisdomsky/cloudflared-web:latest
    restart: unless-stopped
    networks:
      - mynetwork
    environment:
      WEBUI_PORT: 1111

Screenshots

Screenshot 1
Screenshot 2

Issues

For any problems experienced while using the docker image, please create a new issue.
---

Contribute

Adding A Language Translation

See Localization.

Check the logs first

Nine times out of ten the logs tell you exactly what went wrong.

  • In Portainer, go to Containers, click the container, then Logs. Or run docker logs cloudflared-web
  • Exit codes help too: 137 means killed, usually out of memory. 126 or 127 means the command inside the image is broken.

Runs on the host network

This container shares your server's network directly, so port mappings are ignored and every port the app opens binds straight to the host.

  • If a port won't bind, find the clash with sudo ss -tlnp and stop the other service, or change the port in cloudflared-web's own settings.

Image won't pull

Test the pull directly on the host: docker pull wisdomsky/cloudflared-web:latest

  • "manifest unknown" means the tag no longer exists. This template uses latest, so try pinning a specific version instead.
  • "toomanyrequests" is the Docker Hub rate limit. Log in with docker login to raise it.
  • "no space left on device" means a full disk. Reclaim space with docker system prune

"exec format error"

This means the image was built for a different CPU architecture than your server.

  • This image supports: amd64, arm64, arm/v7, arm64/v8
  • Check yours with uname -m: x86_64 is amd64, aarch64 is arm64. Raspberry Pi and other ARM boards are the usual culprits.

Container keeps restarting

The unless-stopped restart policy relaunches the app after every crash, so the real error can scroll past.

  • Check the logs right after a restart, the last few lines before it died are the useful ones.
  • Get the exit code with docker inspect cloudflared-web --format '{{.State.ExitCode}}'
  • Still stuck? Redeploy once with the restart policy set to no so the failure stays visible.

Raise an issue

Found something which isn't working as it should? Here's how to report it.

Similar apps