Tailscale VPN Setup on Raspberry Pi: Secure Home Networking
I work on several coding projects at home, and there are plenty of times when I need to access them while I’m away. That sounds simple, but connecting back to your home network securely can quickly become more complicated than expected. Tailscale offers a much easier way to link your devices without dealing with a traditional VPN setup.
Tailscale is a zero-configuration mesh VPN service that helps access a remote network. It can be installed on Raspberry Pi with a few simple commands and allows one-click connectivity for personal devices running the Tailscale application.
This tutorial will walk you through installing and configuring Tailscale on your Raspberry Pi. Then, I will also show you how to add your first device to the Tailscale VPN and test this newly established connectivity. But first, let’s start with a refresher on VPN and Tailscale.
If you’re new to Raspberry Pi or Linux, I’ve got something that can help you right away!
Download my free Linux commands cheat sheet – it’s a quick reference guide with all the essential commands you’ll need to get things done on your Raspberry Pi. Click here to get it for free!
Tailscale: An Introduction

Tailscale is a VPN service based on the WireGuard VPN protocol (check out the linked article to know more about what that is). One thing you will notice in that article is there’s a lot of setup needed to start a VPN on your Pi (managing config files, setting up security, etc.).
This is where Tailscale helps you, it makes these config steps easy by configuring everything for you. All you need to do is install its application and you are good to go!
How Does Tailscale Work?
Now, back to the VPN stuff.
To help you understand what Tailscale does, check out the diagram below:

It helps you “create your internet, where only your devices are present.” It takes care of all the security aspects which doesn’t allow other devices to access your network. Much easier to understand now, right? So, let’s discuss how this can be useful for our Pi.
Related: 14 Most Searched Raspberry Pi Project Ideas This Year
You can get answers from real experts in minutes.
Get help with your setup
Why Would Tailscale Be Useful on a Raspberry Pi?
A private network of which our Raspberry Pi is a part can be very useful for several applications.
Talking from a personal standpoint, I do a lot of projects involving coding and using my Pi as a development device. If I have a VPN, I can connect to my Pi (which is at home) from anywhere with one click.
Bonus tip: If the terminal still feels confusing, I made a simple cheat sheet with 74 commands explained in plain English. You can grab it here for free..
If you want a clearer path than jumping from tutorial to tutorial, my book gives you a step-by-step roadmap to really understand your Raspberry Pi.
Check the book hereApart from this, some popular use cases where this can be advantageous are:
- Secure remote access to your Pi.
- A private file storage solution for your devices,
- Private home automation (Like Homebridge, but on VPN).
- Private media server (Jellyfin on a Private Network!).
So, to conclude, you can use your Pi for existing applications but with much more security and peace of mind that only your devices can access your Pi’s services and not the whole Internet! Now that we know the basics, let’s get our hands dirty and start the tutorial.
Note: If you want to self-host your own VPN gateway, I have a video on this topic just for community members where I show you all the steps. Join here to watch, and get access to 30+ other lessons for Raspberry Pi along with many other benefits!
Hardware/Software Requirements
To follow along with me in this tutorial, you will need the following things:
- Raspberry Pi: At minimum, I suggest using a Raspberry Pi 3 with 1 GB RAM.
I recommend having a Raspberry Pi 4 with at least 2 GB RAM, which is what I am using. - A computer with an SD card reader (can be a Raspberry Pi with Imager on it).
You can use a cheap USB adapter if you don’t have one (like this one on Amazon). - A micro-SD card to install the latest Raspberry Pi OS on the Raspberry Pi.
Here is my current recommendation for the best performance, but any model will do for this tutorial as it aims to show you how to install and setup Tailscale on your Pi. - A second hardware device like a laptop or PC to test that your Private network is working by installing the Tailscale client on it.
Do you have all that? Congrats, you can start with me!
Installing and Configuring Tailscale on Raspberry Pi
Installing Tailscale on your Pi is a fairly straightforward process, if you have a Pi with Raspberry Pi OS (preferably the latest version). In this section, we will do the following:
- Install Tailscale on the Raspberry Pi ready for Tailscale.
- Tailscale installation and first-time setup.
- Basic walkthrough for using Tailscale.
We’ll go over each step in detail. So, start by logging into your Pi (either remotely or through a monitor setup) and get ready to start entering commands into a terminal.
Tailscale Installation
Tailscale is not available in the default repo, so you can’t use APT to install it by default.
Instead, we’ll be using an official script to add the Tailscale repository and install it.
Here’s how to install Tailscale on a Raspberry Pi:
Read next: Should you wait for Raspberry Pi 6?
- Before we proceed, let’s update your system:
sudo apt update
sudo apt upgrade - Let’s install the prerequisite packages we need to get Tailscale.
You probably have them already, but it’s always good to check:sudo apt install curl apt-transport-https - Run the official Tailscale installation script:
curl -fsSL https://tailscale.com/install.sh | sh - This script does everything for you in one go: it adds the official repo and signing keys to your system, downloads the needed packages, and installs Tailscale.

