RUGENDOCS
Hosting rugen-server

Cloudflare Tunnel

The optional add-on that puts rugen-server behind a Cloudflare Tunnel, as a second, separate compose app.

A Cloudflare Tunnel gives your server HTTPS and a public name without opening port 8080. It is an optional add-on in deploy/cloudflared/, deployed as a second, separate compose app next to the main stack.

Setup

  1. Cloudflare dashboard → Zero Trust → Networks → Tunnels → Create a tunnel → Cloudflared. Copy the token after --token (eyJ...).
  2. Public hostname: rugen.example.com → service HTTP, URL rugen-server:8080.
  3. Deploy the server first (see Docker Compose & Dokploy). In Dokploy create a second Compose service with compose path deploy/cloudflared/docker-compose.yml, set CF_TUNNEL_TOKEN in its Environment tab and deploy it. It joins the server’s rugen network; no ports needed.
  4. For the UDP fast path add a DNS-only (grey cloud) record such as udp.example.com → the server’s public IP, and set RUGEN_UDP_PUBLIC=udp.example.com:7001 on the server. A proxied name cannot carry UDP.
  5. With the tunnel in place you may drop the 8080 port mapping from the server compose.

On plain Docker:

cd rugen-server/deploy/cloudflared
CF_TUNNEL_TOKEN=eyJ... docker compose up -d

The add-on compose file

name: rugen-tunnel

services:
  cloudflared:
    image: cloudflare/cloudflared:2026.10.0
    command: tunnel --no-autoupdate run --token ${CF_TUNNEL_TOKEN:?set CF_TUNNEL_TOKEN}
    restart: unless-stopped
    networks:
      - rugen

networks:
  rugen:
    name: rugen
    external: true

The rugen network is created by the main stack with a fixed name, which is why the server has to be deployed first.

Something wrong on this page? Edit it on GitHub.

SEARCH !!

    ↑↓ to move, Enter to open