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.
Related:
Install required build tools:
sudo apt install curl build-essential pkg-config libssl-dev
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source "$HOME/.cargo/env"
Download & extract ZeroTier:
ZT_VERSION=1.12.2
wget https://github.com/zerotier/ZeroTierOne/archive/refs/tags/$ZT_VERSION.tar.gz
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