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.

feedback
feedbackworkflowtoolinginfra
raw .md

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:

  1. Vite server.host listens on every interface. allowedHosts includes the Tailscale MagicDNS suffix plus the node's name from tailscale status.
  2. Do not tailscale serve reset (it wipes other proxies).
  3. Do not enable Funnel unless the user asks for the public internet.
  4. Add a mapping: tailscale serve --bg --https=<httpsPort> --yes <vitePort> on a free HTTPS port (check tailscale serve status first).
  5. Reply with the https://<magicdns>:<httpsPort>/ URL from tailscale serve status.