Raspberry Pi

How to use ZeroTier on Raspberry Pi to Create Virtual Network

ZeroTier is a tool that creates a virtual network among the devices using a web panel. The connection between the devices is established through peer-to-peer network, making the connection secure and private. It’s by far the most reliable and trusted network solution that can easily be setup on any device. If you want to use your Raspberry Pi to create a virtual network, you should acquire the services of ZeroTier.

This tutorial guides you in installing and setting up ZeroTier on Raspberry Pi.

Install and Setup ZeroTier on Raspberry Pi

To use ZeroTier on Raspberry Pi, you will need to perform the following steps:

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.

This creates a network on the Raspberry Pi.

Remember the network ID as it will be used later on.

Step 5: Now, open the Raspberry Pi terminal and issue the below-mentioned commands to update the packages.

$ sudo apt update

$ sudo apt upgrade

Step 6: Next, download the GPG key from GitHub repository using the following command:

$ curl https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/zerotierone-archive-keyring.gpg >/dev/null

Step 7: Then store the correct codename for your OS in a shell variable named as “RELEASE” using the following command:

$ RELEASE=$(lsb_release -cs)

The above command will help us in building the correct URL for ZeroTier.

Step 8: Now add the ZeroTier repository using the following command:

$ echo "deb [signed-by=/usr/share/keyrings/zerotierone-archive-keyring.gpg] http://download.zerotier.com/debian/$RELEASE $RELEASE main" | sudo tee /etc/apt/sources.list.d/zerotier.list

Step 9: After adding the repository update the Raspberry Pi packages list through below-given command:

$ sudo apt update

Step 10: After the update, run the following command to install ZeroTier on Raspberry Pi.

$ sudo apt install zerotier-one

Step 11: Now join the network on Raspberry Pi through Network ID using the following command:

$ sudo zerotier-cli join <NETWORKID>

The above output shows that your Raspberry Pi joins the network successfully. See Step 4.

Step 12: Although the device successfully joins the network, you will still require to authenticate the device. Visit the address “ https://my.zerotier.com/network/<NETWORKID>

Find your device identity and checkbox the Auth option.

To check your Raspberry Pi connection information, use the below-given command:

$ sudo zerotier-cli status

To check the list of networks on ZeroTier, you can use the following command:

$ sudo zerotier-cli listnetworks

The above output ensures that your Raspberry Pi joins the ZeroTier network and is online now. You can now easily connect with other devices that become part of your created network. For further assistance, get guidance from the manual.


ZeroTier is a pretty straightforward network solution allowing user to make its own virtual private network. It enables you to directly control your network settings through its web interface. The above step-by-step instructions are useful in setting up ZeroTier on Raspberry Pi by first creating an account on the official website and then installing the software through its repository. After the installation, you can then be able to control your networking settings such as blocking the traffic or other services that use your network.

About the author

Awais Khan

I'm an Engineer and an academic researcher by profession. My interest for Raspberry Pi, embedded systems and blogging has brought me here to share my knowledge with others.