Tailscale Tunnel: Cloud VPS to Home Lab¶
A plain-English guide to connecting a cloud VPS and a home lab with Tailscale. It covers what the tunnel is, how to set it up, how to check on it, the extra features, safe lab-to-lab sharing, and giving lab apps real HTTPS domain names without exposing them to the internet.
PDF: Download this guide (PDF)
The short version
Think of it like a private, encrypted network cable between your cloud server and your home lab. You get it without opening a single port on your home router. Every device gets its own private address (like 100.64.0.20) and can only talk to the machines you allow.
All IPs, hostnames and domains here are examples (100.64.0.0/10, 192.168.10.0/24, 10.20.0.0/24, yourdomain.top).
1. What it is¶
Normally your cloud VPS and your home lab are strangers. The VPS sits on the public internet. Your lab hides behind your home router, and your ISP may also put it behind CGNAT. Getting them talking used to mean port forwarding, dynamic DNS and a hand-built VPN.
Tailscale installs a small agent on each machine. The agents build WireGuard encrypted tunnels outward to each other, so nothing has to come in through your router. Together they form your private network, called a tailnet. Each machine gets a stable 100.x.y.z address and a name.
2. The architecture¶

- Cloud VPS (
vps-cloud-01,100.64.0.10) runs Tailscale. It is now inside your private network. - Home router: nothing changes. No port forwards, no firewall holes. The tunnel only makes outbound connections.
- Lab gateway (
lab-gateway,100.64.0.20) runs Tailscale as a subnet router. It shares the whole192.168.10.0/24LAN, so the NAS, Proxmox and printers don't need Tailscale installed. - The control plane only swaps public keys and helps machines find each other. Your traffic is end-to-end encrypted. If a direct path is blocked, it goes through an encrypted DERP relay, which can't read it.
3. Setup, step by step (~20 minutes)¶
- Create the tailnet. Sign up at
login.tailscale.comwith a Google, Microsoft or GitHub account. The free Personal plan covers a home lab. -
Install on the cloud VPS.
curl -fsSL https://tailscale.com/install.sh | sh sudo tailscale up --ssh --hostname=vps-cloud-01 -
Install on the home lab gateway as a subnet router. Use any always-on Linux box: a mini PC, a Raspberry Pi, or an LXC/VM on Proxmox.
curl -fsSL https://tailscale.com/install.sh | sh echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf sudo sysctl -p /etc/sysctl.d/99-tailscale.conf sudo tailscale up --ssh --hostname=lab-gateway --advertise-routes=192.168.10.0/24 -
Approve it in the Admin Console.
- Machines →
lab-gateway→ Edit route settings → tick192.168.10.0/24. - On both servers, open ⋯ → Disable key expiry.
- Linux machines that should use the route run
sudo tailscale set --accept-routes. Windows, Mac and phones accept routes automatically.
- Machines →
- Optional: headless installs with an auth key. Go to Settings → Keys → generate a tagged, pre-approved key, then run
sudo tailscale up --auth-key=tskey-auth-XXXXXXXX --advertise-tags=tag:server. -
Test it from the VPS.
tailscale ping lab-gateway # reach the gateway over the tunnel ping -c3 192.168.10.20 # reach the NAS behind it (subnet route)
4. Checking on it: health cheat sheet¶
| Command | What it tells you | Healthy looks like |
|---|---|---|
tailscale status |
Every machine, its 100.x IP, online or offline | Peers listed with no offline flag |
tailscale ping <host> |
Whether the connection is direct or relayed | via 203.0.113.7:41641 is direct. via DERP(nyc) is relayed but works |
tailscale netcheck |
NAT type, UDP access, nearest relay | UDP: true, low DERP latency |
systemctl status tailscaled |
Whether the service is running | active (running), enabled |
tailscale ip -4 |
This node's tailnet address | A 100.x.y.z address |
journalctl -u tailscaled -n50 |
Recent logs | No repeating errors |
tailscale version / tailscale update |
Client version, and a one-command upgrade | Within a release or two of the newest |
Admin Console checks (about once a month):
- Servers show Connected and Expiry disabled.
- Subnet routes are approved.
- No health or update warnings are showing.
- Unknown devices and old auth keys are removed.
Quick fixes:
- Node offline:
sudo systemctl restart tailscaled, thensudo tailscale up. - Can reach the gateway but not the LAN: the route isn't approved, IP forwarding is off, or the client is missing
--accept-routes. - Always relayed: strict NAT or blocked UDP. It still works. Allowing outbound UDP 41641 usually gets you a direct connection.
5. Bells and whistles¶
| Feature | What it does |
|---|---|
| WireGuard encryption | Modern end-to-end encryption. Keys never leave your devices |
| Zero open ports | Outbound-only connections. Works behind CGNAT, hotel Wi-Fi and 5G |
| Direct P2P + DERP fallback | NAT traversal finds a direct path. Encrypted relays cover the rest |
| MagicDNS | Use names instead of IPs (ssh vps-cloud-01) |
| Subnet routers | One node shares a whole LAN, so no agent is needed on each device |
| Exit nodes | Send internet traffic through the VPS or home: tailscale set --exit-node=vps-cloud-01 |
| Tailscale SSH | --ssh replaces SSH keys with identity plus ACLs |
| ACLs / Grants | Default-deny policy that controls access down to the port |
| Serve | tailscale serve 3000 gives a local app a tailnet-only HTTPS URL |
| Funnel | tailscale funnel 443 makes one service public. Use with care, and never for admin panels |
| Key expiry and auth keys | Disable expiry on servers. Use tagged auth keys for automation |
6. Lab-to-lab sharing, and why it's safe¶
A lab-to-lab tunnel lets Lab A and Lab B use a few of each other's things, like a NAS share, a Grafana dashboard or a GPU box running AI. The two home networks are not merged.
| Option | How | Best for |
|---|---|---|
| A. Node sharing | Machines → ⋯ → Share… → send the invite. The shared machine is quarantined: it can answer requests, but it can't start connections into the other tailnet | Sharing one or two servers |
| B. One tailnet + tags | Both gateways are tagged (tag:lab-a, tag:lab-b). Grants allow only specific hosts and ports |
Ongoing collaboration |
{
"tagOwners": { "tag:lab-a": ["autogroup:admin"], "tag:lab-b": ["autogroup:admin"] },
"grants": [
{ "src": ["tag:lab-b"], "dst": ["192.168.10.20"], "ip": ["tcp:445"] },
{ "src": ["tag:lab-b"], "dst": ["192.168.10.40"], "ip": ["tcp:3000"] }
]
}
Anything not listed is denied, including router admin, family PCs and cameras.
- Default-deny: nothing is reachable until you list it.
- Every packet is encrypted and checked against your policy.
- Share specific hosts and ports, never a whole
/24. Keep the two labs' LAN ranges different. - You can revoke access in one click. Review the policy together every quarter.
7. Real domain names for lab apps¶
You can give lab services real names under a domain you own, like *.lab.yourdomain.top. Those names only resolve inside your tailnet. A reverse proxy serves them with a real, trusted HTTPS certificate, and none of it is exposed to the public internet.

