Stop paying for ngrok! 🛑 Meet NPort: The Free Open Source Alternative
Source: Dev.to
The Problem 😫
We’ve all been there. You are demoing a Next.js app to a client, or testing a Stripe webhook locally. You fire up ngrok, send the link, and 2 hours later… the session expires.
Or worse, you restart your server, and the domain changes from random-xyz.ngrok-free.app to random-abc.ngrok-free.app. You have to update your webhook settings again.
To get a stable, custom subdomain, you usually have to pay.
What is NPort? 🚀
NPort is a Node.js CLI tool that exposes your localhost to the internet.
It is 100 % Free, Open Source, and designed to be a “set it and forget it” replacement for paid tunneling services.
Key Features
- 💸 100 % Free: No monthly fees.
- 🔗 Free Custom Subdomains: Claim
my-project.nport.linkfor free—no more random strings. - ⚡ Fast: Powered by Cloudflare Tunnel (Argo), leveraging their global edge network.
- 🔒 Secure: Automatic HTTPS.
- 🛠 Self‑Hostable: Fork the repo and deploy the backend to your own Cloudflare Workers account (Free tier) in minutes.

Demo 🎥
A quick demo shows how fast it is to get a live HTTPS link.
How It Compares
| Feature | NPort | ngrok (Free Tier) |
|---|---|---|
| Price | Free | Free (Limited) |
| Custom Subdomain | ✅ Included | ❌ Paid feature |
| Session Time | Unlimited | ⚠️ Limited |
| Login Required | ❌ No | ✅ Yes |
| Open Source | ✅ Yes (MIT) | ❌ No |
How to Use It 💻
You need Node.js installed.
1. Install via NPM
npm install -g nport
2. Start Your Local Server
Run your Next.js, Express, or any other app on a local port (e.g., 3000).
3. Create a Tunnel
nport 3000 -s nickpham
(The -s flag stands for subdomain.)

4. Done! 🎉
Your app is now accessible at https://nickpham.nport.link. The terminal shows a clean summary of the session, and the connection is established instantly.
Under the Hood ⚙️
Client: The CLI (Node.js) creates a secure tunnel using the Cloudflare Tunnel protocol.
Edge: Traffic is routed through Cloudflare’s nearest edge location.
Backend: Implemented with Cloudflare Workers (serverless) to handle routing and subdomain logic, ensuring high availability and low latency.
Running on Cloudflare Workers keeps infrastructure costs near zero, allowing the service to remain free.
Privacy & Self‑Hosting 🛡️
Privacy is important. While NPort uses end‑to‑end encryption via Cloudflare, you can fork the repository and deploy your own backend on your own Cloudflare account.
- Own private tunnel server.
- Use your own domain (e.g.,
tunnel.your-company.com). - See
server/README.mdin the repo for deployment instructions.
Give It a Try!
GitHub Repo:
Website:
If you find it useful, consider giving it a Star ⭐ on GitHub—it helps more developers discover the tool.
Happy coding! 👩💻👨💻