ngsrv vs localhost.run
SSH reverse tunnel service. No binary to install if you already have OpenSSH. ngsrv is a managed tunnel with a Go CLI, YAML config, reserved subdomains, and security policies on every plan. Same problem, different trade-offs.
What is localhost.run?
SSH reverse tunnel service. No binary to install if you already have OpenSSH.
Typical command:
ssh -R 80:localhost:3000 nokey@localhost.run
What is ngsrv?
ngsrv http 3000
Declarative multi-tunnel config via ngsrv.yml, dashboard analytics, custom domains, and edge policies (IP allowlist, rate limit, geo, header auth) without a separate Zero Trust product.
At a glance
| ngsrv | localhost.run | |
|---|---|---|
| HTTP tunnel command | ngsrv http 3000 | ssh ... |
| Account required | Yes (free) | No |
| Stable URLs | Reserved subdomains + custom domains | Free tier URLs are random and ephemeral. |
| Security policies | Built into tunnel (free tier) | No built-in auth layer on the tunnel itself. |
| TCP tunnels | Yes (ngsrv tcp) | HTTP/HTTPS on free tier; TCP on paid |
Where ngsrv fits better
You need a stable URL, webhook testing across days, or edge policies without SSH gymnastics.
Teams also pick ngsrv when they want:
- Config in git (
ngsrv.yml) instead of one-off shell commands - Webhook URLs that stay the same across restarts
- Structured logs and
/metricsfor CI pipelines
Where localhost.run fits better
Locked-down machine where you cannot install anything but SSH works.
No shame in using the tool that matches your constraints.
Switching over
Swap the SSH one-liner for ngsrv http 3000 after ngsrv token <YOUR_TOKEN>.
- Install:
brew install ngsrv/tap/ngsrvorcurl -fsSL https://get.ngsrv.com | bash - Auth:
ngsrv token <YOUR_TOKEN> - Replace the ssh command with
ngsrv http <port>
FAQ
Is ngsrv a drop-in replacement for localhost.run? For HTTP preview and webhooks, usually yes. For their specific platform features, check the table above.
Does ngsrv cost money? Free tier covers one tunnel, one custom domain, 10GB/month, and one policy per security type. Pro removes the Free visitor warning page. See /pricing.
Can I use both? Sure. Lots of teams keep ssh for emergencies and ngsrv for day-to-day sharing.