Quick tunnels


Open a tunnel to a local port without writing any config — three subcommands cover HTTP, HTTPS, and raw TCP.

Quick tunnels are designed for "I just want to share this for a minute" — you run one command, you get a public URL, you hit Ctrl+C and it's gone. They auto-spawn the daemon if it isn't running, and they don't load any of your saved projects, so they're safe to use alongside a long-running setup.

HTTP

Shell
localcan http 3000

Opens a tunnel to http://localhost:3000. LocalCan generates a random .local name (e.g. swift-falcon.local) and a Public URL on the LocalCan.dev domain.

If you have a custom domain verified for your account, pin the tunnel to it with --url (handy for OAuth callbacks and other URLs you can't change between runs):

Shell
localcan http 3000 --url preview.example.com

--url only accepts a custom domain you own — random *.localcan.dev subdomains can't be requested by name, the backend assigns them.

While the tunnel is open, the live display shows the connecting status, both URLs (local and Public), and incoming requests with timestamp, method, status, and path:

Text
Connecting tunnel to http://localhost:3000...
Forwarding swift-falcon.local → localhost:3000
Forwarding swift-falcon-12.localcan.dev → localhost:3000

Requests (Ctrl+C to stop):

15:04:21    GET 200  /
15:04:21    GET 200  /_next/static/css/app.css
15:04:23   POST 201  /api/orders

The request view holds the most recent ten and updates in place — no scrollback noise.

HTTPS

Shell
localcan https 8443

Same as http, but for local apps that already terminate TLS. LocalCan trusts your local server's certificate even if it's self-signed. The live display is identical to HTTP.

TCP

Shell
localcan tcp 5432

Opens a raw TCP tunnel — useful for databases, SSH, and other non-HTTP services. The Public URL takes the form tcp://*.localcan.dev:<port>. --url is not supported for TCP tunnels.

The live display shows active and total connection counts:

Text
Connections (Ctrl+C to stop):

  Active: 2    Total: 17

What gets created

Each invocation writes a temporary project file at ~/.localcan/projects/_quick_<scheme>_<port>_<random>.yml and tells the daemon to reload. When you Ctrl+C, the file is removed and the daemon reloads again.

If both the localcan quick-tunnel process and its daemon exit abnormally, the next quick-tunnel invocation spawns a fresh daemon and sweeps any leftover _quick_*.yml files. If only the quick-tunnel process exits but the daemon keeps running, the orphan file stays in projects/ until you remove it (or until the daemon is stopped and a new quick tunnel is run).

Because quick tunnels live in projects/, they show up in localcan projects ls and localcan tunnel ls while running.

When to use a saved project instead

Quick tunnels are great for one-offs. For anything you'll restart often — a permanent dev domain, a tunnel with custom headers, a setup with multiple services — write a YAML project file and use localcan reload. See Configuration → Projects.

© 2026 LocalCan™. All rights reserved.