ngsrv vs localtunnel
ngsrv and localtunnel sit at very different points on the same axis. localtunnel is a tiny, free, no-account npm package for the simplest possible "expose this port" workflow. ngsrv is a managed service with custom domains, security policies, Kubernetes integration, and a CLI built for multi-tunnel config-in-git.
ngsrv helps developers expose local services, share preview links, test webhooks, and get feedback faster — the same problem space as localtunnel, with a different set of trade-offs.
What is localtunnel?
localtunnel is an open-source Node.js CLI:
npx localtunnel --port 3000
It connects to a hosted relay (localtunnel.me) and prints a random subdomain that forwards to your local port. Free, no signup, no config. The shared relay has limited capacity and no SLA, the URLs are random per session, and there are no built-in security controls.
What is ngsrv?
ngsrv is a hosted tunneling service with a Go CLI, declarative YAML config, custom domains, reserved subdomains, and security policies on every plan. The free tier is more capable than localtunnel for production-adjacent work, the paid tiers cover real production traffic.
At a glance
| | ngsrv | localtunnel |
| --- | --- | --- |
| Command | ngsrv http 3000 | npx localtunnel --port 3000 |
| Account required | Yes (free) | No |
| Stable subdomains | Pro and above | Random per session |
| Custom domains | Pro and above | Not supported |
| HTTPS at edge | Yes (managed certs) | Depends on relay |
| Security policies | IP allowlist, rate limit, time window, geo, header auth | None |
| Declarative multi-tunnel config | ngsrv.yml | Not supported |
| Kubernetes sidecar | First-class | Not applicable |
| Logs / metrics | Structured JSON + /metrics | Console output |
| Support | Email + docs | Community |
Where ngsrv is the better fit
Anything that lives longer than five minutes. localtunnel URLs rotate per session and the shared relay sometimes drops. ngsrv reserved subdomains and custom domains stay yours.
Anything client-facing. Sending a client a https://nervous-cat-flowers.loca.lt link works, but doesn't feel professional. https://preview.your-agency.com or https://my-app.tnl.ngsrv.com does.
Anything that needs auth. localtunnel has no built-in auth. ngsrv ships header-required, IP-allowlist, and time-window policies on the free tier. For mTLS see the /pricing page.
Webhook testing across days. Webhook configs in Stripe/GitHub/Shopify hate changing URLs. Reserve a subdomain in ngsrv once, point the provider at it forever.
Anywhere CI runs. ngsrv has stable exit codes, structured JSON logs, and Prometheus metrics — built to live inside a pipeline.
Anywhere Kubernetes runs. The ngsrv sidecar with /healthz, /readyz, /metrics, and a Helm chart slots into a cluster the way the rest of your platform expects.
Where localtunnel is the better fit
One-off "send my buddy this thing". When the link only needs to work for the next twenty minutes and you don't want an account, npx localtunnel --port 3000 is unbeatable.
Offline / air-gapped self-host. localtunnel's server is open source. If you have a single VPS and just want to run your own relay, it's a fine choice.
You're allergic to managed services. Fair.
What you get from ngsrv that localtunnel can't do
# ngsrv.yml — declarative, GitOps-ready, multi-tunnel
tunnels:
- name: api
port: 8080
subdomain: api
security_policies:
- type: ip_allowlist
ips: ["203.0.113.0/24"]
- type: rate_limit
requests_per_second: 100
- name: webhooks
port: 9000
subdomain: hooks
security_policies:
- type: header_required
header: "X-Stripe-Signature"
- name: docs
port: 3000
domain: docs.example.com
Run it with ngsrv run ngsrv.yml. Same file works in CI and in Kubernetes via the sidecar.
FAQ
Is ngsrv free? Yes, there's a free tier — 1 tunnel, 10GB bandwidth, 1 custom domain, basic security policies. See /pricing.
Does ngsrv require signup like localtunnel doesn't? Yes, ngsrv requires a free account so you get a stable identity, dashboard, and per-account rate limits. That's also what enables reserved subdomains and custom domains.
Is ngsrv faster than localtunnel? Generally yes — ngsrv runs on a multi-region edge with HTTP/2 and managed TLS. localtunnel relies on a single shared relay.
Can I self-host ngsrv? Not currently. If self-hosting is a hard requirement, localtunnel's open-source server is a reasonable starting point.
Can I expose localhost:3000 with ngsrv like I do with localtunnel? Yes. Replace npx localtunnel --port 3000 with ngsrv http 3000. See /use-cases/expose-localhost for the full walkthrough.