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

ngsrvlocaltunnel
Commandngsrv http 3000npx localtunnel --port 3000
Account requiredYes (free)No
Stable subdomainsPro and aboveRandom per session
Custom domains1 on Free; more on Pro+Not supported
HTTPS at edgeYes (managed certs)Depends on relay
Security policies1 per type on Free (IP, geo, header, time, rate, WAF)None
Declarative multi-tunnel configngsrv.ymlNot supported
Kubernetes sidecarFirst-classNot applicable
Logs / metricsStructured JSON + /metricsConsole output
SupportEmail + docsCommunity

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
# security_policies hold dashboard policy IDs, not inline rules
tunnels:
  - name: api
    port: 8080
    subdomain: api
    security_policies:
      - ngsrv_ips_office
      - ngsrv_rate_api

  - name: webhooks
    port: 9000
    subdomain: hooks
    security_policies:
      - ngsrv_ips_stripe

  - name: docs
    port: 3000
    domain: docs.example.com

Run it with ngsrv run. Same file works in CI and in Kubernetes via the sidecar.

FAQ

Is ngsrv free? Yes — 1 tunnel, 10GB bandwidth, 1 custom domain, one policy per security type. 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.