Cloudflare Tunnel vs localhost vs a real link: sharing an app from your laptop

A localhost address only works on your own computer, and a 192.168.x.x address only on your own Wi-Fi, so neither opens on a phone across town. A tunnel (Cloudflare quick tunnel, ngrok) gives a public link to the app running on your laptop, but it stops working when the tunnel stops or the laptop sleeps. For a link that keeps working, put the app online: npx carno-ai deploy gives you one with no account.

Last updated November 25, 2026

localhost and 192.168 addresses

localhost always means the computer you're using, so on your friend's phone it points at their phone. Addresses like 192.168.1.20 are private network addresses: they work for devices on the same Wi-Fi and can't be reached from the internet.

Tunnels: a public link to your laptop

Cloudflare quick tunnel

cloudflared tunnel --url http://localhost:3000 needs no account and prints a random trycloudflare.com address. It works until you stop cloudflared, so a closed laptop means a dead link. Cloudflare describes quick tunnels as for testing and development, with no uptime guarantee, a limit of 200 in-flight requests, and no Server-Sent Events. You can now require visitors to enter a one-time code sent to their email (--allowed-mail), though changing who has access means restarting the tunnel.

ngrok

ngrok needs an account. On the free plan you get one address that doesn't change, visitors using a browser see a warning page first, and usage is capped (1 GB of data and 20,000 requests a month).

When a tunnel is the right tool

A quick demo while you're sitting at the computer, testing webhooks, or an app that has to reach files or hardware on your machine.

Sources (checked November 25, 2026)

Common questions

Why does my link work for me but not for my friend?

Because localhost means 'this computer', and 192.168 addresses are private to your network. Your friend's phone is a different computer on a different network.

What does it cost?

Simple websites and tools are free (about 9 GB of traffic and 1 GB of storage a month). An app with its own server is $4 a month if it sleeps when no one is using it (50 active hours included), or from $15 a month to stay always on. Plans up to $10 a month start with a 7-day free trial. Everything is charged up front each month, never after the fact, and nothing is charged without a card you've added.