# ngrok vs Cloudflare Tunnel: which to use, and when neither fits

November 17, 2026, The Expose team

Use **Cloudflare Tunnel** to keep a self-hosted app online for good on a domain you already run through Cloudflare. The tunnel costs nothing, and Cloudflare Access can put a login in front of it. Use **ngrok** for development work like webhooks: one command gives you a URL, and its inspector shows and replays every request.

For the development half there's a third option. [Expose](https://expose.dev/), the tunnel we make, works like ngrok, with a request dashboard and replay. It has no warning page on any plan and no usage billing. We say below where it fits and where it doesn't.

We checked every ngrok and Cloudflare detail on November 17, 2026, in their own docs and pricing pages. The sources are linked at the end.

## The short answer, by job

| What you need | ngrok | Cloudflare Tunnel | Expose |
| --- | --- | --- | --- |
| Test a webhook today | Good fit. The free dev domain stays the same, and the inspector replays requests. | Works with a Quick Tunnel, but the URL changes on every run and you can't see the requests. | Good fit. The dashboard replays requests, with changes. A URL that stays the same needs Pro. |
| Show a client a work-in-progress site | Free plan shows browser visitors a warning page first. Paid plans don't. | A Quick Tunnel works, on a random trycloudflare.com URL. | No warning page on any plan. Your own domain on Pro. |
| Keep a self-hosted app online permanently | Works, but your own domain needs Pay-as-you-go, which bills usage. | The best fit, if your domain's DNS is on Cloudflare. | Not what it's built for. |
| Let a coding agent see live traffic | An MCP server can read Traffic Inspector data. | No request inspector to read. | An MCP server reads the requests that reached your tunnel. |

## The same job in each tool

| Task | ngrok | Cloudflare Tunnel | Expose |
| --- | --- | --- | --- |
| Sign in once | `ngrok config add-authtoken <token>` | Quick Tunnel: not needed. Named tunnel: `cloudflared tunnel login` | `expose login` |
| Share port 3000 | `ngrok http 3000` | `cloudflared tunnel --url http://localhost:3000` | `expose share http://localhost:3000` |
| Keep the same URL | Free: your dev domain, automatically. Paid: `ngrok http 3000 --url https://my-app.ngrok.app` | A named tunnel and a DNS record (below) | `expose share http://localhost:3000 --subdomain=my-app` (Pro) |
| Use your own domain | `--url` with your domain, on Pay-as-you-go | A named tunnel, with the domain on Cloudflare | `expose share http://localhost:3000 --domain=share.example.com` (Pro) |
| Ask for a login | `--traffic-policy-file policy.yml` with a `basic-auth`, `oauth` or `openid-connect` action | A Cloudflare Access policy. Quick Tunnels take `--allowed-mail` for an email PIN. | `--basicAuth="user:secret"` or `--magic-auth` |
| See the requests | `http://localhost:4040` | `cloudflared tail <tunnel>` streams logs | `http://127.0.0.1:4040` |
| Share a TCP port | `ngrok tcp 22` (Free needs a payment method on file) | `cloudflared` on your server, and `cloudflared access tcp` on each visitor's machine | `expose share-port 22` (Pro) |

## Do you need a domain for Cloudflare Tunnel?

Not for a Quick Tunnel. Cloudflare has two kinds of tunnel, and most of the confusion comes from mixing them up.

**A Quick Tunnel** needs no account and no domain. `cloudflared tunnel --url http://localhost:3000` prints a random `trycloudflare.com` URL. Cloudflare's docs list its limits:

- The hostname changes each time you start one.
- Up to 200 in-flight requests. More get a `429` response.
- No Server-Sent Events, so streamed responses won't come through.
- No uptime guarantee. Cloudflare says Quick Tunnels "are for testing and development".

**A named tunnel** is the permanent kind. It needs a Cloudflare account and a domain on Cloudflare. For the command-line setup, Cloudflare's prerequisites are to add the site to Cloudflare and change your domain's nameservers to Cloudflare's. Cloudflare's partial (CNAME) setup, which leaves your nameservers where they are, is only available on its Business and Enterprise plans.

ngrok works the other way round. It always needs an account and an authtoken, but no domain: the free plan gives you one dev domain, like `your-assigned-name.ngrok-free.app`, that stays the same when you restart.

Expose needs a free account, created the first time you share. Free URLs are random. With Pro you reserve a subdomain on an Expose domain, with no DNS at all, or bring your own domain with one CNAME record, wherever its DNS is hosted.

## Testing a webhook today

