GuidesHosting choices

Open a localhost app running on a remote server

Your coding agent says the app runs on localhost:3000 on a server. Open it from your laptop or phone: SSH forwarding, Tailscale Serve, Funnel or a tunnel.

November 17, 2026The Everpod team
The short answer

When a coding agent on a remote server says “the app is running on http://localhost:3000”, that address means the server itself, not your laptop. From a laptop, forward the port over SSH and open http://localhost:3000 locally: ssh -N -L 3000:localhost:3000 you@server. From a phone, or without an SSH session, run tailscale serve 3000 on the server and open the https://….ts.net address it prints on any device in your tailnet. Only when someone off your network, or a webhook, has to reach it, use Tailscale Funnel or a Cloudflare quick tunnel, both of which put the app on the public internet.

Which route, by who has to reach it

SSH: forward the port to your laptop

Run this on your laptop, not on the server:

ssh -N -L 3000:localhost:3000 you@server
Copied

In OpenSSH’s manual, -L listens on the first port on your machine and, for each connection, opens one “from the remote machine” to the host and port after it. So the localhost in the middle is resolved on the server, which is exactly the address the agent reported. -N runs no remote command: “useful for just forwarding ports.” Leave it running and open http://localhost:3000 in your browser. If port 3000 is taken on your laptop, change the first number: -L 8080:localhost:3000 and open port 8080.

The server’s app sees a request for localhost, as it would on your own machine, so dev servers that refuse unknown host names (below) raise nothing on this route. If you are already in VS Code’s Remote - SSH, you may not need the command: its release notes describe it finding ports to forward automatically, in an SSH session by watching terminal output for them, and its SSH docs add “Forward a Port” in the Command Palette for the rest. Either way it lists them in the Ports view.

Tailscale Serve: one address for laptop and phone

With the server and your devices on the same tailnet (setting one up for an agent’s machine, and keeping the server from reaching back into your devices, is the Tailscale SSH guide), run on the server:

tailscale serve 3000
Copied

Tailscale’s Serve documentation shows what it prints when it works:

Available within your tailnet:

https://amelie-workstation.pango-lin.ts.net
|-- / proxy http://127.0.0.1:3000

Press Ctrl+C to exit.
Copied

That address, with your server’s name and your tailnet’s, opens the app over HTTPS from any device signed in to the tailnet, including the Tailscale app on a phone. Forwarding a port does not need root. A few things to know:

“Serve is not enabled on your tailnet”

Serve needs HTTPS certificates turned on for the tailnet. When the tailnet isn’t set up for it, the command doesn’t fail outright: in Tailscale’s source it prints the text and link that Tailscale’s coordination server returns, then waits. The wording reported in July 2026 was:

Serve is not enabled on your tailnet. To enable, visit: https://login.tailscale.com/f/serve?node=…

Follow the link and turn the feature on for the tailnet. The waiting command notices, prints “Success.” and carries on, so there is nothing to rerun.

Binding to 0.0.0.0, on a private network only

The other way is to make the dev server listen beyond the server’s loopback and open it by the Tailscale IP. Vite listens on localhost by default, and its docs say --host 0.0.0.0 or --host makes it “listen on all addresses, including LAN and public addresses.” That last word is the problem: on a server with a public IP and no firewall in front of it, every address includes the public one, and a dev server, with its debug pages and an agent’s half-finished work, is then on the internet. Give the private address instead:

npx vite --host $(tailscale ip -4)
Copied

and open http://100.x.y.z:5173, the IP that tailscale ip -4 printed, from a device in the tailnet. Next.js is the opposite case: its next dev and next start listen on 0.0.0.0 by default, so an app an agent started with npm run dev on a server whose ports are open is already reachable on the public IP, whatever the agent printed. next dev -H $(tailscale ip -4) holds it to the tailnet. Checking open ports on Linux shows how to read which address each process listens on.

When the dev server refuses the name

Opening a dev server by a name other than localhost, which is what a ts.net or trycloudflare.com address does, can meet a refusal from the dev server itself rather than from the network. Vite’s reads, in its source:

Blocked request. This host ("my-server.tailnet-name.ts.net") is not allowed. To allow this host, add "my-server.tailnet-name.ts.net" to `server.allowedHosts` in vite.config.js.

The host in quotes is the name Vite was asked for. Vite allows localhost, names under .localhost and any IP address by default, which is why the SSH route and the Tailscale IP pass and a name does not. Add the name to server.allowedHosts, or the whole tailnet with a leading dot:

// vite.config.js
export default {
  server: {
    allowedHosts: [".tailnet-name.ts.net"],
  },
};
Copied

Setting it to true allows every name, and Vite’s docs say that “allows any website to send requests to your dev server through DNS rebinding attacks.” Next.js has the same kind of guard for its development assets: it allows localhost and the name it was started with, and, in its docs’ words, “Any other hostname needs an entry, such as a tunnel used for remote development,” in allowedDevOrigins in next.config.js.

Public routes: Tailscale Funnel and Cloudflare’s quick tunnel

A webhook is the case the private routes cannot serve: Stripe, GitHub or a chat platform calling the app comes from the internet, not from your tailnet or your SSH session. So does showing the app to someone who isn’t on your tailnet. Both of these put the app where anyone with the address can reach it, so they suit a dev server only as long as you need them. Tailscale against Cloudflare Tunnel compares the two for a service you keep.

Tailscale Funnel

tailscale funnel 3000
Copied

The same ts.net address as Serve, but, in Tailscale’s words, “for anyone to access—even if they don’t use Tailscale.” Funnel listens only on ports 443, 8443 and 10000, has bandwidth limits you cannot change, and needs MagicDNS, HTTPS and a funnel node attribute in the tailnet policy file. The public DNS record can take up to 10 minutes to appear the first time. tailscale funnel reset takes it down.

Like Serve, the command first asks Tailscale for a link to turn the feature on. Where that route isn’t available, it falls back to a check whose messages are, in Tailscale’s source:

Funnel not available; "funnel" node attribute not set. See https://tailscale.com/s/no-funnel.

Funnel not available; HTTPS must be enabled. See https://tailscale.com/s/https.

The first means the policy file gives this device no funnel attribute; add a nodeAttrs entry granting it in the tailnet policy file. The second means the tailnet’s HTTPS certificates are off.

Cloudflare’s quick tunnel

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

Cloudflare’s quick tunnel needs no Cloudflare account or domain: it prints a temporary trycloudflare.com address, and “Anyone with the URL can access your local service.” Adding --allowed-mail you@example.com puts an email one-time code in front of it, which a browser can pass and a webhook cannot. As of November 2026 Cloudflare lists the limits: no uptime guarantee, 200 requests in flight before it answers 429, no Server-Sent Events, testing and development only, and a new address every time it starts. That last one matters for a webhook, whose registered address goes stale whenever the tunnel restarts, while Funnel’s address is the device’s own ts.net name.

Run Claude Code, Codex, OpenCode, Pi, Hermes or OpenClaw on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.