Tailscale creates a private network among your devices: your phone, laptop and home Raspberry Pi see each other as if on the same network, wherever you are. No ports to open on the router and no public IP needed, so it works even behind CG-NAT. In this guide we install it on the Pi and use it to reach the whole home network.
In short
- Tailscale is a mesh VPN based on WireGuard: modern encryption, almost zero configuration.
- You open no ports on the router and it works even if your provider uses CG-NAT.
- It installs with one command and turns on with
sudo tailscale up.- With a subnet router, the Pi gives you access to the whole home network: printer, NAS, cameras.
- The Personal plan is free for home use; the coordination server belongs to the company.
How does it work?
In a classic VPN, your phone connects to an open port on your home router. Tailscale does it the other way round: each device reaches out to a coordination server, which only serves to exchange keys and know where each one is.
Then devices connect directly to each other through an encrypted WireGuard tunnel. If the network does not allow a direct connection, traffic goes through relay servers (DERP), still end-to-end encrypted: the relay cannot read it.
Each device gets a private IP in the 100.x.y.z range that does not change, and a name thanks to MagicDNS, for example raspberrypi.

Tailscale or WireGuard with PiVPN
We already explained how to set up your own WireGuard VPN with PiVPN. Both use the same encryption but are set up very differently:
| Tailscale | WireGuard with PiVPN | |
|---|---|---|
| Open a router port | No | Yes (UDP 51820) |
| Works behind CG-NAT | Yes | No, without public IP |
| Dynamic DNS | Not needed | Needed if your IP changes |
| External account | Yes, to sign in | No |
| Full control | Coordination server is the company’s | Everything on your Raspberry Pi |
| Add a device | Install app and sign in | Generate config and QR |
If your provider uses CG-NAT or you do not want to touch the router, Tailscale is the simplest. If you prefer not to depend on any external service, plain WireGuard. To understand why opening ports has risks, read NAT and opening ports on your router.

Step 1: create the account
Go to the Tailscale website and sign up with a Google, Microsoft, GitHub or Apple account, among others. Tailscale keeps no passwords of its own: it uses those providers’ sign-in.
The Personal plan is free, with user and device limits more than enough for a home. Check current limits on their pricing page.
Step 2: install Tailscale on the Raspberry Pi
Connect to the Pi over SSH (if you do not know how, enable SSH without monitor or keyboard) and run the official script, which adds their repository and installs the package:
curl -fsSL https://tailscale.com/install.sh | sh
Then connect the Pi to your network:
sudo tailscale up
The command shows a link. Open it in your computer’s browser, sign in and authorize the device. Check the assigned IP:
tailscale ip -4
tailscale status
Step 3: install the app on phone and laptop
Install Tailscale on your other devices (there are apps for Android, iOS, Windows, macOS and Linux) and sign in with the same account. From then on, the phone can reach the Pi even on mobile data:
ssh pi@raspberrypi
Or open its web services by name, for example http://raspberrypi:8080 if you run Nextcloud on the Raspberry Pi.
Step 4: disable key expiry
For security, devices must sign in again periodically. On a phone it is no bother, but on a home server it is: if the key expires while you are away, you lose access.
In the web admin console, in the machine list, open the Raspberry Pi’s menu and choose Disable key expiry. Only do it for devices you control.
Step 5: access the whole home network (subnet router)
So far you reach the Pi, but not the printer or NAS, which have no Tailscale. The solution is to make the Pi a subnet router: it advertises the home network and forwards traffic.
- Enable packet forwarding in the system:
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 local network (change the range to yours; if unsure, use the subnet calculator):
sudo tailscale set --advertise-routes=192.168.1.0/24
- In the admin console, open the machine, go to Edit route settings and approve the route.
Phones use it automatically. On Linux clients you must accept it with sudo tailscale set --accept-routes.

Handy extras
| Feature | Command on the Pi | Purpose |
|---|---|---|
| Exit node | sudo tailscale set --advertise-exit-node | Browse from public Wi-Fi exiting through your home connection |
| Tailscale SSH | sudo tailscale set --ssh | SSH in authenticated with your account, without managing keys |
| Status | tailscale status | See which devices are connected |
| Diagnostics | tailscale netcheck | Know whether the connection is direct or relayed |
The exit node must also be approved in the console, then selected in the phone app when needed.
Block ads away from home with Pi-hole
If you run Pi-hole on the Raspberry Pi, you can use it on your phone anywhere:
- In the Tailscale console, DNS section, add the Pi’s
100.x.y.zIP as nameserver and enable Override DNS servers. - In Pi-hole, allow queries from other networks in the DNS interface settings, because requests arrive through the Tailscale interface.
- On the Pi itself, run
sudo tailscale set --accept-dns=falseso it does not query itself in a loop.
Frequently asked questions
Can Tailscale see my data? No. Traffic is end-to-end encrypted with WireGuard and private keys never leave your devices. What the company does know is which devices you have and when they connect.
Is there an alternative without the company? Yes: Headscale, an open source coordination server compatible with Tailscale clients. It needs a server reachable from the internet, so it is more complex. If you want full independence, WireGuard with PiVPN is more direct.
Does it work with Docker? Yes. You can install it on the system, as here, and reach all containers by their ports. There is also an official image to use it inside Docker, useful in advanced setups.
Does it tax the Raspberry Pi? No. With no traffic it barely uses CPU, and WireGuard is very efficient even on old models.



