ZeroTier delivers a virtual networking solution that is aptly named Global Area Networking. This enables devices to connect to one another over the Internet (and private networks) as though they were connected on the same Local Area Network (LAN). It is very simple to deploy - just install the ZeroTier One software and join a ZeroTier network using the network's 16-digit network ID.
ZeroTier networks are set up and configured on a ZeroTier network controller. You can either use the network controllers hosted by ZeroTier or set up your own standalone network controller. Setting up a standalone network controller is quite simple - just install the ZeroTier One software and follow the installation instructions below to install ztncui on a Linux machine.
The quickest and easiest way to evaluate ztncui if you know how to use Docker:
ztncui is open source software, licensed under the GNU GPL version 3. The source code can be found at:
To install on an EL8/9 flavour of Linux, such as RedHat Enterprise Linux 8/9 or AlmaLinux 8/9, follow these steps:
sudo yum install https://download.key-networks.com/el7/ztncui/1/ztncui-release-1-1.noarch.rpm -y
sudo yum install ztncui -y
sudo sh -c "echo ZT_TOKEN=`sudo cat /var/lib/zerotier-one/authtoken.secret` > /opt/key-networks/ztncui/.env"
sudo sh -c "echo HTTPS_PORT=3443 >> /opt/key-networks/ztncui/.env"
sudo sh -c "echo NODE_ENV=production >> /opt/key-networks/ztncui/.env"
sudo chmod 400 /opt/key-networks/ztncui/.env
sudo chown ztncui.ztncui /opt/key-networks/ztncui/.env
sudo systemctl restart ztncui
Systemd is a requirement for ztncui at this stage (if you need it to run on older systems with SysV init systems, please let us know via the Contact form above).
curl -O https://s3-us-west-1.amazonaws.com/key-networks/deb/ztncui/1/x86_64/ztncui_0.8.14_amd64.deb
sudo apt install ./ztncui_0.8.14_amd64.deb
sudo sh -c "echo ZT_TOKEN=`sudo cat /var/lib/zerotier-one/authtoken.secret` > /opt/key-networks/ztncui/.env"
sudo sh -c "echo HTTPS_PORT=3443 >> /opt/key-networks/ztncui/.env"
sudo sh -c "echo NODE_ENV=production >> /opt/key-networks/ztncui/.env"
sudo chmod 400 /opt/key-networks/ztncui/.env
sudo chown ztncui.ztncui /opt/key-networks/ztncui/.env
sudo systemctl restart ztncui
HTTPS_PORT=3443or whatever port number (above 1024) you choose.
HTTPS_HOST=12.34.56.78or whatever IP address or hostname is defined for the interface.
There are a few options for installing the TLS/SSL certificate so that you can access ztncui over HTTPS:
This is the default option - ztncui comes with a pre-generated self-signed certificate when you install it. You can use this as it is, or you can generate your own by executing the following:
sudo -i
cd /opt/key-networks/ztncui/etc/tls
rm -f privkey.pem fullchain.pem
openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:2048 -keyout privkey.pem -out fullchain.pem
chown ztncui.ztncui *.pem
chmod 600 privkey.pem
Note, that if you use a self-signed certificate, your web browser will give you a warning that the certificate is not trusted because it is self-signed. You can add an exception (best to make it non-permanent) so that it doesn't keep warning you every time. The process for doing this is browser dependent, so search the Internet for browser-specific instructions.
You may already have a certificate for a web server on the machine that you could use for ztncui, or you could purchase one from the numerous Certificate Authorities on the Internet. Once you have purchased and installed the certificate, make a soft link to the private key and full chain certificate, for example:
sudo -i
cd /opt/key-networks/ztncui/etc/tls
rm -f privkey.pem fullchain.pem
ln -s /path/to/private/key privkey.pem
ln -s /path/to/full/chain/cert fullchain.pem
where the paths to the private key and full chain certificate are substituted appropriately.
Note that ztncui runs as the user ztncui and this user needs read access to the private key.
On the network controller machine:
Use certbot to generate a certificate in webroot mode from the root of the ztncui directory:
sudo -i
cd /opt/key-networks/ztncui
certbot --webroot -w public -d [network_controller_fqdn]
where [network_controller_fqdn] is the FQDN that resolves back to the address of the machine running the ZeroTier network controller and ztncui. Make sure that this FQDN resolves publicly since that is what letsencrypt.org uses to identify your machine and communicate with certbot.
If certbot runs successfully, it should give you the location of your certificate, which should be something like:
/etc/letsencrypt/live/[network_controller_fqdn]/fullchain.pem
Make soft links from etc/tls to the certificate and private key under /etc/letsencrypt/live:
sudo -i
cd /opt/key-networks/ztncui/etc/tls
rm -f privkey.pem fullchain.pem
ln -s /etc/letsencrypt/live/[network_controller_fqdn]/fullchain.pem
ln -s /etc/letsencrypt/live/[network_controller_fqdn]/privkey.pem
Note that ztncui runs as the user ztncui and this user needs read access to the private key.
Please note that these screenshots are out of date - the app has moved on a bit since these were made.