Pangolin 1.27: A Self-Hosted Cloudflare Tunnel Alternative with Built-In Zero-Trust Access
Pangolin combines a WireGuard tunnel, a Traefik reverse proxy and identity-aware access control in one self-hosted stack. Here is what version 1.27 can do and how to deploy it on a small VPS with Docker Compose.
Sooner or later every homelab hits the same wall: you want to reach Immich, Paperless or your dashboard from outside, but you don't want to forward ports on your home router, your ISP gives you CGNAT anyway, and routing everything through Cloudflare Tunnel doesn't feel quite right either. A classic VPN works, but then every family member needs a client and gets access to a whole network instead of the one app they need.
Pangolin is a project that tackles exactly this, and it is very much on the radar right now: the repository has around 24,000 GitHub stars, sits among the most-starred self-hosted projects with recent activity, and version 1.27.0 shipped on 19 November 2026, followed by the 1.27.1 bugfix release on 20 November.
What is Pangolin?
Pangolin is an open-source access platform built on WireGuard. You run the Pangolin server on a machine with a public IP (typically a small VPS), and you place a lightweight connector called a site inside your home network. The site opens an outbound tunnel to the server, so your home router needs no open ports and no public IP.
On the server, Pangolin uses Traefik as reverse proxy and handles certificates, routing and authentication. That gives you two ways to reach your services:
- Public resources: normal HTTPS URLs such as
photos.example.comthat work in any browser, protected by Pangolin's login, PIN codes, passcodes, email one-time codes or rules. - Private resources: hosts, port ranges or whole subnets that are only reachable with a Pangolin client installed, similar to a mesh VPN but scoped to exactly what a user or role is allowed to see.
The default stack consists of three containers: pangolin (dashboard, API and access control), gerbil (the WireGuard tunnel endpoint) and traefik (the reverse proxy, with Pangolin's own "Badger" plugin for authentication).

License and editions
The licensing deserves a closer look, because Pangolin is open core:
- Community Edition: free and licensed under AGPL-3.0. Files without a license header in the repository default to AGPL-3.0.
- Enterprise Edition: some files are under the Fossorial Commercial License. According to the README and docs, it is free for personal use and for organizations under 100,000 USD gross annual revenue, but it needs a license key and the separate
eeDocker image. - Pangolin Cloud: a managed hosted version if you don't want to run the server yourself.
The Community Edition covers the core functionality described in this article. Some newer features, such as the role-based client settings added in 1.27, are marked as Enterprise-only. If locked features in the UI bother you, the docs describe a flags.disable_enterprise_features: true option in config.yml that hides them.
Key features
Tunnels without open ports
Sites connect outward to your Pangolin server and use NAT traversal, so they work behind CGNAT and restrictive firewalls. A site can run as a binary, as a system service (systemd, launchd or Windows service) or as a Docker container. Since Pangolin is WireGuard-based, the tunnel itself uses a well-understood protocol.
Identity-aware reverse proxy
Every public resource gets automatic Let's Encrypt certificates via Traefik, health checks and optional load balancing across several sites. Before a request reaches your app, Pangolin can require:
- a login with Pangolin users or an external identity provider (generic OAuth2/OIDC, Google or Azure Entra ID are documented),
- a PIN code or passcode,
- an email one-time password,
- allow and deny rules, geo-blocking or ASN blocking.
If you already run a passkey-based OIDC provider like Pocket ID, it can serve as the login for all resources behind Pangolin.

Browser-based SSH, RDP and VNC
Besides HTTPS apps, Pangolin can expose SSH terminals and remote desktops (VNC and RDP) directly in the browser. That is handy for quick admin access from a borrowed laptop where you can't install anything.
Private resources and clients
For things that should never be public, such as an SSH server, a database or the management UI of your NAS, you define private resources. Users connect with the Pangolin client (available for macOS, Windows, Linux, iOS and Android) and only see the hosts, ports or CIDR ranges they were granted. DNS aliases give those resources friendly names.

A launcher page for your users
Users get a personal home page listing everything they are allowed to access, grouped by site or label and searchable. For a family setup, that is a nice replacement for bookmarking a dozen subdomains.

AI gateway
Recent releases added an identity-aware AI gateway. You can put Pangolin in front of cloud model APIs and self-hosted servers like Ollama or vLLM, hand out personal API keys or rely on the connected client for authentication, and set budgets with session history. That is optional, but interesting if you share a local LLM with others.
What's new in 1.27
According to the release notes, 1.27.0 adds role-based enforcement of client settings (Enterprise), labels in alert rules and custom CSS for branding. It also fixes a long list of bugs, including Bitwarden autofill on the MFA login page and blueprints that rejected 6-digit PINs with a leading zero, and it defaults Postgres JIT mode to off. 1.27.1 fixes the custom CSS input and an identity provider issue with wildcard resources. The new role-based client settings require client releases published after 18 November 2026.
Why use Pangolin?
- No port forwarding at home. Only the VPS is exposed to the internet, and your home network connects outward.
- Granular access instead of "whole network" VPN. Give your parents access to the photo app and nothing else.
- Your traffic, your server. TLS terminates on a machine you control rather than on a third-party edge network.
- One place for auth. Login, SSO and access logs sit in front of apps that have weak or no authentication of their own.
Installing Pangolin with Docker Compose
Pangolin offers an interactive installer (curl -fsSL https://static.pangolin.net/get-installer.sh | bash, then sudo ./installer) that generates all files for you and can optionally add CrowdSec. If you prefer to know exactly what runs on your server, the official docs also describe a manual Docker Compose setup with the same layout. This guide follows the manual path.
Prerequisites
- A Linux VPS with a public IP, Docker and Docker Compose. The docs recommend Ubuntu 20.04+ or Debian 11+.
- A domain. Create a wildcard A record
*.example.compointing to the VPS (plusexample.comitself if you want to use the root domain). - Open ports on the VPS firewall: 80/tcp and 443/tcp for HTTP(S) and Let's Encrypt, 51820/udp for site tunnels and 21820/udp for client tunnels (only needed if you use clients).
1. Create the folder structure
mkdir -p ~/pangolin && cd ~/pangolin
mkdir -p config/db config/letsencrypt config/traefik/logs
2. docker-compose.yml
The official example uses latest tags. I prefer pinning versions so updates happen when you decide; the tags below were the current releases on Docker Hub when this article was written.
name: pangolin
services:
pangolin:
image: docker.io/fosrl/pangolin:1.27.1
container_name: pangolin
restart: unless-stopped
volumes:
- ./config:/app/config
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3001/api/v1/"]
interval: "10s"
timeout: "10s"
retries: 15
gerbil:
image: docker.io/fosrl/gerbil:1.6.0
container_name: gerbil
restart: unless-stopped
depends_on:
pangolin:
condition: service_healthy
command:
- --reachableAt=http://gerbil:3004
- --generateAndSaveKeyTo=/var/config/key
- --remoteConfig=http://pangolin:3001/api/v1/
volumes:
- ./config/:/var/config
cap_add:
- NET_ADMIN
- SYS_MODULE
ports:
- 51820:51820/udp
- 21820:21820/udp
- 443:443
- 80:80
traefik:
image: docker.io/traefik:v3.7.16
container_name: traefik
restart: unless-stopped
network_mode: service:gerbil
depends_on:
pangolin:
condition: service_healthy
command:
- --configFile=/etc/traefik/traefik_config.yml
volumes:
- ./config/traefik:/etc/traefik:ro
- ./config/letsencrypt:/letsencrypt
- ./config/traefik/logs:/var/log/traefik
networks:
default:
driver: bridge
name: pangolin
Note that Traefik shares Gerbil's network namespace (network_mode: service:gerbil), which is why ports 80 and 443 are published on the Gerbil container.
3. Traefik static config
Create config/traefik/traefik_config.yml. Replace the email address with your own.
api:
insecure: true
dashboard: true
providers:
http:
endpoint: "http://pangolin:3001/api/v1/traefik-config"
pollInterval: "5s"
file:
filename: "/etc/traefik/dynamic_config.yml"
experimental:
plugins:
badger:
moduleName: "github.com/fosrl/badger"
version: "v1.4.0"
log:
level: "INFO"
format: "common"
certificatesResolvers:
letsencrypt:
acme:
httpChallenge:
entryPoint: web
email: "admin@example.com"
storage: "/letsencrypt/acme.json"
caServer: "https://acme-v02.api.letsencrypt.org/directory"
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
transport:
respondingTimeouts:
readTimeout: "30m"
http:
tls:
certResolver: "letsencrypt"
encodedCharacters:
allowEncodedSlash: true
allowEncodedQuestionMark: true
serversTransport:
insecureSkipVerify: true
ping:
entryPoint: "web"
The Badger version above is the one used in the official manual guide. The docs ask you to check the fosrl/badger releases for the newest version (v1.8.0 at the time of writing). The Traefik API/dashboard is enabled here, but port 8080 is not published in the Compose file, so it is not reachable from the internet.
4. Traefik dynamic config
Create config/traefik/dynamic_config.yml and replace pangolin.example.com with your dashboard hostname everywhere:
http:
middlewares:
badger:
plugin:
badger:
disableForwardAuth: true
redirect-to-https:
redirectScheme:
scheme: https
routers:
main-app-router-redirect:
rule: "Host(`pangolin.example.com`)"
service: next-service
entryPoints:
- web
middlewares:
- redirect-to-https
- badger
next-router:
rule: "Host(`pangolin.example.com`) && !PathPrefix(`/api/v1`)"
service: next-service
entryPoints:
- websecure
middlewares:
- badger
tls:
certResolver: letsencrypt
api-router:
rule: "Host(`pangolin.example.com`) && PathPrefix(`/api/v1`)"
service: api-service
entryPoints:
- websecure
middlewares:
- badger
tls:
certResolver: letsencrypt
ws-router:
rule: "Host(`pangolin.example.com`)"
service: api-service
entryPoints:
- websecure
middlewares:
- badger
tls:
certResolver: letsencrypt
services:
next-service:
loadBalancer:
servers:
- url: "http://pangolin:3002"
api-service:
loadBalancer:
servers:
- url: "http://pangolin:3000"
The official file also contains a small tcp section with Proxy Protocol transports; copy it from the docs if you plan to use Proxy Protocol with raw TCP resources.
5. Pangolin config
Generate a secret first:
openssl rand -hex 32
Then create config/config.yml:
gerbil:
start_port: 51820
base_endpoint: "pangolin.example.com"
app:
dashboard_url: "https://pangolin.example.com"
log_level: "info"
telemetry:
anonymous_usage: false
domains:
domain1:
base_domain: "example.com"
server:
secret: "paste-the-generated-secret-here"
cors:
origins: ["https://pangolin.example.com"]
methods: ["GET", "POST", "PUT", "DELETE", "PATCH"]
allowed_headers: ["X-CSRF-Token", "Content-Type"]
credentials: false
flags:
require_email_verification: false
disable_signup_without_invite: true
disable_user_create_org: false
allow_raw_resources: true
The official example sets anonymous_usage: true; I switched it to false here, which is a personal preference. disable_signup_without_invite: true makes sure strangers can't register on your instance.
6. Start the stack and create the admin account
sudo docker compose up -d
sudo docker compose ps
sudo docker compose logs pangolin
On first start, Pangolin prints a setup token in its logs. Open https://pangolin.example.com/auth/initial-setup, paste the token, create the admin account and then your first organization. The first Let's Encrypt certificate can take a minute, so a short certificate warning right after startup is normal.
7. Connect your homelab as a site
In the dashboard, create a new site. Pangolin shows you an ID and a secret. On a machine in your home network, you can then run the connector with Docker Compose:
services:
pangolin-site:
image: fosrl/pangolin-cli
container_name: pangolin-site
restart: unless-stopped
network_mode: host
environment:
- PANGOLIN_ENDPOINT=https://pangolin.example.com
- SITE_ID=your-site-id
- SITE_SECRET=your-site-secret
network_mode: host is optional. According to the docs, it lets clients on the same LAN detect that they are local and connect directly instead of going through hole punching or the relay. The Pangolin CLI is now the recommended connector; existing deployments of the older Newt connector keep working. For production, the docs also show how to pass the ID and secret as a Compose secret instead of plain environment variables.
Once the site is online, create a public resource (for example photos.example.com), pick the site, point the target to the internal address and port of your app, and choose who may access it.
Configuration tips
- Pin and update deliberately. Read the release notes before updating. Pangolin moves fast, with several releases per month.
- Wildcard certificates. If you'd rather not have every subdomain show up in certificate transparency logs, the docs explain how to switch Traefik to a DNS-01 challenge with wildcard certificates.
- Admin rescue. The built-in
pangctltool can reset admin credentials or disable 2FA for a user:docker exec -it pangolin pangctl --help. - Without tunneling. If your server already sits in your network, Pangolin can run as a plain reverse proxy with authentication: remove Gerbil and publish 80/443 on Traefik directly.
- Monitoring. Add the dashboard and a few resources to Uptime Kuma so you notice when a tunnel goes down. Pangolin can also send its own alerts when a site or resource goes offline.
- Harden the VPS. The docs point out that by tunneling into the VPS, it becomes part of your security boundary. Expose only the four ports above, keep the OS updated and consider the optional CrowdSec integration from the installer.
Limitations
- You need a VPS. The whole point is a publicly reachable server, which means a monthly cost and another machine to maintain. Pangolin Cloud exists if you don't want that, but then you are back to a hosted service.
- Open core. Some features are Enterprise-only and the UI shows them unless you hide them. The Enterprise Edition is free for personal use, but it requires a license key and a commercial license above the revenue threshold.
- More moving parts than a simple tunnel. Three containers, a Traefik plugin and several YAML files is more complex than running a single tunnel daemon. The installer helps, but you should understand what it creates.
- Fast release pace. New features arrive constantly, and some of them depend on matching client versions, as the 1.27 note about client releases shows.
- The screenshots in the repository show the Enterprise UI with demo data. The Community Edition looks the same, but locked features may differ.
How does it compare?
Cloudflare Tunnel is free and needs no VPS, but your traffic is proxied and TLS is terminated on Cloudflare's network, and the control plane is not self-hostable. Pangolin keeps everything on your own server.
Tailscale or a self-hosted Headscale give you a WireGuard mesh where every device needs a client. That is great for your own devices, but less convenient for sharing one app with someone who should just open a link in the browser. Pangolin covers both cases: browser-based public resources and client-based private resources.
A plain reverse proxy such as Traefik, Caddy or Nginx UI on a server with open ports is simpler, but you have to expose your home IP and add authentication yourself.
Conclusion
Pangolin feels like the missing piece for homelabbers who want Cloudflare Tunnel convenience without handing their traffic to a third party. With a cheap VPS, a wildcard DNS record and three containers, you get tunnels without port forwarding, automatic HTTPS and fine-grained access control, including SSO via your own identity provider. The open-core model and the extra VPS are the trade-offs, but the Community Edition already covers what most homelabs need. If you are running apps like Immich or Paperless-ngx at home and want to share them safely, Pangolin is worth an afternoon.
Sources
- fosrl/pangolin on GitHub (README, LICENSE, screenshots)
- Pangolin 1.27.0 release notes and 1.27.1 release notes
- Pangolin docs: Quick Install Guide
- Pangolin docs: Docker Compose (manual install)
- Pangolin docs: DNS & Networking
- Pangolin docs: Install Sites
- Pangolin docs: Enterprise Edition
- Pangolin docs: Internal CLI (pangctl)
- fosrl/badger releases