I recently started using Raspberry Pi and I wanted to access it when I am outside of home as well. After trying out few solutions, I stumbled upon Tailscale1.
Tailscale is a mesh VPN that makes it easy to connect out devices, wherever they are. It is free for personal use and supports all major platforms like Linux, Windows, Mac, Android, iOS, etc.
I installed tailscale on Raspberry Pi using the following command.
$ curl -fsSL https://tailscale.com/install.sh | sh
Once the installation is done, I run
tailscale up to start the daemon. This opened a browser window and asked me to log in with email address. After I logged in, I can see all the devices in the tailscale dashboard.
tailscale has CLI tool as well and status can be viewed with the following command.
$ tailscale status 100.81.13.75 m1 avilpage@ macOS - 188.8.131.52 rpi1.tailscale.ts.net avilpage@ linux offline
I also set up a cron job to start tailscale daemon on boot.
$ crontab -e @reboot tailscale up
Now I can access the device from anywhere using the tailscale IP address. For example, if the IP address is
184.108.40.206. I can ssh into the device using the following command.
$ ssh firstname.lastname@example.org
It also provides DNS names for each device. For example, I can ssh into the device using the following command as well.
$ ssh email@example.com
Tailscale is a great tool to access devices remotely. It is easy to set up and works well with Raspberry Pi, Mac & Linux as well.