In this project, we will be showing you how to install and run ZeroTier on the Raspberry Pi.
ZeroTier is software that allows you to create virtual networks between your devices using a simple central web interface. You could compare these virtual networks to setting up a VPN on your Raspberry Pi. However, the provisioning experience is far simpler, especially when managing multiple devices.
Connections are made between each of your devices using a peer-to-peer network. These connections are secured using end-to-end encryption to help keep your data secure and private.
In addition to running ZeroTier on a Raspberry Pi, you can also run it on most other devices, including phones. Furthermore, it can work on Linux, Windows, and macOS, meaning you can create a virtual network without worrying whether your device can join.
ZeroTier runs on a freemium model. For the free plan we are using in this guide, you can have up to 50 authorized devices in your virtual network.
As a bonus, the ZeroTier team has made their code available on GitHub. One of the advantages of an open-source project is that you can see what the code is meant to be doing.
Below is a list of the equipment we used when running ZeroTier on the Raspberry Pi.
- Raspberry Pi
- Micro SD Card
- Power Supply
- Ethernet Cable or Wi-Fi
- Raspberry Pi Case
- USB Keyboard
- USB Mouse
We tested this tutorial running a Raspberry Pi 400 using the latest version of Raspberry Pi OS.
Retrieving your ZeroTier Network ID
To use the ZeroTier software on your Raspberry Pi, you must sign up to their website. The reason for this is that their website acts as the dashboard that controls the virtual network.
Using this web interface, you can control all aspects of your virtual network, with the ability to even set static IP addresses to specific devices.
1. To create a network ID, you will need to first sign up to the ZeroTier central web interface. This is the web interface that will allow you to create and manage virtual networks.
In your favorite web browser, go to the ZeroTier Central website. Once on the website, click the “
Register” link to begin creating your account.
2. On the register screen, fill out all the details you want to use for your ZeroTier account (1.).
Once you have filled out all of your information, click the “
Register” button at the bottom of the screen (2.).
After you have registered for an account, you will be required to verify the specified email address. You won’t be able to proceed until the email has been verified.
3. After registering your account and logging into the web interface, you will be greeted with the following screen.
All you need to do now is click the “
Create A Network” button in the middle of the screen.
4. Upon clicking the button, the ZeroTier website will immediately create your first network.
In this table, you can find the network ID. We will need this ID to connect your Raspberry Pi to this ZeroTier virtual network. Write down this ID as we will require this later on.
If you want to adjust details such as the network’s name, you need to click the entry.
5. Below is the basic settings that you can change for your ZeroTier network.
Using these settings, you can change the name of the network (1.), set a description (2.), or change the access control (3.).
ZeroTier also allows you to adjust several other aspects of the virtual network, such as the IP subnet.
Installing ZeroTier to the Raspberry Pi
Now that you have signed up to ZeroTier and retrieved a network ID, we can continue.
This section will show you how to install the ZeroTier software to your Raspberry Pi.
1. Before we start, let us make sure our Raspberry Pi is running up-to-date software.
We need to use the following two commands to update both the package list and any installed packages.
2. To install ZeroTier directly from their package repository to our Raspberry Pi, we will need to add the GPG key. This key helps verify the contents of the packages that we are installing are from ZeroTier.
Run the following command to download the GPG key from their GitHub repository, then save its “de-armored” contents into the “
3. With the GPG key added, we need to create a source list that contains the ZeroTier repository.
Before we do that, we must first store the codename for the current operating system in a shell variable called “
Running the following command will allow us to quickly build the correct URL for the ZeroTier repository in the next step.
4. We use the shell variable we set in the previous step to build the correct ZeroTier repository URL for your current operating system.
We then pipe this string into a file called “
zerotier.list” that is stored within the “
When you update your Raspberry Pi’s package list again, it will read from this repository to find ZeroTier.
5. As we have made changes to our Raspberry Pi’s sources, we need to update the package list.
You can update the package list by running the following command on your system
6. Once we have performed an update, we can finally install the ZeroTier package to our Raspberry Pi using the command below.
As a part of the installation process, ZeroTier will automatically enable itself to start at boot.
Running ZeroTier on the Raspberry Pi
Now that we have installed ZeroTier to our Raspberry Pi, we can connect it to the network we set up earlier in the guide.
Make sure that you have the ID of the network you want to connect to before continuing.
1. We will need to use the ZeroTier CLI to join the network on the Raspberry Pi.
To do this, you will need to use the following command. First, ensure that you replace “
[NETWORKID]” with the ID you got earlier in this guide.
If your Raspberry Pi successfully joins the ZeroTier network, you should see the following message.
2. Even though you have joined the ZeroTier network, you are required to authenticate your device before it becomes an actual member of the network.
To do this, you will need to return to the ZeroTier Central interface and select your network.
If you want, you can also go to the following URL, replacing “
[NETWORKID]” with your network ID.
3. Once you are on the management page for your Raspberry Pi’s ZeroTier network, you will need to scroll down to see the “
- Within this section, you will need to identify the device you added and click the “
This will allow your Raspberry Pi to connect with any other devices on the network.
- The “Address” column is what you can use to identify that particular device within your ZeroTier network.
You can get your Raspberry Pi to output this information by using the “
sudo zerotier-cli status” command.
- To make it easier to identify this new device in the future, you can use the Name/Description to give it a clear identifier.
- The last column that you will definitely want to look at is the “
Managed IPs” column.
This column will list any IPs that have been assigned to that particular device. You can use these IP addresses to connect to that particular device.
If you want to assign a particular IP address to a device, you can use this column.
Please note it may take a few moments before a newly authorized device will get assigned an IP address.
4. You can verify that your Raspberry Pi has now connected to the ZeroTier network by running the following command.
This command will list all networks that your ZeroTier installation is connected to and the status of that connection.
Below is an example of what you should see when your Raspberry Pi has successfully connected to your ZeroTier network. The last value is the IP address that was assigned to your Pi as a member of the virtual network.
5. Your Raspberry Pi should now have successfully joined your ZeroTier network.
You will now be able to connect with any other devices that are a part of the virtual network. All you need to know is the IP address of that device.
The easiest place to find the IP addresses assigned to a device is through the ZeroTier central interface.
Remember that if you are using a firewall on your Raspberry Pi, such as UFW, you will still need to allow traffic from applications for the virtual network.
By this stage, you will now have successfully set up ZeroTier on your Raspberry Pi and connected to a virtual network.
ZeroTier is a straightforward virtual network solution that allows you to control everything through a simple web interface. Best of all, it has a great free plan that should be more than enough for most basic uses.
If you have had any issues getting ZeroTier running on your Pi, please leave a comment below.
Be sure to check out some of our other Raspberry Pi projects, such as using Syncthing to synchronize files between devices.
Setting up ZeroTier on the Raspberry Pi? ›
Step 1: First, visit the ZeroTier website on your Raspberry Pi. Step 2: Create an Account there by clicking on the “Register” option. Step 3: Select any account to Register or you can create a new one as well. Step 4: Click on the “Create a Network” button.How do I set up a ZeroTier server? ›
Creating a ZeroTier network
- Tick the "Auto-Assign from Range" box.
- Ensure that the "Easy" tab is selected.
- Select one of the address ranges from the grid. I've used the first one "10.147. *".
- Create a ZeroTier account to access your admin console and get a 16-digit network ID. ...
- Download ZeroTier on any device to get a unique 10-digit node address and enter your 16-digit network ID into the join network field on the device to request access to your network.
ZeroTier is one of the easiest VPN services to configure and it's completely free for up to 100 devices. The entire process, from start to finish, should only take a few minutes.What ports need to be open for ZeroTier? ›
ZeroTier will need to be accessible via TCP port 9993 for the UI and CLI to interact with it.How do I find the IP address of a ZeroTier? ›
You can find the ZeroTier IP for your server in the Members section of your ZeroTier Network configuration page. In the network/bits field, enter in 0.0. 0.0/0 , in the (LAN) field, enter your ZeroTier server's IP address.Is ZeroTier free? ›
You can self-host ZeroTier controllers and nodes for free if you use it for non-commercial purposes. Please contact us to learn more. ZeroTier's BSL is based on the Business Source License (BSL) version 1.1 developed by MariaDB.How do I download ZeroTier in Linux? ›
- Create Zero Tier Account. Go to https://www.zerotier.com/ , press sign up, and sign up for an account. ...
- Install the Zero Tier app on the server. Download and install the ZeroTier App on the server. ...
- Connecting your android phone to the network. ...
- Create a route to your server.
To support the use of ZeroTier as a high performance SDN/NFV protocol over physically secure networks the protocol supports a feature called trusted paths. It is possible to configure all ZeroTier devices on a given network to skip encryption and authentication for traffic over a designated physical path.How do I find my ZeroTier node ID? ›
- Open the Start Menu.
- Start typing “services”
- Open Services (desktop app)
- Find ZeroTier One at the bottom of the list.
- Start it.
Is ZeroTier SD WAN? ›
ZeroTier combines the capabilities of VPN and SD-WAN, simplifying network management. Enjoy flexibility while avoiding costly hardware vendor lock in.How do I connect my router to my ZeroTier? ›
Open your web browser to the router configuration page. In the System menu select Software . Find ZeroTier in the Available packages list and hit the install link. Once installed, you'll need to open an SSH connection to your router.What is UPnP service? ›
UPnP (Universal Plug and Play) is a networking protocol that enables devices to discover each other and connect without the need for manual configuration or user intervention. The protocol automates all the steps necessary for recognition and communication between devices on the same network.What port number is 9993? ›
Side note: UDP port 9993 uses the Datagram Protocol, a communications protocol for the Internet network layer, transport layer, and session layer. This protocol when used over PORT 9993 makes possible the transmission of a datagram message from one computer to an application running in another computer.How do you open a ZeroTier? ›
On macOS and Windows, find the ZeroTier app in your menu bar. Launch the ZeroTier One app bundle if it's not already running. Click the ⏁ icon on your menu bar and select 'Join New Network'.How do I check my ZeroTier status? ›
These can be found in C:\ProgramData\ZeroTier\One. This will print a list of command line switches and commands. Commands are: info: displays the current computer's ZeroTier address, software version, and connection status.
ZeroTier peer-to-peer connections are reliable and fast, as they are low latency, direct communications.Is Hamachi similar to ZeroTier? ›
A good alternative for Hamachi, ZeroTier is easy to manage and the most widely supported network. It can simply connect all your devices, cloud VMs, and ZeroTier networks act as chat rooms for machines.
ZeroTier Inc. is a software company with a freemium business model based in Irvine, California. ZeroTier provides proprietary software, SDKs and commercial products and services to create and manage virtual software-defined networks.How does ZeroTier work? ›
The ZeroTier client is used to connect to virtual networks previously created in the ZeroTier Central web-based UI. Endpoint connections are peer-to-peer and end-to-end encrypted. STUN and hole punching are used to establish direct connections between peers behind NAT.
How do I add a member to ZeroTier? ›
Edit your network on ZeroTier website, go to Members section and Manually Add Member by entering ID and hitting + Add New Member. Set auth field to newly added machine, and manually enter IP number in your network subnet, for example: 192.168. 0.1 .