What/Why:
Installing Zerotier on Linux Mint or Ubuntu can be quite a hassle depending on your configuration & adding a GUI for easy usage is not provided by the standard installation method. As I made some notes for my last struggle in Linux Mint i will provide them here for anyone interested installing Zerotier + a gui from ground up (doing some quick and easy compiling), so that you are not bound to some specific version.
-
Using the standard installation method may show “Segmentation fault” Error when trying to run “zerotier-one”, “zerotier-cli” seems to work but does not really connect. Therefore the following instructions include a quick compilation of both programms from source.
-
Zerotier is most of the time not working with another VPN on at the same time. Try researching the forums for that.
-
We will use
git
here to get the source c, either install it if you do not already have it (sudo apt install git
) or download the c manually from the Github sites (remove the .git out of the links).
Compile & Install Zerotier:
- Open Terminal in the Download directory or cd to it
git clone https://github.com/zerotier/ZeroTierOne.git Zerotier-One_Build
cd Zerotier-One_Build
-
chmod +x make-linux.mk
(not sure if needed) - Before running, usually some dependencies are missing:
-
sudo apt install libssl-dev
(normal openssl does not work) -
sudo apt install cargo
(installs rust package manager) -
sudo apt install clang
(gcc
compiler should also work but is not recommended)
-
-
make
(should run without errors? otherwise do check them for further dependencies) - Often there is a problem installing path variables (due to non-root) so run the following :
sudo make install
(should install everything so that you can usezerotier-one
andzerotier-cli
commands from everywhere) - There are multiple ways to start Zerotier, the service is the most usefull one but can also only be stopped difficultly.
- Service:
- check if service already exists with
sudo systemctl status zerotier-one
if not do the inital run withsudo zerotier-one -d
to start the zerotier service with the default port 9993 (else use-p 0
for random) and check again with the first command. - if the check somehow shows that the service is masked under “Loaded:”, then run
sudo systemctl unmask zerotier-one
. This should start the service at every boot and make it start/stoppable through Zerotier-GUI. - To check if/how zerotier is running, use
sudo zerotier-cli status
- As enable/disable (eg.
sudo systemctl disable zerotier-one
) to stop automatically running Zerotier apparently do not work, you need to usesudo systemctl mask zerotier-one
to stop launching Zerotier in the background. this however requires you to runsudo systemctl unmask zerotier-one
again if you want to use the service functionality.
- check if service already exists with
- Manually:
- To manually start Zerotier, run
sudo zerotier-one
to start the zerotier service with the default port 9993 (else use-p 0
for random) - To check if/how Zerotier is running, use
sudo zerotier-cli status
- To make sure that no service is running in the background use
sudo systemctl status zerotier-one
to check if a service is there and if it is not masked (under “Loaded:”), mask it withsudo systemctl mask zerotier-one
. This manual way will however disable the Start/Stop service function in Zerotier-GUI.
- To manually start Zerotier, run
- Service:
Default home folder is in /var/lib/zerotier-one
.
If the files there are deleted, sometimes a restart may be necessary to regenerate them (due to service already running).
Compile & Install Zerotier-GUI:
- Open Terminal in the Download directory or cd to it
git clone https://github.com/tralph3/ZeroTier-GUI.git Zerotier-GUI_Build
cd Zerotier-GUI_Build
chmod +x make_deb.sh
./make_deb.sh
-
sudo apt install ./ZeroTier-GUI.deb
or run the previously generated .deb file in the directory through double-click - if the interface does not show up try running the following to install dependencies:
-
sudo apt install python3
(for if you dont have an working python version) -
sudo apt install python3-tk
orpip install tkinter
if pip is installed (both install the python gui-interface module)
-
Zerotier-GUI should now be working by starting it from the menue - As initial setup it may ask for temporary root to enable running without it (copying Zerotier-secret to user).
Tested with:
Kernel: 5.4.0-125-generic x86_64 bits: 64 compiler: gcc v: 9.4.0
Desktop: Cinnamon 4.8.6 wm: muffin dm: LightDM Distro: Linux Mint 20.1 Ulyssa
base: Ubuntu 20.04 focal