SSL Configuration
Recommended setup:- Use wildcard certificates with DNS-01 challenge
- Set SSL/TLS mode to Full (Strict)
- Disable port 80 (not needed with wildcard certs)
Pangolin will not work with Cloudflare’s Full or Automatic SSL/TLS modes. Only Full (Strict) mode is supported.
WireGuard Configuration
Since Cloudflare proxy obscures the destination IP, you must explicitly set your VPS IP in the config file:1
Get your VPS IP
Find your VPS public IP address:
2
Update configuration
Add the IP to your
config.yml:3
Restart services
Restart Pangolin to apply the changes:
Getting the Real Client IP
Pangolin needs to know the original client IP address for features like rate limiting and logging. When Cloudflare proxy is enabled, the API server sees Cloudflare’s IP instead of the real client IP. Badger, Pangolin’s middleware for Traefik, automatically handles Cloudflare proxy IP extraction. Badger versions 1.3.0 and later automatically:- Trust Cloudflare IP ranges
- Extract the real client IP from the
CF-Connecting-IPheader - Set
X-Real-IPandX-Forwarded-Forheaders for downstream services
Automatic Configuration: Pangolin installer versions 1.14.0 and greater automatically add Badger to all Pangolin routes in Traefik. If you’re using a newer installer, no manual configuration is needed.
Manual Configuration
If you’re using an older installer or need to manually configure Badger, add it to your Traefik configuration. Badger must be applied to all routers that handle Pangolin traffic (API, dashboard, and WebSocket routes):dynamic_config.yml
disableForwardAuth: true is set, Badger extracts the real client IP from Cloudflare proxy headers without performing authentication. This is necessary because forward authentication is only needed for resources controlled by Pangolin, not for the main application routes. However, the main Pangolin containers and APIs still need the real client IP for proper rate limiting and IP tracking.
Pangolin Configuration
Settrust_proxy: 2 in your Pangolin config file. This tells Pangolin to trust the second-level proxy (Traefik is proxy 1, Cloudflare is proxy 2):
Troubleshooting
If websockets are not connecting like from newt or clients, ensure that websockets are enabled in Cloudflare:

