Tailscale Serve and Funnel: commands, ports and the difference
tailscale serve shares a local app on your tailnet over HTTPS; tailscale funnel makes it public. The commands, --bg, ports 443/8443/10000, and the policy setting.
Tailscale Serve puts a service running on one machine at an HTTPS address, https://<machine>.<tailnet>.ts.net, that only devices on your tailnet can open: tailscale serve --bg 3000. Tailscale Funnel puts the same address on the public internet, for anyone who has it: tailscale funnel --bg 3000, on port 443, 8443 or 10000 only. Both need MagicDNS and HTTPS certificates turned on for the tailnet; Funnel also needs a funnel node attribute in the policy file, which the CLI sees to the first time you run it. tailscale serve status shows what is running and tailscale serve reset clears it. Over Funnel, Tailscale no longer stands between the internet and your app, so the app has to do its own login.
Serve and Funnel side by side
As of November 2026 (Tailscale v1.104.7), from Tailscale’s Serve docs and its Funnel docs:
- Who can open it. Serve: devices on your tailnet that your access rules let reach the machine, plus people you have shared the machine with. Funnel: anyone on the internet with the address, and your tailnet too.
- Ports. Serve listens on whatever port you give
--httpsor--http(443 by default). Funnel only on 443, 8443 and 10000. - Who the app sees. Serve adds
Tailscale-User-Login,Tailscale-User-NameandTailscale-User-Profile-Picheaders naming the person connecting. Over Funnel, in Tailscale’s words, “Funnel traffic, which is publicly available, does not include identity headers.” - The path. Serve traffic goes device to device inside the tailnet. Funnel’s public DNS points at a Tailscale relay, which passes the encrypted connection to your machine; the machine terminates TLS, so the relay cannot read it, and the machine’s own IP is never published.
- Status. Funnel is “currently in beta” and “available for all plans,” with “non-configurable bandwidth limits” whose size Tailscale does not publish.
One port cannot be both: whichever of serve or funnel you ran last on it decides whether it is private or public. Both commands changed shape in client 1.52, so a tutorial written for an older client may show syntax the current CLI does not take; the commands below are the current ones.
What has to be on in the tailnet
MagicDNS and HTTPS certificates, for both. In the admin console, open the DNS page, turn on MagicDNS if it is off, and under HTTPS Certificates select Enable HTTPS. Read the acknowledgement before you click it: Tailscale’s HTTPS page says your machine names and your tailnet’s DNS name “will be published on a public ledger,” the Certificate Transparency logs every public certificate goes into, and “Do not enable the HTTPS feature if any of your machine names contain sensitive information.” A machine called client-acme-staging is worth renaming first. If you run Serve before HTTPS is on, it prints a link to turn it on and waits, as described in opening a localhost app on a remote server.
The funnel node attribute, for Funnel only. The Funnel docs say that if you enable Funnel from the CLI, “Tailscale ensures this requirement is met.” Or, in the admin console’s Access controls page, expand Funnel and select Add Funnel to policy. Either way the entry Tailscale writes lets every member use Funnel on their devices:
"nodeAttrs": [
{
"target": ["autogroup:member"],
"attr": ["funnel"],
},
],CopiedThat is broader than most people need. The policy file reference lets target name a tag, a user, a group or *, so to allow Funnel on one tagged server and nowhere else, replace the target with that server’s tag, for example "target": ["tag:agent-server"]. Tagging a server you run an AI agent on, and why its default access is wrong, is the Tailscale SSH guide for an agent server.
Funnel also needs client 1.38.3 or later, works only for names under your tailnet’s ts.net domain and only over TLS, and on a Mac needs the open source variant of the client.
The Serve commands
From the tailscale serve reference:
tailscale serve 3000 # foreground; Ctrl+C stops it
tailscale serve --bg 3000 # background; survives reboots
tailscale serve --bg --https=8443 5173 # a second app on port 8443
tailscale serve --bg --set-path=/api 8080 # a second app under /api
tailscale serve --bg https+insecure://localhost:8443 # backend with a self-signed cert
sudo tailscale serve --bg /srv/site # a directory (needs root)
tailscale serve status # what is served, and where
tailscale serve --https=8443 off # remove one entry
tailscale serve reset # remove everythingCopied- The target. A bare port means
http://127.0.0.1:<port>, and “only http://127.0.0.1 is supported for proxies,” so the app has to run on the same machine. It can also be a Unix socket (unix:/var/run/myservice.sock), an absolute path to a file or directory, ortext:"..."for a quick test. Forwarding a port needs no root; serving a file or directory does. --bgis persistent. It says it is running in the background, prints the exactoffcommand that undoes it, then keeps serving through reboots andtailscale down/upuntil you turn it off. Without it, Serve ends with your shell, and, per the reference, after a reboot or restart “you must restart Serve manually.”- Turning one entry off means repeating the original command’s flags and adding
off; the target can be left out. HTTPS on 443 is the default, sotailscale serve --https=443 offremoves a plaintailscale serve --bg 3000, and with a path,tailscale serve --https=443 --set-path=/api off. - Plain HTTP inside the tailnet is
--http=80, for a client that cannot do HTTPS. The other flags,--tcp,--tls-terminated-tcpand--service(a Tailscale Service on its own virtual IP), are for forwarding raw TCP and for Tailscale Services; a dev server needs none of them.
The Funnel commands
tailscale funnel takes the same targets and the flags --bg, --https, --set-path, --tcp, --tls-terminated-tcp, --proxy-protocol and --yes, with no --http or --service, and prints “Available on the internet:” above the address instead of “Available within your tailnet:”.
tailscale funnel --bg 3000 # public on 443
tailscale funnel --bg --https=8443 5173 # public on 8443
tailscale funnel status # what is public now
tailscale funnel --https=443 off # take one down
tailscale funnel reset # take all of it downCopiedAny port other than 443, 8443 or 10000 is refused, for HTTPS and for the TCP forwarders alike. The first time, the public DNS record for the name “can take up to 10 minutes to show up,” so a browser that says the name does not exist in the first minutes is usually just early. Funnel’s certificates come from Let’s Encrypt, and the Funnel docs warn that frequent certificate requests can hit Let’s Encrypt’s rate limits, which then block retries for a while.
Opening an agent’s web UI or a dev server from your phone
This is what Serve is best at. A coding agent on a cloud server starts a dev server on localhost:5173, or an agent with a web interface listens on a local port; install the Tailscale app on your phone, sign it in to the same tailnet, and on the server run:
tailscale serve --bg 5173CopiedThen open the ts.net address it prints in the phone’s browser. It is a real HTTPS certificate, so the phone shows no warning, and the same address works from your laptop. The app can keep listening on 127.0.0.1, which is safer than binding it to every address, and --bg means the address still works tomorrow without anyone starting it again. Two things commonly get in the way:
- The dev server refuses the name. Vite and Next.js block development requests for host names they don’t know, and a
ts.netname is one. The messages, and theallowedHostsandallowedDevOriginssettings that fix them, are in the localhost guide. - The agent has its own setting for this. OpenClaw’s gateway can run Serve itself: its docs give
gateway.tailscale.modethe valuesserve,funnelandoff, keep the gateway bound to loopback while Tailscale provides HTTPS, and, as of November 2026, refuse Funnel mode unless the gateway’s auth mode ispassword. Why the gateway should not be public at all is never put your OpenClaw gateway on the internet. OpenCode’s web interface has its own pairing links, covered in OpenCode on a remote server.
Funnel is the wrong tool for this. Your phone is already on the tailnet, so Funnel only adds everyone else.
What changes when it is public
Under Serve, Tailscale has already decided who may connect: the device is signed in to your tailnet and your access rules allow it, and the identity headers tell the app which person it is. Under Funnel neither is true. The request comes from anyone, with no identity headers, and whatever the app does with an unauthenticated request is what the internet gets. For an agent’s interface that can mean a shell on the server with your model key attached. So before tailscale funnel:
- The app needs its own login, a real one, not a check that trusts the
Tailscale-User-*headers, since a Funnel request carries none. Funnel suits what is meant to be reached from outside: a webhook endpoint for Stripe, GitHub or a chat platform, a demo for someone without Tailscale, a small public site. For a service you keep public with a login in front of it, Tailscale against Cloudflare Tunnel compares the options. - Keep the app on localhost even under Serve. Tailscale strips identity headers a client sends and sets its own, but only on requests that come through Serve. Its docs warn that if the app also listens elsewhere, “any user that can call your service directly (rather than with the Serve URL) could trivially provide their own values for these HTTP headers.” Also, the headers are “not populated for traffic originating from tagged devices,” so an app that relies on them sees no user for a request from a tagged server.
- Check what is still public. A
--bgFunnel set up for an afternoon’s demo is still there after the next reboot.tailscale funnel statuson the machine lists it;tailscale funnel resetends it.