A webhook provider like Stripe or GitHub needs a public URL, and you need to see what it sent. Three things matter: a URL you don't have to re-enter at the provider, a view of each request, and a way to send it again without triggering a new event.

**ngrok** is good at this. `ngrok http 3000` uses your free dev domain, so the URL you paste into the provider still works tomorrow. The inspector at `http://localhost:4040` lists every request. Its replay editor lets you change "the method, path, headers, trailers, and request body" before you replay. The free plan's warning page doesn't get in the way: ngrok says it doesn't affect API or programmatic traffic. The limits are 20,000 HTTP requests and 1 GB of data a month.

**Cloudflare Tunnel** gets the webhook to your app, and that's all. A Quick Tunnel's URL changes every time you start it, so you update the provider each time. There's no request inspector and no replay. `cloudflared tail` streams the tunnel's logs, but Cloudflare's docs don't describe browsing or replaying requests with it. When your handler fails, you trigger the event again at the provider.

**Expose** works like ngrok here. `expose share http://localhost:3000` gives you a URL, and the [dashboard](https://expose.dev/docs/client/dashboard) at `http://127.0.0.1:4040` lists every request. You can replay one, or replay it with a changed method, path, headers or body. Built-in plugins label GitHub, Stripe and Paddle Billing webhooks. The free URL is random, so for a URL you set once at the provider you need Pro and `--subdomain`. Our [webhook testing guide](https://expose.dev/webhook-testing) walks through the whole loop.

![The Expose request dashboard with a list of requests and the headers of the selected request](https://expose.dev/img/docs/expose/img/expose_dashboard_details.webp)

**Verdict:** ngrok or Expose. On ngrok's free plan, the fixed dev domain is the thing a free Expose account doesn't have. Cloudflare Tunnel is the weakest of the three for this job.

## Showing a client a work-in-progress site

Now the visitor is a person in a browser, often not a developer, so whatever stands between them and your site matters.

**ngrok** shows "an interstitial page in front of all HTML browser traffic on the free tier". Your client sees an ngrok page and has to click Visit. A cookie then hides it for that domain for 7 days. Every paid plan removes it. Hobbyist, at $10 a month or $96 a year, is the cheapest. We wrote up [what the ngrok warning is and how to skip it](https://expose.dev/blog/ngrok-skip-browser-warning).

**Cloudflare Tunnel** with a Quick Tunnel gives the client a random `trycloudflare.com` link. The Quick Tunnel docs don't mention a warning page. The link dies when you stop `cloudflared`, and you get a new one next time. To make it private, start the Quick Tunnel with `--allowed-mail`, and visitors get a one-time PIN by email before they see the site.

**Expose** shows your site directly, on every plan, including the free one. To keep it private, `--basicAuth="user:secret"` asks for a password, and `--magic-auth=@client.com` asks for an email address at that domain. Magic authentication doesn't send an email to confirm the address, so treat it as a polite gate, not real authentication. With Pro, the client gets a link on your own domain.

**Verdict:** Expose or a paid ngrok plan if the link should look professional. A Quick Tunnel works for a one-off look.

## Keeping a self-hosted app reachable permanently

This is a different job: a home server, a NAS or an internal tool that should answer all the time, not only while you're at your desk.

**Cloudflare Tunnel** is built for it. A named tunnel runs as a service and keeps four long-lived connections to two Cloudflare data centers. Cloudflare's docs say Tunnel is available on all plans, and an account includes 1,000 tunnels. The command-line setup looks like this:

```bash
cloudflared tunnel login
cloudflared tunnel create homelab
cloudflared tunnel route dns homelab app.example.com
cloudflared tunnel run homelab
```

Put Cloudflare Access in front of it and visitors log in with a one-time PIN sent to their email, or through an identity provider over OIDC or SAML. Access is free for up to 50 users. One catch for media servers: on Cloudflare's Free, Pro and Business plans, the service-specific terms require a separate paid service for serving video and other large files.

**ngrok** can do it too. Free endpoints have no timeout, but the free plan's 20,000 requests and 1 GB a month go quickly for an app people use. Your own domain needs Pay-as-you-go: $20 a month, plus $0.01 per active hour for the domain, plus usage beyond the included $20. Our [ngrok pricing breakdown](https://expose.dev/blog/ngrok-pricing) works out real bills.

**Expose** isn't the tool for this. A tunnel answers while `expose share` runs, and the free plan has a time limit per connection. Pro removes the time limit, but we build Expose for development, not for serving an app to users around the clock.

**Verdict:** Cloudflare Tunnel, if your domain's DNS can move to Cloudflare.

## Letting a coding agent see the traffic

If Claude Code or Codex is fixing your webhook handler, it helps when the agent can read the request that failed instead of you copying it out of a dashboard.

**ngrok** has an MCP server at `https://mcp.ngrok.com/mcp`. Your agent can query Traffic Inspector data, but "request headers and bodies are available only when full capture is turned on", and how far back it sees depends on your plan's retention: 24 hours on Free, 72 on Hobbyist and Pay-as-you-go. The same server can create, change and delete resources in your account. ngrok lists Claude Code, Codex, Cursor, Gemini CLI, Amp, Cline and VS Code. It says ChatGPT can't connect yet.

**Cloudflare** has an MCP server for its whole API, which its docs say covers Zero Trust. Its docs don't mention Tunnels or tunnel request logs, and there's no request inspector for an agent to read.

**Expose** has an [MCP server](https://expose.dev/mcp) at `https://expose.dev/mcp`, signed in with OAuth. Your agent can list your tunnels and read their requests:

- The last 50 requests of a tunnel in full for 30 minutes, without extra setup.
- Their method, path, status and sizes for 24 hours, 72 on Pro and Team, also after the tunnel closes.
- Authorization headers, cookies, signatures, secret query values and visitor IP addresses are removed first.

It works with Claude Code, Codex, VS Code with GitHub Copilot, Amp, Claude and ChatGPT. Cursor, Gemini CLI and Cline can't sign in yet. In ChatGPT, [MCP Events](https://expose.dev/mcp/events) tell the agent when a webhook fails. The agent can't open or replay a tunnel: you start it with `expose share`.

**Verdict:** ngrok or Expose, depending on your agent. Cursor, Gemini CLI or Cline: ngrok. ChatGPT: Expose. More on this workflow in [agentic engineering with Expose](https://expose.dev/agentic-engineering).

## ngrok vs Cloudflare Tunnel vs Expose, feature by feature

| | ngrok | Cloudflare Tunnel | Expose |
| --- | --- | --- | --- |
| Account | Required, with an authtoken | Quick Tunnel: none. Named tunnel: account and a domain on Cloudflare | Free account |
| Free URL | One dev domain that stays the same | Quick Tunnel: random, new each run | Random, new on each connection |
| Free limits | 20,000 HTTP requests, 1 GB data and 3 endpoints a month. No timeout. | Quick Tunnel: 200 in-flight requests, no Server-Sent Events, no uptime guarantee | A time limit per connection, one server in Germany |
| Warning page for visitors | On browser traffic on Free | Not mentioned in the Quick Tunnel docs | None, on any plan |
| Request inspector and replay | `localhost:4040`, replay with edits, HTTP only. Dashboard history: 24 hours on Free, 72 on Hobbyist and Pay-as-you-go | None. `cloudflared tail` streams logs | `127.0.0.1:4040`, replay with changes, labelled Stripe, GitHub and Paddle webhooks |
| Your own domain | Pay-as-you-go: $20 a month plus $0.01 per active hour | Free with a named tunnel, but the domain's nameservers must be Cloudflare's | Pro, $79 a year per user. One CNAME record, DNS anywhere |
| Paid plans | Hobbyist $10 a month or $96 a year. Pay-as-you-go $20 a month plus usage | Tunnel is on all plans. Access is free for up to 50 users | Pro $79 a year per user, Team $229 a year for up to 10 users. No usage billing |
| TCP | Yes. Free needs a payment method | Yes, but each visitor runs `cloudflared access tcp` | On Pro, with `expose share-port` |
| UDP | No | Not a public hostname service type | No |
| Login in front of the site | Traffic Policy: basic auth, OAuth, OpenID Connect, JWT validation, IP restrictions | Cloudflare Access: email one-time PIN, OIDC and SAML identity providers | Basic auth, magic authentication |
| Coding agents | MCP server reads Traffic Inspector data | Not for tunnel traffic | MCP server reads tunnel requests, secrets removed |

Expose prices are [on our homepage](https://expose.dev/#pricing), net of VAT and billed yearly.

## When ngrok fits

ngrok is more than a development tunnel. Pick it when:

- **You need a free URL that never changes.** The dev domain does that on the free plan. Expose's free URLs are random.
- **You're putting production traffic through it.** Traffic Policy handles OAuth, OpenID Connect, JWT validation and IP restrictions at the edge, and Pay-as-you-go adds TLS endpoints. Expose is for development and doesn't try to be an API gateway.
- **Your agent is Cursor, Gemini CLI or Cline.** ngrok's MCP server supports them. Expose's can't sign them in yet.

## When Cloudflare Tunnel fits

Pick Cloudflare Tunnel when:

- **The app should stay up permanently** on a domain you already run through Cloudflare. That's what named tunnels are for, and the tunnel is free.
- **You want Zero Trust access** for your team: Cloudflare Access with your identity provider, free for up to 50 users.
- **You need a URL for five minutes,** with no account, and don't need to see the requests. A Quick Tunnel is the fastest way.

## When neither fits

For the development loop, both have a gap. ngrok's free plan puts a warning page in front of clients, its own-domain plan bills by usage, and its MCP server doesn't reach ChatGPT. Cloudflare has no request inspector, and its stable URLs need your DNS on Cloudflare.

Expose fills that gap: a request dashboard with replay, no warning page on any plan, reserved subdomains and your own domain for $79 a year per user, and an MCP server for your agent. It also has limits. It does HTTP(S) and TCP, not UDP. Free URLs are random and connections have a time limit. And it isn't for hosting an app permanently.

To try it, install it and share a port:

```bash
curl -fsSL https://expose.dev/install.sh | sh
expose share http://localhost:3000
```

On Windows, run `irm https://expose.dev/install.ps1 | iex`. With Homebrew, run `brew install --cask expose`. If you use Laravel Herd, Expose is already installed.

For each tool on its own, see [Expose vs ngrok](https://expose.dev/ngrok-alternative) and [Expose vs Cloudflare Tunnel](https://expose.dev/cloudflare-tunnel-alternative). For localtunnel, Tailscale Funnel, Pinggy and others, see [ngrok alternatives compared](https://expose.dev/alternatives).

## Questions

### Is Cloudflare Tunnel free?

Yes. Cloudflare's docs say Tunnel is available on all plans, including Free. A Quick Tunnel needs no account at all. A named tunnel needs a Cloudflare account and a domain whose DNS is on Cloudflare. Cloudflare Access, the login in front of it, is free for up to 50 users.

### Can I use Cloudflare Tunnel without a domain?

Only as a Quick Tunnel, which gives you a random `trycloudflare.com` URL that changes each time. A URL that stays the same needs a named tunnel and a domain on Cloudflare.

### Does Cloudflare Tunnel have a request inspector like ngrok?

No. `cloudflared tail` streams the tunnel's logs, but you can't browse requests or replay one. ngrok and Expose both have an inspector at port 4040 that replays requests, and lets you edit them first.

### Does ngrok show a warning page?

On the free plan, yes, to browser visitors. It doesn't affect webhooks or other API calls, and every paid plan removes it. Expose has no warning page on any plan.

### Do ngrok or Cloudflare Tunnel support UDP?

ngrok says it "doesn't do UDP". Cloudflare Tunnel's public hostnames don't list UDP as a service type. Expose doesn't do UDP either. It shares HTTP(S) sites and TCP ports.

## Sources

Checked on November 17, 2026:

- ngrok: [free plan limits](https://ngrok.com/docs/pricing-limits/free-plan-limits/), [pricing](https://ngrok.com/pricing), [web inspection interface](https://ngrok.com/docs/agent/web-inspection-interface/), [Traffic Inspector](https://ngrok.com/docs/obs/traffic-inspection/), [agent CLI](https://ngrok.com/docs/agent/cli/), [ERR_NGROK_4018](https://ngrok.com/docs/errors/err_ngrok_4018/), [MCP server](https://ngrok.com/docs/mcp-server), and [ngrok vs Cloudflare Tunnel](https://ngrok.com/compare/cloudflare-tunnel) for the UDP statement.
- Cloudflare: [Quick Tunnels](https://developers.cloudflare.com/tunnel/get-started/quick-tunnels/), [getting started](https://developers.cloudflare.com/tunnel/get-started/), [creating a locally-managed tunnel](https://developers.cloudflare.com/tunnel/features/locally-managed-tunnels/create-local-tunnel/), [routing and limits](https://developers.cloudflare.com/tunnel/concepts/routing/), [observability](https://developers.cloudflare.com/tunnel/observability/), [partial setup](https://developers.cloudflare.com/dns/zone-setups/partial-setup/), [identity providers](https://developers.cloudflare.com/cloudflare-one/integrations/identity-providers/), [Cloudflare Access](https://www.cloudflare.com/zero-trust/products/access/) and [Cloudflare's MCP servers](https://developers.cloudflare.com/agents/model-context-protocol/mcp-servers-for-cloudflare/).
