Install Zerotier CLI Linux

I often use Zerotier to connect machines across multiple networks to have a single virtual network my devices can safely communicate over. Generally installation goes smoothly but I ran into a few issues when attempting to install on Ubuntu and Pop OS. Specifically with using the Snap Store. I’ve even had success hosting multiplayer games using Zerotier such as morrowind or valheim

  1. Install zerotier
  2. Launch zerotier
  3. Ask me for the Network ID
  4. Join the network
  5. Let me know you’re requesting access so I can accept you

Below are the commands I used to install Zerotier on Linux systems.

This goes without saying but one should not run a curl command and pipe it into a sudo bash call without reading the code. This command comes from the Zerotier installation steps located here

  1. Install cli

    $ curl -s 'https://raw.githubusercontent.com/zerotier/ZeroTierOne/master/doc/contact%40zerotier.com.gpg' | gpg --import && \ if z=$(curl -s 'https://install.zerotier.com/' | gpg); then echo "$z" | sudo bash; fi

  2. Start service

    $ sudo service zerotier-one restart

  3. Join the network

    $ sudo zerotier-one.zerotier-cli join <network id>

One might experience the following error when attempting to interact with the zerotier CLI application: zerotier-cli: missing authentication token and authtoken.secret not found (or readable) in /var/lib/zerotier-one

This is because your account cannot read the token needed, so either run with sudo or change the permissions on var/lib/zerotier-one.