How to Install Tailscale on Linux (Zero-Config VPN for Your Homelab)
I have spent more hours than I care to admit configuring WireGuard tunnels by hand, generating key pairs, managing peer configs across devices, and debugging firewall rules when something stops working after a kernel update. Then I installed Tailscale, and it took two minutes. Two minutes to have my phone, my laptop, and every server in my homelab on the same private mesh network, routable from anywhere. Here is how to set it up and where the trade-offs are.
From the field: I use Tailscale alongside WireGuard in my setup. Tailscale handles the easy “access my stuff from anywhere” use case brilliantly — no port forwarding, no dynamic DNS, just install and connect. For more control, I still prefer raw WireGuard, but Tailscale is hard to beat for getting started.

What Tailscale Actually Is (and What It Is Not)
Tailscale is a mesh VPN built on top of WireGuard. Under the hood, every Tailscale connection is a WireGuard tunnel. But instead of you managing the key exchange, the peer discovery, the NAT traversal, and the routing tables yourself, Tailscale handles all of that through a coordination server.
Here is the important distinction: your traffic does not flow through Tailscale’s servers. The coordination server only handles authentication and key distribution. Actual data travels directly between your devices using WireGuard’s peer-to-peer encryption. If both devices are on the same LAN, traffic stays on the LAN. If they are across the internet, Tailscale punches through NAT and establishes a direct connection. Only when a direct path is impossible does traffic relay through Tailscale’s DERP servers, and even then it remains encrypted end-to-end.
What Tailscale gives you:
- Mesh networking — every device can reach every other device directly, not through a central gateway
- Zero configuration — no port forwarding, no firewall rules, no dynamic DNS
- MagicDNS — hostname resolution across your tailnet without running your own DNS
- Subnet routing — expose your entire LAN to your tailnet without installing Tailscale on every device
- Exit nodes — route all your internet traffic through a device you control
- ACLs — fine-grained access control over who can reach what
- SSO integration — sign in with Google, Microsoft, GitHub, or your own OIDC provider
What Tailscale is not: it is not fully self-hosted. Your devices authenticate against Tailscale’s coordination server. Your traffic is encrypted and peer-to-peer, but the control plane is theirs. If that bothers you, there is an open-source alternative called Headscale that replaces Tailscale’s coordination server with one you run yourself. I will cover that at the end. But for most homelabbers, Tailscale’s free tier is the pragmatic choice, and pragmatic beats pure every time.
Career Context: Mesh VPNs and zero-trust networking are reshaping enterprise infrastructure. Tailscale, Cloudflare Tunnel, and Zscaler are replacing traditional VPN concentrators in production environments. Understanding overlay networks, WireGuard, NAT traversal, and identity-based access control is directly relevant to Network Engineer, DevOps, and Platform Engineering roles. Running Tailscale on your homelab teaches you the concepts that enterprises are paying consultants to implement.
Prerequisites
You need:
- A Linux machine — Ubuntu, Debian, Fedora, Arch, or basically any mainstream distribution. This guide focuses on Ubuntu/Debian, but the process is nearly identical everywhere.
- A Tailscale account — free at
tailscale.com. The free tier gives you up to 100 devices and 3 users, which is more than enough for any homelab. - At least two devices to connect. Tailscale on one machine is pointless. Install it on your server and your laptop, or your server and your phone, so you can actually test the connectivity.
Pro tip: If you are running your homelab behind CGNAT (common with some ISPs, especially mobile broadband and certain fibre providers), Tailscale is your best friend. Traditional VPNs and port forwarding do not work behind CGNAT. Tailscale’s NAT traversal handles it transparently. I have used it on 4G connections where nothing else could establish an inbound tunnel.
Step 1: Install Tailscale
Tailscale provides an install script that adds their repository and installs the package for your distribution. On Ubuntu or Debian:
curl -fsSL https://tailscale.com/install.sh | sh
I know, piping a script to shell makes some people nervous, and they are not wrong to be cautious. If you prefer, you can add the repository manually:
# Add Tailscale's GPG key
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/noble.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
# Add the repository
curl -fsSL https://pkgs.tailscale.com/stable/ubuntu/noble.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
# Install
sudo apt update
sudo apt install tailscale -y
For other distributions, replace noble with your release codename or use the appropriate package manager commands from Tailscale’s documentation. On Fedora, it is a dnf install. On Arch, it is in the official repos.
Step 2: Connect to Your Tailnet
Once installed, bring the node up:
sudo tailscale up
This prints a URL. Open it in your browser, sign in with your Tailscale account, and authorise the device. That is it. The machine is now on your tailnet.
Verify the connection:
tailscale status
You will see your device listed with its Tailscale IP address (in the 100.x.x.x range). If you have other devices already on the tailnet, they will show up here too, and you can ping them immediately:
ping 100.x.x.x # Tailscale IP of another device
# or, with MagicDNS enabled:
ping my-laptop # hostname of the other device
No firewall rules. No port forwarding. No DNS configuration. It just works, which honestly feels suspicious the first time after years of hand-configuring VPNs.
Step 3: Enable MagicDNS
MagicDNS lets you reach devices by hostname instead of IP address. Instead of remembering that your server is 100.92.14.87, you just use plato or plato.tailnet-name.ts.net.
MagicDNS is enabled in the Tailscale admin console at login.tailscale.com/admin/dns. Toggle it on, and optionally add a custom search domain so you can use short hostnames without the full tailnet suffix.
Once enabled, every device on your tailnet can resolve every other device by name. This makes SSH, HTTP access, and service discovery dramatically simpler:
ssh teky@plato # instead of ssh [email protected]
curl http://forge:3001 # access Uptime Kuma by hostname
Pro tip: If you run Pi-hole or AdGuard Home for DNS-level ad blocking, you can configure Tailscale to use your Pi-hole as the DNS server for your tailnet. Go to the DNS settings in the admin console and add your Pi-hole’s Tailscale IP as a custom nameserver. Now every device on your tailnet gets ad blocking, even when you are away from home.
Step 4: Subnet Routing (Expose Your Whole LAN)
This is where Tailscale becomes essential for homelabbers. Subnet routing lets one Tailscale node act as a gateway to your entire local network. Instead of installing Tailscale on every device (your NAS, your printer, your IoT gadgets), you install it on one machine and advertise your LAN subnet.
On the machine that will act as the subnet router:
# Enable IP forwarding (required for routing)
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
# Advertise your LAN subnet
sudo tailscale up --advertise-routes=192.168.1.0/24
Replace 192.168.1.0/24 with your actual LAN subnet. You can advertise multiple subnets by separating them with commas.
After running this, go to the Tailscale admin console. The node will show pending subnet routes. You need to approve them manually (this is a security measure to prevent rogue devices from exposing networks). Click the node, find the route, and approve it.
Now, from any device on your tailnet, you can reach any device on your home LAN. Your phone on mobile data can hit your NAS at 192.168.1.100, your printer at 192.168.1.50, everything, without any of those devices having Tailscale installed.
Be thoughtful about what you expose. Subnet routing makes your entire LAN reachable from any tailnet device. If you share your tailnet with friends or family, they can reach those devices too unless you set up ACLs to restrict access. For a personal tailnet this is fine. If others have access, configure ACLs in the admin console to limit who can reach which subnets.
Step 5: Exit Nodes (Route All Traffic Through Your Server)
An exit node routes all of a device’s internet traffic through another device on your tailnet. Use cases: you are on public Wi-Fi and want to route through your home connection for security, or you are abroad and want to appear as if you are at home.
On the machine you want to use as an exit node (typically your home server):
sudo tailscale up --advertise-exit-node --advertise-routes=192.168.1.0/24
Approve the exit node in the admin console, same as with subnet routes.
On the client device (your laptop, your phone), tell it to use the exit node:
# On Linux
sudo tailscale up --exit-node=plato # hostname of your exit node
# To stop using the exit node
sudo tailscale up --exit-node=
On mobile apps, there is a toggle in the Tailscale app to select an exit node. On the desktop apps, it is in the system tray menu.
Tailscale vs Raw WireGuard: Convenience vs Control
I run both. Here is when I use each:
Tailscale wins when:
- You need to connect devices quickly without fiddling with configs
- You are behind CGNAT or complex NAT where port forwarding is impossible
- You want to share access with family members without teaching them VPN configuration
- You need mesh networking (every device talks to every device) rather than hub-and-spoke
- You want MagicDNS and automatic key rotation without managing it yourself
Raw WireGuard wins when:
- You want zero dependency on any third-party service, not even a coordination server
- You need maximum performance with no overhead from the Tailscale daemon
- You are connecting infrastructure where installing Tailscale is not practical (embedded devices, network equipment)
- You are running a site-to-site VPN between fixed locations with static IPs
- You want to understand what is happening at every layer (educational value)
For most homelabbers, Tailscale is the right starting point. You can always add raw WireGuard tunnels for specific use cases later. I use Tailscale for my daily device mesh and raw WireGuard for a couple of site-to-site links where I want deterministic routing without depending on Tailscale’s coordination server being reachable.
The Self-Hosting Honesty: Headscale
I would be doing this topic a disservice if I did not mention Headscale. It is an open-source, self-hosted implementation of the Tailscale coordination server. You run it on your own infrastructure, and your devices connect to your server instead of Tailscale’s.
Headscale gives you full sovereignty over the control plane. No Tailscale account needed, no reliance on their infrastructure, full control over authentication and ACLs. The trade-off is that you need to set it up and maintain it, and you lose some features like the polished admin UI and the seamless mobile app integration.
My honest advice: start with Tailscale. Learn the concepts, get comfortable with mesh networking, subnet routing, and ACLs. Once you outgrow the free tier or the third-party dependency genuinely bothers you, migrate to Headscale. The client is the same, the concepts are the same, and the migration is straightforward.
Troubleshooting
Tailscale Up Hangs or Fails to Authenticate
Check that your system clock is accurate. WireGuard key exchange is time-sensitive, and a clock that is more than a few minutes off will cause authentication failures. On systemd systems: timedatectl status should show NTP synchronised. If not: sudo timedatectl set-ntp true.
Subnet Routes Not Working
Three things to check. First, did you approve the routes in the admin console? They require manual approval. Second, is IP forwarding enabled? Run cat /proc/sys/net/ipv4/ip_forward and make sure it returns 1. Third, check if your firewall (iptables/nftables/ufw) is blocking forwarded traffic. On Ubuntu with ufw: sudo ufw route allow in on tailscale0.
Cannot Reach LAN Devices via Subnet Route
The subnet router can reach LAN devices, but can LAN devices route back? If the LAN device’s default gateway is your home router (which it almost certainly is), and the return traffic for 100.x.x.x addresses is not being routed to your Tailscale node, the packets go out to your router and get dropped. The fix: either make your Tailscale node the default gateway (complex) or enable masquerading so that traffic from the tailnet appears to come from the subnet router’s LAN IP:
sudo iptables -t nat -A POSTROUTING -o eth0 -s 100.64.0.0/10 -j MASQUERADE
Replace eth0 with your LAN interface name. To make this persistent, use iptables-persistent or add it to your network configuration.
Performance Slower Than Expected
Check whether traffic is going direct or through a DERP relay. Run tailscale netcheck to see latency to DERP servers and tailscale status to see connection types. If you see “relay” instead of “direct” for a peer, there is likely a NAT issue preventing hole-punching. This is common on symmetric NAT (some enterprise networks and mobile carriers). DERP relays are still encrypted and functional, just higher latency.
Tailscale Interferes with Docker Networking
This is a common one. By default, Tailscale’s routing can interfere with Docker bridge networks, especially if you are using subnet routing. If containers lose internet access after enabling Tailscale, add --accept-routes=false on the Docker host or configure iptables rules to ensure Docker bridge traffic is not routed through the Tailscale interface. The Tailscale docs have a specific section on Docker compatibility that is worth reading.
What to Set Up Next
Tailscale solves the “access your homelab from anywhere” problem. Now that you have reliable remote connectivity, here is what to build on top of it:
- Build Your First Homelab — if you set up Tailscale to access a single machine, this guide helps you expand it into a proper platform
- Uptime Kuma Monitoring — now that you can reach your homelab remotely, monitor it so you know when something breaks before you try to connect
- Self-Hosted Password Manager with Vaultwarden — Tailscale makes Vaultwarden accessible from anywhere without exposing it to the public internet, which is the ideal deployment
- Install Docker on Ubuntu 24.04 — the foundation for most self-hosted services you will run behind your Tailscale network
- DuckDNS Dynamic DNS — if you need public-facing services alongside your Tailscale mesh, DuckDNS handles the dynamic IP problem
- Jellyfin Media Server — stream your own media library anywhere. Tailscale gives you private access without opening ports to the internet
Tailscale is one of those tools that changes how you think about your network. Once every device is two minutes away from joining the mesh, you stop worrying about firewalls, port forwarding, and dynamic DNS for internal access. It is not a replacement for understanding networking fundamentals, but it is a force multiplier for getting things done.
Watch Out For This
Tailscale’s free tier has a device limit. If you are running a large homelab, you will hit it faster than you think. Check the current limits before committing your whole infrastructure.
Key Takeaways
- Tailscale is a mesh VPN built on WireGuard that handles key exchange, NAT traversal, and peer discovery automatically. Your traffic is encrypted and peer-to-peer.
- Installation is a one-liner on Linux, and connecting a device to your tailnet takes under two minutes. The free tier supports 100 devices and 3 users.
- Subnet routing is the killer feature for homelabbers — one Tailscale node exposes your entire LAN without installing anything on individual devices.
- Exit nodes let you route all traffic through a device you control, useful for security on public Wi-Fi or appearing to be at home when travelling.
- Tailscale is not fully self-hosted. The control plane runs on their servers. If that matters to you, Headscale is the open-source self-hosted alternative.
- For most homelabbers, the trade-off is worth it. Start with Tailscale for convenience, migrate to Headscale later if sovereignty becomes a priority.
Related Guides
If you found this useful, these guides continue the journey:
- How to Set Up WireGuard VPN on Ubuntu 24.04 — the manual approach for full control over your VPN tunnels
- What Is Zero Trust Network Access (ZTNA)? — understand how zero trust compares to mesh VPNs
- How to Build Your First Homelab in 2026 — the full picture for building your lab environment
- How to Install Nginx Proxy Manager with Docker — reverse proxy for services accessible via Tailscale
- SSH Essentials: Remote Administration — secure shell access complements VPN connectivity

ReadTheManual is run, written and curated by Eric Lonsdale.
Eric has over 20 years of professional experience in IT infrastructure, cloud architecture, and cybersecurity, but started with PCs long before that.
He built his first machine from parts bought off tables at the local college campus, hoping they worked. He learned on BBC Micros and Atari units in the early 90s, and has built almost every PC he’s used between 1995 and now.
From helpdesk to infrastructure architect, Eric has worked across enterprise datacentres, Azure environments, and security operations. He’s managed teams, trained engineers, and spent two decades solving the problems this site teaches you to solve.
ReadTheManual exists because Eric believes the best way to learn IT is to build things, break things, and actually read the manual. Every guide on this site runs on infrastructure he owns and maintains.
Enjoyed this guide?
New articles on Linux, homelab, cloud, and automation every 2 days. No spam, unsubscribe anytime.

