Stop paying for ngrok! ๐Ÿ›‘ Meet NPort: The Free Open Source Alternative

Published: (January 16, 2026 at 01:31 AM EST)
2 min read
Source: Dev.to

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.link for 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.

NPort Home Page

Demo ๐ŸŽฅ

A quick demo shows how fast it is to get a live HTTPS link.

How It Compares

FeatureNPortngrok (Free Tier)
PriceFreeFree (Limited)
Custom Subdomainโœ… IncludedโŒ Paid feature
Session TimeUnlimitedโš ๏ธ 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.)

NPort Terminal Startup

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.md in 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! ๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

Back to Blog

Related posts

Read more ยป