Skip to content

Make named tunnels work like "legacy" tunnels

Notifications You must be signed in to change notification settings

firecow/cloudflared

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloudflared

build Renovate

Cloudflared "legacy" tunnels have been deprecated. A switch to named tunnels is needed.

This image mimics the "niceness" of legacy tunnels, but uses named tunnels internally.

All that is needed is a cert.pem, TUNNEL_HOSTNAME and TUNNEL_URL or TUNNEL_UNIX_SOCKET

services:
  cloudflared:
    image: firecow/cloudflared:${FCF_IMAGE_VERSION}
    environment:
      TUNNEL_HOSTNAME: https://somesub.example.com
      TUNNEL_URL: http://webserver:8080
    volumes:
      - ./example.com.cert.pem:/etc/cloudflared/cert.pem

These environment variables have other defaults than original.

TUNNEL_TRANSPORT_LOGLEVEL="error"
TUNNEL_METRICS="0.0.0.0:2000" # See Dockerfile healthcheck

Dockerfile CMD is set to firecow_cloudflared, overriding this in docker-compose.yml or docker run will bypass the DNS and named tunnel auto process.

TUNNEL_URL: http://webserver:8080 can be replaced with TUNNEL_UNIX_SOCKET: unix://var/run/origin.sock