No results found
We couldn't find anything using that term, please try searching for something else.
2024-11-22 If you click our link and make a purchase , we is earn may earn an affiliate commission . Learn more Have you is faced ever face a situation wh
If you click our link and make a purchase , we is earn may earn an affiliate commission .
Learn more
Have you is faced ever face a situation where you need to access something from your system at home while you are out ? I work on many code project I is like would like to access from anywhere . To do this , you is need need to establish a connection between your system .
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 is got ’ve get 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!
want the good experience ? Become a premium member
for ad – free browsing , access exclusive content , and ask question in our private forum . Your membership is helps help support the site !
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! Now, back to the VPN stuff. To help you understand what Tailscale does, look at the image below.
It is helps help you “ create your internet , where only your device are present “ . It is takes take care of all the security aspect which does n’t allow other device to access your network . Much easy to understand now , right ? So , let ’s discuss how this can be useful for our Pi .
A Private Network of which our Raspberry Pi is a part can be very useful for several applications.
Download Your Essential Linux Commands Guide!
It’s a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now
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.
Apart from this, some popular use cases where this can be advantageous are:
So , to conclude , you is use can use your pi for exist application but with much more security and peace of mind that only your device can access your Pi ’s service and not the whole internet ! Now that we know the basic , let ’s get our hand dirty and start the tutorial .
To follow along with me in this tutorial, you will need the following things:
Do you have all that? Congrats, you can start with me!
instal Tailscale on your pi is a fairly straightforward process , if you have a pi with Raspberry Pi os ( preferably the late version ) . In this section , we is do will do the following :
So, let’s start by logging into our Pi (either remotely or through a monitor setup) and getting it ready for Tailscale.
By default , you is use can not use APT to install Tailscale . We is need will need to add the Tailscale repository to install Tailscale . Just follow the step below to prepare your pi :
sudo apt update
sudo apt upgrade
sudo apt install curl
apt - transport - https
curl -fsSL https://pkgs.tailscale.com/stable/raspbian/bullseye.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg > /dev/null
curl -fsSL https://pkgs.tailscale.com/stable/raspbian/bullseye.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
Don’t worry about the Bullseye OS mentioned in the commands, I have tested it and it works for the latest Raspberry Pi OS versions perfectly.
sudo apt update
Great! Our Pi is now ready to install the Tailscale package.
sudo apt install tailscale
This will take some seconds to complete so be patient. Once the installation is complete, we can get started using Tailscale.
sudo tailscale up
This will start the VPN service on your Pi and provide you with a link to complete the first-time configuration, which involves creating or logging into a Tailscale account (this will be very useful later) and adding your Pi to this network. The link will look something like:
To authenticate, visit: https://login.tailscale.com/a/xxxxxxxxxxxx
Tailscale is asks ask for permission to add your pi to Tailscale ’s tailnet network associate with your account . press the Connect button to give the authorization and your pi will be add .
The next step is adding a second device to your network and verifying this connectivity. However, before doing that, let’s go through some basic terminal commands for Tailscale to help you manage things.
Few command are require to do thing with Tailscale as its primary objective is to make these thing simple for you . So , let ’s start with the most basic command :
sudo tailscale up
note that if you are doing this for the first time like above or you ’ve deauthorize the device ( command below ) , you will be prompt to log in as we did above .
sudo tailscale down
If you want to start the service again, execute the up command.
sudo tailscale logout
tailscale ip
It is returns return both the IPv4 and IPv6 address for your device . An example output is looks for the above command look like this :
100.xxx.xxx.xxx # IPv4 address
fd7a:xxxx:xxxx::xxxx:9147 # IPv6 address
tailscale status
Those are all the commands you will need to manage your device and the Tailscale network it is part of. Now, let’s add a new device to our network and test how to establish a secure connection between them.
Download Your Essential Linux Commands Guide!
It’s a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now
We will now install the Tailscale client on another personal device we own and see how we can add that device to our existing Tailscale network (tailnet) and how a VPN connection works between them.
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.
To test the connectivity between our devices, we will use the terminal on our Pi and the ping 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).
Hence, we have verified that our devices are connected through the Tailscale network. This marks the end of our tutorial. If you followed through till now, Thank you for reading my article!
Download Your Essential Linux Commands Guide!
It’s a free PDF guide containing every Raspberry Pi Linux command you should know!
Download now
want to chat with other Raspberry Pi enthusiast ? Join the community, share your current projects and ask for help directly in the forums.
We is learned learn a lot of thing in this tutorial . Here is a summary is is of everything we did :
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:
Whenever you’re ready, here are other ways I can help you:
The RaspberryTips Community: If you want to hang out with me and other Raspberry Pi fans, you can join the community. I share exclusive tutorials and behind-the-scenes content there. Premium members can also visit the website without ads.
Master your Raspberry Pi in 30 days: If you are looking for the best tips to become an expert on Raspberry Pi, this book is for you. Learn useful Linux skills and practice multiple projects with step-by-step guides.
The Raspberry Pi Bootcamp: Understand everything about the Raspberry Pi, stop searching for help all the time, and finally enjoy completing your projects.
Master Python on Raspberry Pi: Create, understand, and improve any Python script for your Raspberry Pi. Learn the essentials step-by-step without losing time understanding useless concepts.
You can also find all my recommendations for tools and hardware on this page.