Self-hosted Gateway links local Docker Compose apps to the public internet through WireGuard, Caddy, and nginx on a VPS you control.
Overview
Self-hosted Gateway automates reverse-proxy-over-VPN tunnels so locally hosted Docker Compose services can be reached from the internet without opening home-router ports. A gateway container runs on a publicly reachable Linux host while a link service joins your compose project on the client side.
Each link creates a dedicated WireGuard tunnel between the client container and the gateway, with traffic routed through nginx on the gateway and Caddy on the client. Caddy provisions HTTPS certificates automatically via Let's Encrypt or ZeroSSL, and remote client IPs can be passed to backends using proxy protocol.
Setup expects DNS A records pointing at the VPS, open HTTP and HTTPS ports, Docker on both ends, and a UDP local port range exposed for WireGuard. Generating a link produces a compose snippet and environment file to merge into an existing stack; multiple services can share one gateway.
Optional modes support forward-only TLS passthrough to an existing reverse proxy, TLS to backends, mutual TLS client authentication, basic auth via environment credentials, and generic TCP or UDP forwarding with socat.
Key features
- Docker Compose link snippets
- WireGuard RPoVPN tunnels
- Automatic HTTPS via Caddy
- nginx gateway reverse proxy
- Proxy protocol client IPs
- Optional basic authentication
- TCP and UDP socat forwarding
- Split DNS forward-only mode
Use cases
- Exposing homelab apps behind CGNAT
- Publishing compose stacks without portforward
- Isolating exposed containers per link
- Remote access without static home IP
Open-source alternative to
Cloudflare Tunnel“Docker native self-hosted alternative to Cloudflare Tunnels, Tailscale Funnel, ngrok and others.” source
TTailscale Funnel“Docker native self-hosted alternative to Cloudflare Tunnels, Tailscale Funnel, ngrok and others.” source