Skip to main content

CloudFlare Tunnels Docker-Compose

Here is a docker-compose to deploy CloudFlare tunnels:

version: "3.9"
services:
  tunnel:
    container_name: cloudflared-tunnel
    image: cloudflare/cloudflared
    restart: unless-stopped
    command: tunnel run
    environment:
      - TUNNEL_TOKEN=YOURTOKENHERE

Just replace the YOURTOKENHERE with the CloudFlare tunnel token shown when you create a new tunnel:

image.png

Thanks to user The Blue Portal for sharing this with the community.