Guides

Expose localhost to the internet and share a dev server

Free during the beta with a registered account and an API key.

Get a tunnel URL

Your app runs on localhost:5173, and someone else needs to see it: a teammate reviewing a branch, a client approving a design, or your own phone. Port forwarding is often impossible on home, office and carrier networks, and deploying a preview for every change is slow. A tunnel gives the local server a public https URL for as long as you keep the client running.

1. Start your dev server

Run it the way you normally do, for example npm run dev. Note the port it prints: 5173 for Vite, 3000 for Next.js and many Node servers, 8000 for Django.

2. Open a tunnel to that port

Create an API key on your account page, then run this. Nothing needs to be installed first: it fetches a small native client for your OS and checks it against a pinned SHA-256.

(curl -fsSL https://revsheller.com/tn.sh || wget -qO- https://revsheller.com/tn.sh) | RSH_API_KEY=rsh_YOUR_KEY sh -s -- http 5173

On Windows PowerShell:

$env:RSH_API_KEY="rsh_YOUR_KEY"; & ([scriptblock]::Create((irm https://revsheller.com/tn.ps1))) http 5173

To skip the key next time, leave RSH_API_KEY unset and add --save: the client asks for the key on the terminal, with input hidden, and stores it in ~/.config/revsheller/config.json.

3. Share the URL

The client prints a URL like https://tn-k3v9q2m7xa.revshell.org and a log line for each request. Send it to whoever needs it. The first time a browser opens it, they see a short warning page that names the host. After they click Continue, that browser remembers it for 7 days.

Dev servers and the Host header

Vite, webpack-dev-server and other dev servers reject requests whose Host header they don't recognize. The client handles this by default: it sends Host: localhost:<port> to your server, so nothing needs configuring. The public hostname arrives in X-Forwarded-Host, with X-Forwarded-Proto: https and the visitor's IP in X-Forwarded-For.

If your app builds absolute URLs or redirects from the Host header, run with --host-header preserve so it sees the public hostname. Then add that hostname to your dev server's allowed hosts (in Vite, server.allowedHosts).

Hot reload and WebSockets

WebSocket upgrades are forwarded, so live reload and socket-based features can work through the tunnel. If the page loads but hot reload doesn't connect, your dev server's HMR client is probably pointed at localhost. Check its HMR host and port settings. During the beta, each tunnel allows 20 open visitor WebSockets, with messages up to 1 MiB.

Testing on a phone

Open the tunnel URL on the phone, over Wi-Fi or mobile data. Because the URL is https, features that need a secure context, such as service workers, behave as they will in production. Plain http://192.168.x.x:5173 on your LAN doesn't give you that.

Not on 127.0.0.1?

The client forwards to 127.0.0.1 by default. If your server listens somewhere else, such as only on IPv6, inside a VM, or on another machine on your LAN, pass --host, for example --host localhost or --host 192.168.1.20.

Who can see it

Stopping

Press Ctrl-C. The client deletes the tunnel and the URL stops serving immediately. Random URLs are never reused, so an old link can't later point at someone else's app.

Limits during the beta

2 tunnels at a time, 10 GiB of traffic a month, up to 8 hours per tunnel, 600 requests a minute and 100 concurrent requests per tunnel, and request bodies up to 25 MB. If a tunnel reaches 8 hours, the client opens a new one with a new URL. See pricing for the planned limits per plan.

FAQ

Who can open my tunnel?
Anyone with the URL. Use your app's own login for anything private.

Why does my dev server reject the request?
With the default Host rewrite it shouldn't. If you use --host-header preserve, add the tunnel hostname to the allowed hosts.

Does hot reload work?
WebSockets are forwarded, so it can. Check the HMR host settings if it doesn't connect.

What do visitors see first?
A short warning page naming the tunnel host, once per tunnel every 7 days.