⭐ Core project · #2

🌐 Private website on your tailnet

Run a small website at https://your-server.tail-abc.ts.net, reachable by you and anyone you invite to your tailnet. Real cert, real HTTPS, zero DNS or port-forwarding.

⭐ Core Self-Hosted Beginner ~45 min Prereqs: M3 + M4L3 (Serve)

Why this project

Hosting a small internal website used to be a multi-day project: own a domain, configure DNS, get a TLS cert, set up port forwarding, manage cert renewals. With Tailscale Serve it's literally one command, and the site is private to your tailnet by default.

You'll use Serve for the first time. The service we expose is just python -m http.server, but the pattern is identical for any web app you'll ever host — Jellyfin, Home Assistant, your own React app, whatever.

Who this helps

What you get

CLIENTS EDGE HOST 📱 phone 💻 your laptop 💻 friend's laptop 🔒 Tailscale Serve · Let's Encrypt cert https://your-server.tail-abc.ts.net 🖥️ home-server python http.server / Caddy / nginx · port 8080 ⛔ public internet

All clients on the tailnet hit the same HTTPS hostname. Tailscale Serve handles cert + reverse-proxy. The non-tailnet world is firewalled out by default.

Prerequisites

Steps

Pick a server and a directory ~1 min

This works on any tailnet device, but a Linux/macOS box is easiest. The home server you set up in M3L6 is perfect.

SSH in and make a directory for the site:

ssh you@home-server
mkdir -p ~/my-site
cd ~/my-site
echo "<h1>Hello, tailnet</h1>" > index.html

Run a web server ~1 min

Python's built-in is fine for testing:

python3 -m http.server 8080

Leave that running in this terminal. It's now serving ~/my-site on port 8080.

For production-style serving (auto-restart, multiple sites), use Caddy or nginx. We'll keep this simple — the Tailscale part is the same regardless of what's serving the bytes.

Confirm HTTPS certs are enabled ~1 min

Admin console → DNS → make sure HTTPS Certificates is on. (You enabled MagicDNS in M3L1; certs is the next toggle below.)

Tailscale Serve ~2 min

In another terminal SSH session to the same machine:

sudo tailscale serve --bg https http://localhost:8080

Output tells you the URL — something like https://home-server.tail-abc.ts.net.

What just happened: Tailscale grabbed a Let's Encrypt cert for home-server.tail-abc.ts.net, set up an HTTPS reverse proxy, and routed traffic to your local http://localhost:8080. Visible to everyone on your tailnet, invisible to everyone else.

Visit it ~1 min

From your laptop's browser, navigate to https://home-server.tail-abc.ts.net (use your actual hostname).

You should see "Hello, tailnet" with a green padlock. Notice: valid HTTPS, no certificate warning, no port number, served from your home server.

Try from your phone (also on the tailnet). Same thing.

Check the serve config ~1 min

sudo tailscale serve status

Shows what's currently published. Useful if you forget what you set up.

Make it survive reboots ~5 min

The Python server we used dies when you close the terminal. For real use, run a proper web server (Caddy, nginx) as a systemd service. The Tailscale Serve config persists across reboots automatically.

Quick Caddy example for a static site:

sudo apt install caddy
sudo tee /etc/caddy/Caddyfile <<EOF
:8080 {
  root * /home/you/my-site
  file_server
}
EOF
sudo systemctl restart caddy

Now your site is served by Caddy, restart-resilient, and Tailscale Serve continues to expose it.

Verify

Common issues

Variations

Where this leads