Cloudflare Tunnel Configuration

Expose your Synora server over HTTPS without opening inbound firewall ports or configuring TLS certificates manually.

Overview

Both deployment/lite/docker-compose.yml and deployment/standard/docker-compose.yml run cloudflare/cloudflared:latest inside the private Docker bridge network, forwarding HTTPS and WebSocket traffic directly to http://api:3000.

Option 1: Cloudflare Quick Tunnel (COMPOSE_PROFILES=quick)

Quick Tunnel is the default option in installer/install.sh. It requires no Cloudflare account, no domain name, and no open ports on your VPS firewall.

cloudflared tunnel --no-autoupdate --url http://api:3000

On startup, installer/install.sh waits up to 60 seconds and reads the generated https://<random>.trycloudflare.com URL from the container logs.

Ephemeral URL Notice Quick Tunnel URLs change whenever the cloudflared-quick container is recreated or restarted after a container rebuild. If that happens, check the new URL with docker compose logs cloudflared-quick and update Server URL in your devices, or switch to a Permanent Cloudflare Tunnel for production use.

Option 2: Permanent Cloudflare Tunnel (COMPOSE_PROFILES=named)

For a stable hostname (for example https://sync.example.com) backed by your own domain in Cloudflare:

  1. In the Cloudflare Zero Trust dashboard, go to Networks → Tunnels and create a new Cloudflared tunnel.
  2. Copy the Tunnel Token (kept secret; never commit it to Git).
  3. Add a Published application route in the tunnel configuration:
    • Subdomain / Domain: e.g. sync.example.com
    • Service Type: HTTP
    • URL: api:3000 (Docker service name inside the Synora compose network)
  4. During installer/install.sh, choose [2] Permanent Cloudflare Tunnel and enter your hostname and token.

Docker Compose runs:

cloudflared tunnel --no-autoupdate run --token "${CLOUDFLARE_TUNNEL_TOKEN}"

Switching From Quick Tunnel to Named Tunnel Later

Re-run sudo bash /opt/synora/installer/install.sh, choose Reuse existing credentials and update tunnel/domain settings only? [Y/n]: Y, and select option 2. Your vaults, devices, and SYNORA_API_KEY stay intact.