Share a local development server with your team
Last validated:
When building a feature or fixing a bug, you often want a teammate to preview your work before it's deployed, without pushing to a staging environment. Tailscale Serve lets you expose a local development server to other members of your Tailscale network (known as a tailnet) over a secure HTTPS URL. No port forwarding, no tunneling service, and no public internet access required.
Tailscale Serve is only accessible to members of your tailnet. It does not expose your development server to the public internet. To share with someone outside your tailnet, refer to Tailscale Funnel.
-
Ensure you have MagicDNS and HTTPS certificates enabled on your tailnet. Both are required for Serve and are enabled by default for new tailnets.
-
Ensure your local development server is running and listening for requests.
-
Run the
tailscale servecommand, replacing3000with the port your development server is listening on:tailscale serve 3000Tailscale Serve proxies requests from your
*.ts.nethostname to your local port and automatically provisions a TLS certificate. The output shows the URL your teammates can use to access your development server:Available within your tailnet: https://my-device.tailnet-name.ts.net/ |-- proxy http://127.0.0.1:3000Your development server is now accessible to other tailnet members at that URL over HTTPS.
-
Copy the
https://*.ts.netURL from thetailscale serveoutput and share it with your teammate. As long as they are connected to your tailnet, they can open the URL in their browser and access your local development server.
Your teammate's Tailscale client must be running and connected for them to reach your *.ts.net hostname.
-
When you no longer want to share your development server, stop the Serve configuration:
tailscale serve --terminate-on 3000This removes the proxy and stops advertising your development server on the
*.ts.nethostname.Alternatively, you can stop serving all ports at once:
tailscale serve reset