Compile ZeroTier client with no dependecies to use on any Linux

Using the steps below you can successfully compile ZeroTier for both x86_64 and arm64 Linux systems. The resulting executable has zero dependencies thanks to static linking thus can be basically used on any Linux, inluding all Synology NAS models. We used x86_64 virtual machine and Raspberry Pi 4 both running Ubuntu 22.04.


Install required build tools:

sudo apt install curl build-essential pkg-config libssl-dev
curl --proto '=https' --tlsv1.2 -sSf | sh
source "$HOME/.cargo/env"

Download & extract ZeroTier:

tar zxf $ZT_VERSION.tar.gz
cd ZeroTierOne-*

Build and create a zip package:

make -j`nproc` ZT_STATIC=1 
strip zerotier-one

Create binary package:

tar -czvf zerotier_$(uname -p)_$ZT_VERSION.tar.gz zerotier-one zerotier-cli