Self-Hosting Pangolin + Newt on Your Own Server

DevOps & Cloud Engineer — building scalable, automated, and intelligent systems. Developer of sorts | Automator | Innovator
Search for a command to run...

DevOps & Cloud Engineer — building scalable, automated, and intelligent systems. Developer of sorts | Automator | Innovator
Artificial Intelligence has become one of the biggest talking points in software engineering. Every week, a new tool promises to automate deployments, fix production incidents, or replace developers a

You spin up a Kubernetes workload. You connect to PostgreSQL. You add sslmode=require because security matters. And then PostgreSQL replies with: server does not support SSL, but SSL was required Wai

When you first approach Tencent Cloud, it feels familiar if you come from AWS or Azure. There are VPCs, Kubernetes clusters, load balancers, object storage, IAM, everything you would expect. But once

When I first automated Docker builds and deployments, I thought the hard part would be writing the YAML. It was not. The real challenges were versioning, preventing accidental rollbacks, handling envi

For a long time, Docker Compose felt like the perfect solution. Simple YAML, fast local setup, predictable behavior. For a single service or even a small stack, it works beautifully. But at some point, reality catches up. As the application grew, tra...

CodeOps Studies
40 posts
Simple write-ups on day to day code or devops experiments, tests etc.
Recently, I decided to self-host Pangolin (a modern VPN + mesh networking + tunneling platform) on my own server. The goal was simple:
Create my own WireGuard-based private network
Have an easy dashboard to manage networks and clients
Avoid the complexity of Tailscale ACLs + self-hosted coordination servers
Spoiler: It works beautifully now, but my first attempt involved a few wrong turns. So here's the full working guide, start to finish, including the gotchas.
We will set up a Pangolin instance hosted on:
Domain: nyzex.in
Dashboard URL: https://tunnel.nyzex.in
Public server IP: <my SERVER IP>
Then we’ll connect a client machine using Newt, Pangolin's lightweight VPN client.
Before installing:
A VPS (Ubuntu recommended)
Your domain pointed to your server:
A record → tunnel.nyzex.in → <my SERVER IP>Open ports:
TCP: 80, 443
UDP: 51820, 21820
On Ubuntu, you can open ports with:
ufw allow 80/tcp
ufw allow 443/tcp
ufw allow 51820/udp
ufw allow 21820/udp
ufw enable
Or if you are using some VM from cloud provider, you will have to allow the traffic (incoming) on these ports.
Run the official installer:
curl -fsSL https://pangolin.net/get-installer.sh | bash
sudo ./installer
During setup, I used:
| Prompt | Value |
| Base domain | nyzex.in |
| Dashboard domain | tunnel.nyzex.in |
your email | |
| Use Gerbil? | yes |
This sets up:
pangolin backend API
traefik reverse proxy w/ TLS
gerbil WireGuard relay
Once it’s done, it shows a setup token. Example:
Setup token: lf6nmzbcay5v0dsadasdadasdadaweq
Go to: https://tunnel.nyzex.in/auth/initial-setup
Visit that URL in your browser → Create your admin account.
In Pangolin dashboard:
Go to Sites → Create Site
Example name: my-site
You’ll get:
NEWT ID: dqwdaxcxcsdfsdfxcv
SECRET KEY: r0ujdgp8d5kf2eadasdae3rdevsdvg
Keep these safe.
On the machine you want to connect, I used a Qemu VM that I created (check previous blog!):
curl -fsSL https://tunnel.net/get-newt.sh | bash
Then enroll the client:
newt --id dqwdaxcxcsdfsdfxcv --secret r0ujdgp8d5kf2eadasdae3rdevsdvg --endpoint https://tunnel.nyzex.in --accept-clients
If successful, you will see logs like:
Tunnel connection to server established successfully!
WireGuard device created and configured
And your site in the dashboard will switch from Offline → Online!
| Issue | Fix |
unsupported protocol scheme "" in newt enroll | You must include https:// in --endpoint |
| Site stuck offline | Run client using --accept-clients or restart it |
| Dashboard not loading / SSL errors | Ensure DNS + ports + Let’s Encrypt solved correctly |
Once Pangolin is connected, your cloud machine and QEMU VM are on the same private network, even if your home network has NAT, CGNAT, or no port forwarding.
So now they can talk like this:
cloud → 10.44.0.12 (QEMU VM)
QEMU VM → 10.44.0.1 (cloud)
No opening ports. No exposing services publicly.
This is the reason Pangolin is useful.
Pangolin dashboard reachable at https://tunnel.nyzex.in
Newt clients connect instantly
Internal network routing works via WireGuard
No manual config headache