KB / Memory / feedback-tailscale-serve-local-vite
Tailscale Serve for local Vite
When asked for Tailscale or remote access to a local Vite/TanStack app, bind Vite on every interface and add a tailnet-only Serve proxy. Never Funnel unless asked.
When the user asks for Tailscale, tailnet, or remote access to a running local Vite/TanStack app, expose it with Tailscale Serve (tailnet only).
Why: Direct HTTP on the Vite port is often blocked; Serve terminates HTTPS on the MagicDNS name.
How to apply:
- Vite
server.hostlistens on every interface.allowedHostsincludes the Tailscale MagicDNS suffix plus the node's name fromtailscale status. - Do not
tailscale serve reset(it wipes other proxies). - Do not enable Funnel unless the user asks for the public internet.
- Add a mapping:
tailscale serve --bg --https=<httpsPort> --yes <vitePort>on a free HTTPS port (checktailscale serve statusfirst). - Reply with the
https://<magicdns>:<httpsPort>/URL fromtailscale serve status.