ngsrv vs Cloudflare Tunnel

Cloudflare's tunnel daemon. Free quick tunnels via trycloudflare.com, or named tunnels on your own zone. 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 Cloudflare Tunnel?

Cloudflare's tunnel daemon. Free quick tunnels via trycloudflare.com, or named tunnels on your own zone.

Typical command:

cloudflared tunnel --url http://localhost:3000

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

ngsrvCloudflare Tunnel
HTTP tunnel commandngsrv http 3000cloudflared ...
Account requiredYes (free)No for quick tunnels; yes for stable named tunnels on your domain
Stable URLsReserved subdomains + custom domainsQuick tunnel URLs change every restart. Named tunnels need a Cloudflare account and DNS setup.
Security policiesBuilt into tunnel (free tier)Cloudflare edge handles TLS. Auth and access rules live in Cloudflare Zero Trust (separate product).
TCP tunnelsYes (ngsrv tcp)Limited on quick tunnels; named tunnels support more protocols

Where ngsrv fits better

You want a dev-first CLI, reserved subdomains without touching DNS, and security policies in the same tool.

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 /metrics for CI pipelines

Where Cloudflare Tunnel fits better

You already use Cloudflare DNS and want tunnels tied to your zone.

No shame in using the tool that matches your constraints.

Switching over

Replace cloudflared tunnel --url http://localhost:PORT with ngsrv http PORT. For multi-service setups, map each service to a tunnel entry in ngsrv.yml.

  1. Install: brew install ngsrv/tap/ngsrv or curl -fsSL https://get.ngsrv.com | bash
  2. Auth: ngsrv token <YOUR_TOKEN>
  3. Replace the cloudflared command with ngsrv http <port>

FAQ

Is ngsrv a drop-in replacement for Cloudflare Tunnel? 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 cloudflared for emergencies and ngsrv for day-to-day sharing.