Description
Self-hosted Gateway lets you expose Docker containers running on your own machine to the public internet, using a WireGuard tunnel to a small cloud server you control. It is a self-hosted alternative to services such as Cloudflare Tunnels, Tailscale Funnel and ngrok. A gateway runs on a publicly reachable Linux host, typically a cloud VPS, and a client runs next to your docker compose services. The two are joined by a reverse proxy over VPN, where Nginx runs on the gateway and Caddy on the client, and Caddy provisions HTTPS certificates automatically through Let's Encrypt or ZeroSSL. Remote client addresses are passed through to your container with the proxy protocol, and you can add basic authentication with an environment variable. Generic TCP and UDP traffic can be forwarded to localhost with socat. The project is aimed at people who self-host from home behind double NAT, on CGNAT connections such as Starlink or mobile internet, without a static IP, and without port forwarding. Its README says the approach keeps your home public IP hidden and isolates exposed services with Docker network namespaces.…
Highlights
- Expose local Docker services to the internet
- WireGuard tunnel to your own gateway
- Automatic HTTPS with Caddy
- Works behind CGNAT and without port forwarding
- Optional basic authentication
Ratings & Reviews
No ratings yet
Be the first to rate Selfhosted Gateway.
People also visit
sish
HTTP(S)/WS(S)/TCP tunnels to localhost using only SSH (serveo/ngrok alternative)
Selfhosted Gateway FAQ
What is Self-hosted Gateway?
A Docker-native tool that tunnels your local containers to the public internet through a server you run yourself.
What is it an alternative to?
The README names Cloudflare Tunnels, Tailscale Funnel and ngrok as services it replaces with a self-managed setup.
Is it free?
The code is public on GitHub, and it is built from open-source components such as WireGuard, Nginx and Caddy.
What do I need?
A domain name you can point at the gateway, a Linux VPS with SSH and ports 80 and 443 open, and Docker, Git and Make on both the gateway and the client.
Does it need a static IP?
No. The README says it suits connections with a changing IP, CGNAT and double NAT, and avoids exposing your home IP.
Does it handle HTTPS?
Yes. Caddy on the client provisions certificates automatically with Let's Encrypt or ZeroSSL.
Can it expose non-web services?
Yes. Generic TCP and UDP traffic can be proxied to localhost with socat.
What are the best Selfhosted Gateway alternatives?
Popular alternatives to Selfhosted Gateway include Drip Tunnel, Wiredoor and Nginx Proxy Manager. See all Selfhosted Gateway alternatives

