Illustrated title card for the guide: Pangolin Self-Hosted Tunnel Setup Behind CGNAT
setup

Pangolin Self-Hosted Tunnel Setup Behind CGNAT

Set up Pangolin Community Edition on a VPS, connect your home network behind CGNAT, and publish a web app over HTTPS without port forwarding.

Run Pangolin Community Edition on a public Linux VPS and put the site connector on your home network. The connector opens an outbound WireGuard tunnel, so the setup works behind carrier-grade NAT (CGNAT) without port forwarding on your home router. Visitors reach the VPS over HTTPS, and Pangolin proxies their requests through the tunnel to your app after sign-in. Pangolin for home labs · HTTP / HTTPS public resources

Point DNS at the VPS and open its firewall

Start with a Linux VPS with a public IPv4 address and root access, a domain whose DNS you control, and an email address for Let’s Encrypt and the admin login. Have a web app running at an address and port the home connector can reach. Quick Install Guide · HTTPS resource walkthrough

For this example, replace example.com with your domain. In that DNS zone, add an A record named * pointing to the VPS’s public IPv4 address. The wildcard covers both example subdomains, pangolin.example.com for the dashboard and app.example.com for the app. DNS & Networking · Quick Install Guide

Allow the following inbound traffic on the VPS firewall, including the cloud provider’s firewall if you use one. DNS & Networking

PortPurpose
TCP 80Let’s Encrypt domain validation
TCP 443HTTPS for the dashboard and app
UDP 51820Default port for site tunnels
UDP 21820Default relay port for Pangolin clients. Allow it if you use those clients.

Install Pangolin on the VPS

Connect to the VPS over SSH. Run the vendor’s installer commands from the directory where you want Pangolin’s files stored. Quick Install Guide

curl -fsSL https://static.pangolin.net/get-installer.sh | bash
sudo ./installer
Installer settingWhat to enter
EditionCommunity Edition
Base domainexample.com
Dashboard domainAccept pangolin.example.com
Let’s Encrypt emailYour email address
TunnelingYes, to install Gerbil
SMTPSkip for the initial setup
Container startupConfirm installation and start the containers

Open https://pangolin.example.com/auth/initial-setup using your dashboard hostname. Enter the setup token printed by the installer, supply your admin email, and set a strong, unique password. If you need to retrieve the token, run the command below from the install directory. After signing in, enter an organization name and description and click Create Organization. Quick Install Guide

sudo docker compose logs pangolin

Connect the home site

In the organization dashboard, open Sites and click Add Site. Name it Home lab and copy the generated site ID and secret. Use your dashboard URL as the endpoint and store the site secret securely. HTTPS resource walkthrough · Site Credentials

On the Linux machine at home that can reach the app, install the Pangolin CLI. Substitute your site values in the service command. The service keeps the connector running on the home machine. Install Sites

curl -fsSL https://static.pangolin.net/get-cli.sh | bash

sudo pangolin service install site \
  --id 'YOUR_SITE_ID' \
  --secret 'YOUR_SITE_SECRET' \
  --endpoint 'https://pangolin.example.com'

sudo pangolin service status site

Check the site in the dashboard. It should show as connected once the connector is up. HTTPS resource walkthrough

Publish one web app over HTTPS

In Public Resources, click Add Resource and choose HTTPS. Name it Home app, select example.com, and use app as the subdomain. Add a target using the settings below for an app that serves HTTP on the connector machine at port 8000. HTTPS resource walkthrough · Resource and target fields

Target settingExample
SiteHome lab
Addresslocalhost
Port8000
Methodhttp

For an app on a separate home machine, use its address, port, and protocol as seen from the connector. The browser uses https://app.example.com, and Pangolin makes the backend request using the target method. HTTP / HTTPS public resources · Resource and target fields

In the resource’s Authentication tab, leave Platform SSO enabled. Assign access to the intended users. Authentication · Authentication tab walkthrough

Verify the app from outside your home network

Open the app’s HTTPS URL in a private browser window. With the default authentication settings, you should first see the Pangolin login page. Sign in with an account that has access and confirm the app loads. HTTPS resource walkthrough · Authentication

Where it failsWhat to check
Dashboard setup page fails to loadCheck that the DNS record for the hostname points to the VPS and that TCP 80 and 443 are reachable. Docker Compose troubleshooting · DNS & Networking
Home site stays disconnectedCheck the dashboard endpoint, site ID, and secret. Read sudo pangolin service logs site on the home machine. On the VPS, check UDP 51820 and inspect sudo docker compose logs -f gerbil from the install directory. Site Credentials · Install Sites · Docker Compose troubleshooting
Pangolin denies access after sign-inCheck that the resource grants access to the account. Authentication
Pangolin allows access but the app fails to loadVerify the target site, address, port, and method. Check that the connector can reach the app at that address and port. Resource and target fields · HTTPS resource walkthrough

Evidence and limits. This guide follows Pangolin’s Community Edition Quick Install, Install Sites, and public resource documentation checked on November 26, 2026, when Pangolin 1.27.1 was marked latest. The setup steps were not run for this guide.

Sources

  1. Pangolin for home labs
  2. DNS & Networking
  3. Quick Install Guide
  4. Install Sites
  5. Site Credentials
  6. Pangolin dashboard walkthrough for HTTPS resource setup
  7. HTTP / HTTPS Public Resources
  8. Common API Routes
  9. Authentication for public resources
  10. Docker Compose setup and troubleshooting
  11. Pangolin 1.27.1 release

Related