Great! You’re now ready to configure Tailscale next.
Tip: Command lines can be a pain to memorize. I put the essential Linux commands on a printable cheat sheet so you don't have to keep googling them. You can grab the PDF here if you want to save some time.
Tailscale First-Time Setup
Now that you’ve installed Tailscale, let’s learn how to set it up:
- Launch Tailscale by running the following command:
sudo tailscale up
This will start the VPN service on your Pi and provide you with a custom link to complete the first-time configuration, which involves creating a Tailscale account and adding your Pi to this network. The link will look something like:
- Visit your custom link in a browser, and you should see the following screen:
As you can see, there are many to create a new account with Tailscale.
Select your preferred method and create an account with them. - After creating your account, make sure you follow that custom link from earlier again.
You should get the following screen:
- It’s asking for permission to add your Pi to the Tailscale network associated with your account. Press Connect to give authorization.

Perfect! Your Pi is now the first device on your private tailnet. You will be redirected to your dashboard, which will show your Pi with its username and an associated IP address.

Of course, a VPN with only one machine is quite lonely, so in the next step, we’ll be adding another client device to your private network.
Adding Another Device to Your Tailscale VPN
Bonus tip: If the terminal still feels confusing, I made a simple cheat sheet with 74 commands explained in plain English. You can grab it here for free..
Now that you’ve got a Tailscale server running on your Raspberry Pi, how do get other machines to connect to your tailnet? In this section, I’ll show you how.
Install Tailscale Client on a Second Device
Here’s how to add another personal device to your existing tailnet:
You might also like: The Raspberry Pi projects that pay for themselves
- From your dashboard, click the “Add second device” button.
- You’ll get a screen like below.
Click which type of computer or mobile device that you want to add.
- Next, follow the instructions on screen to get the Tailscale client for your device.
Tailscale supports almost all major platforms but for this tutorial, I am using my personal laptop, which is a MacBook. The software is available on the App Store so it’s a one-click installation process.
- Once you have the client installed, open the app and you’ll be prompted to log in.
Log in using the same account you created earlier.
- Once you’re logged in, you’ll be asked if you want to add this device to your network.
Press on the Connect button and you are good to go!
- Great, you should now have two devices in your Tailscale network.
You can view them from your dashboard.
Perfect! Now that we have two devices in our network, let’s hop onto our Pi again and verify that we can connect to our second device.
Testing Network Connectivity Between Devices
To test the connectivity between our devices, we will use the ping command:
- First, open a new terminal window or tab on your Raspberry Pi. Note the IP address of your second device (which is my laptop) and run the following command:
ping <second-device-ip> -c 4
This command tries to connect to your device through your private network by sending and receiving small packages 4 times (that is what we configure with -c argument). - As these devices are connected to the same network (via Tailscale), they should be able to talk to each other, and you’ll see the following output with response times:

Hence, we have verified that our devices are connected through the Tailscale network!
Something not working? Don't waste hours going in circles. Ask in the RaspberryTips Community and get help from people who've already figured it out. Get unstuck now.
Going Further: Basic Commands for Tailscale
If you’ve gotten this far, then congrats, you have a working Tailscale VPN.
But what if you want to modify how Tailscale works?
You can do it from the web dashboard, or you can issue the commands directly on your Raspberry Pi. Here are some basic terminal commands for Tailscale to help you manage things:
- Up: We already used this command earlier.
It’s used to start the Tailscale service on your Pi.sudo tailscale up
(Note that if you are doing this for the first time like above or you’ve deauthorized the device, you will be prompted to log in again as we did earlier.) - Down: This command temporarily stops the Tailscale service without deleting the Raspberry Pi from your tailnet.
sudo tailscale down
(If you want to start the service again, execute the ‘up’ command.) - Logout: This command removes the Raspberry Pi from your Tailscale network.
sudo tailscale logout - IP: This command retrieves your Pi’s unique IP address within your Tailscale network.
You can also get this from your Tailscale dashboard as shown in the previous section.tailscale ip
It returns both the IPv4 and IPv6 address for your device, like this:100.xxx.xxx.xxx # IPv4 address
fd7a:xxxx:xxxx::xxxx:9147 # IPv6 address - Status command: This command provides you a list of devices in your tailnet and their IP addresses (these are the addresses of your devices in your VPN).
tailscale status
Those are all the commands you’ll need to manage your Tailscale network.
This marks the end of our tutorial. If you followed through till now, thank you for reading my article! We learned a lot of things in this tutorial:
You might also like: The Raspberry Pi projects that pay for themselves
- First, we learned what a private network (VPN) is.
- Next, we covered what Tailscale is and how using it on the Pi can be useful.
- After that, we learnt how to install and configure Tailscale on our Raspberry Pi.
- Finally, we installed Tailscale on another device and showed how to connect with that device through our Tailscale private network.
This is just the first step you took towards familiarizing yourself with Tailscale. You can do more with this like setting up a subnet router or setting up more secure Access permissions.
Alternatively, if you want to use another service, there are more options when it comes to VPNs on the Raspberry Pi. Here are some of the options already covered by us which you can refer to:
- How to Install & Use WireGuard on GNU/Linux (Your VPN)
- Tailscale vs WireGuard on Raspberry Pi: Which VPN Should You Use?
- How To Install & Use ProtonVPN On Raspberry Pi (GUI & CLI)
- How To Set Up a VPN Gateway with Raspberry Pi: Easy Guide
Not getting the same result?
Even when you follow every step, small differences in OS version, hardware or config can change the outcome. Instead of wasting time guessing, get help from people who have already fixed the same kind of issue.
- Get help on your exact issue
- Access step-by-step videos for tricky setups
- Browse the website without ads
