Tailscale is your own personal VPN that opens up a lot of possibilities. A private VPN gives you access to all your devices even when you’re not connected to the same local network. Tailscale gives your device a “static” IP that you can use to connect to it from anywhere. This lets you set up applications like Nextcloud or Pi-hole on a PC on your local network and access it externally safely and without any complicated router configs, opening ports, DNS setup, etc. Along with a static IP, you can also optionally set up a hostname for your device that gives you access to your device using a hostname instead of an IP, i.e, you can access your computer with http://my-home-pc
instead of http://100.x.x.x
.
This post assumes that you’ve installed WSL2 with Ubuntu. For other distros, the Tailscale set up instructions are similar and download repo and instructions can be found on the Tailscale website.
Install Tailscale on WSL2
- If you haven’t already, install WSL2 (Ubuntu) on Windows
- Sign-up for Tailscale
- Install Tailscale on WSL2 Ubuntu using the instructions from the Download Tailscale page.
- After installation run
sudo tailscaled
- Run
sudo tailscale up
- Open the authentication link in your browser and confirm login
- You can get your Tailscale IP using
tailscale ip -4
- Tailscale is now running
Tailscale cannot run as a service when installed in WSL2, so you will need to run sudo tailscaled
and sudo tailscale up
when you restart WSL2 or your PC.
Troubleshooting
- After installing Tailscale, WSL2 may have issues resolving DNS. So you may encounter issues where if you try to
ssh user@example.com
in WSL2, you will be unable to connect when previously you could. This is because Tailscale changes theresolv.conf
in your WSL2. You can fix this using the instructions in this gist: Fix WSL2 DNS Resolution.
This post is part of series about using Tailscale & WSL2 for Nextcloud and Pi-hole. See the other posts:
Leave a Reply