[Guide] Zerotier + GUI on Linux Mint / Ubuntu

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:

  1. Open Terminal in the Download directory or cd to it
  2. git clone https://github.com/zerotier/ZeroTierOne.git Zerotier-One_Build
  3. cd Zerotier-One_Build
  4. chmod +x make-linux.mk (not sure if needed)
  5. Before running, usually some dependencies are missing:
    1. sudo apt install libssl-dev (normal openssl does not work)
    2. sudo apt install cargo (installs rust package manager)
    3. sudo apt install clang (gcc compiler should also work but is not recommended)
  6. make (should run without errors? otherwise do check them for further dependencies)
  7. 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 use zerotier-one and zerotier-cli commands from everywhere)
  8. There are multiple ways to start Zerotier, the service is the most usefull one but can also only be stopped difficultly.
    1. Service:
      1. 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.
      2. 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.
      3. To check if/how zerotier is running, use sudo zerotier-cli status
      4. As enable/disable (eg. sudo systemctl disable zerotier-one) to stop automatically running Zerotier apparently do not work, you need to use sudo systemctl mask zerotier-one to stop launching Zerotier in the background. this however requires you to run sudo systemctl unmask zerotier-one again if you want to use the service functionality.
    2. Manually:
      1. To manually start Zerotier, run sudo zerotier-one to start the zerotier service with the default port 9993 (else use -p 0 for random)
      2. To check if/how Zerotier is running, use sudo zerotier-cli status
      3. 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 with sudo systemctl mask zerotier-one. This manual way will however disable the Start/Stop service function in Zerotier-GUI.

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:

  1. Open Terminal in the Download directory or cd to it
  2. git clone https://github.com/tralph3/ZeroTier-GUI.git Zerotier-GUI_Build
  3. cd Zerotier-GUI_Build
  4. chmod +x make_deb.sh
  5. ./make_deb.sh
  6. sudo apt install ./ZeroTier-GUI.deb or run the previously generated .deb file in the directory through double-click
  7. if the interface does not show up try running the following to install dependencies:
    1. sudo apt install python3 (for if you dont have an working python version)
    2. sudo apt install python3-tk or pip 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

5 Likes

Thanks for taking the time for the testing and write-up. Testing currently on Ubuntu - will report about results.

Thanks for the guide! I’ve been thinking about taking the plunge and trying a self-hosted install just to see how easy it is to manage.

Thanks for your work.
Unfortunately, GUI doesn’t start. In console I have this log:

zerotier-gui
Traceback (most recent call last):
File “/usr/bin/zerotier-gui”, line 1300, in
mainWindow = MainWindow()
File “/usr/bin/zerotier-gui”, line 162, in init
self.refresh_networks()
File “/usr/bin/zerotier-gui”, line 281, in refresh_networks
networkData = self.get_networks_info()
File “/usr/bin/zerotier-gui”, line 334, in get_networks_info
return json.loads(check_output([“zerotier-cli”, “-j”, “listnetworks”]))
File “/usr/lib/python3.10/subprocess.py”, line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/usr/lib/python3.10/subprocess.py”, line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘[‘zerotier-cli’, ‘-j’, ‘listnetworks’]’ died with <Signals.SIGSEGV: 11>.
Error in sys.excepthook:
Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/apport_python_hook.py”, line 153, in apport_excepthook
with os.fdopen(os.open(pr_filename,
FileNotFoundError: [Errno 2] No such file or directory: ‘/var/crash/_usr_bin_zerotier-gui.1000.crash’

Original exception was:
Traceback (most recent call last):
File “/usr/bin/zerotier-gui”, line 1300, in
mainWindow = MainWindow()
File “/usr/bin/zerotier-gui”, line 162, in init
self.refresh_networks()
File “/usr/bin/zerotier-gui”, line 281, in refresh_networks
networkData = self.get_networks_info()
File “/usr/bin/zerotier-gui”, line 334, in get_networks_info
return json.loads(check_output([“zerotier-cli”, “-j”, “listnetworks”]))
File “/usr/lib/python3.10/subprocess.py”, line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File “/usr/lib/python3.10/subprocess.py”, line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command ‘[‘zerotier-cli’, ‘-j’, ‘listnetworks’]’ died with <Signals.SIGSEGV: 11>.

Could you please help and let me know how to fix this?
I use Linux Mint 21.1

Working well for me on Ubuntu 22.04.

Great guide. I had one error (time version compatibility issue) running ‘make’ that I fixed by updating rust. I ended up removing cargo and rustc and installing them via rustup. After doing that, everything just worked. I’m on Mint 21.2.

Works on Linux Mint 20.3. Same issue as smopuim85 had with wrong time version, but once that was updated it worked fine. Thanks.

Hello,
I just upgraded from Mint20 to Mint21, I had to reinstall Zerotier-One, everything works:

$ zerotier-cli info
200 info 754d525db0 1.12.2 ONLINE

except for the service:

$ sudo systemctl status zerotier-one
Unit zerotier-one.service could not be found.

so I have to start it manually at every boot.

Any suggestion?

1 Like

Worked well in Linux Mint 20.3 (after Time update) so I thought it would work right off in Linux Mint 21. I think I’m missing a prerequisite but I don’t don’t what it is. Make stops almost immediately with a “string expected” error in Utils.hpp library. Not sure what’s missing. Here’s the error comes up…

In file included from node/AES.cpp:15:
In file included from node/AES.hpp:18:
node/Utils.hpp:23:10: fatal error: 'string' file not found
#include <string>
         ^~~~~~~~
1 error generated.
make: *** [<builtin>: node/AES.o] Error 1

I’ve tried to install the gcc I can find, but I’m guessing something is missing.

Thanks for any pointers.

It looks like you may be missing some basic development tools + headers on that system.

If you haven’t already, you might want to try installing the build-essential package (sudo apt install build-essential) and retrying the build.

I was missing libstdc+±12-dev (needed for Clang) and rust. I posted my solution on Zerotier’s subReddit.

https://www.reddit.com/r/zerotier/comments/17few9h/compiling_zerotiercli_on_linux_mint_21/

1 Like