Why do it:
- Real HTTPS, no warnings. A trusted Let's Encrypt cert means no "Not secure" pages.
- Memorable URLs.
grafana.lab.yourdomain.topinstead of192.168.10.40:3000. - One front door, many apps. A single reverse proxy routes every name.
- Easy moves. If an IP changes, edit one proxy line. The URL stays the same.
- Private by design. It works on every tailnet device, and nothing is published to the internet.
8. Domain setup and best practices¶
- Pick a dedicated subdomain. Use
lab.yourdomain.topfor internal names only, with no public A records. - Run a private resolver and point Split DNS at it. In AdGuard Home or Pi-hole, add the rewrite
*.lab.yourdomain.top → 100.64.0.20. Then go to Tailscale Admin → DNS → Add nameserver → Custom, enter100.64.0.20, tick Restrict to domain and enterlab.yourdomain.top. -
Reverse proxy with a DNS-01 wildcard cert. Caddy example (build it with your DNS provider's plugin, e.g.
xcaddy build --with github.com/caddy-dns/cloudflare):*.lab.yourdomain.top { bind 100.64.0.20 tls { dns cloudflare {env.DNS_API_TOKEN} } @grafana host grafana.lab.yourdomain.top handle @grafana { reverse_proxy 192.168.10.40:3000 } handle { respond "Unknown lab app" 404 } }Nginx Proxy Manager (SSL → DNS Challenge) and Traefik (
dnsChallenge) do the same job. -
Test from any tailnet device:
nslookup grafana.lab.yourdomain.topshould return100.64.0.20, andcurl -I https://grafana.lab.yourdomain.topshould return 200 with a valid cert.
Best-practice checklist:
- Use a dedicated
*.lab.subdomain. - Use DNS-01 with a wildcard cert, so individual app names don't show up in public cert logs. Ports 80 and 443 never open.
- Give the DNS API token access to one zone, with edit-DNS permission only.
- Use Tailscale Split DNS or a local Pi-hole, AdGuard or Unbound resolver.
- Bind the proxy to the tailnet IP, not
0.0.0.0. - Never expose admin panels (Proxmox, router, NAS) publicly.
- Keep public DNS clean: no internal records.
- Back up the proxy config and resolver rewrites.
No domain yet?
MagicDNS names like grafana.your-tailnet.ts.net plus tailscale cert also give real HTTPS inside the tailnet.