Taken from zerotier forum here
-
You have to access your Synology NAS with ssh. To enable SSH go to:
Control Panel -> Terminal & SNTP
. -
First you have to install Entware-ng. It is a packet manager for devices like Synology NAS and many others.
Here is the instruction for Synology NAS. So just follow it. https://github.com/Entware-ng/Entware-ng/wiki/Install-on-Synology-NAS
-
Then install ZeroTier using Entware:
opkg install zerotier
-
Create the script to run zerotier: https://gist.github.com/meoso/b25bd410c8a54a1a013f0cc2d72b12ee
vim /opt/etc/init.d/S90zerotier-one #... chmod 755 /opt/etc/init.d/S90zerotier-one
tun kernel module have to be there so zerotier could join the network
vi /etc/modules.conf
add
tun
in the endTo insert tunko manually (to test zerotier)
sudo insmod /lib/modules/tun.ko
-
So we can now test the network:
zerotier-cli join <network>
-
Setup cron. Synology cron is a bit different from linux. Here is a good article. The quote from it:
By default, crontab is only editable by root (/etc/crontab) and this needs to be done through a text editor rather than the usual crontab command. But there are a few other limitations that one can read here and there:
- the who field can only be filled with root, otherwise the entry is removed after a reboot
- the different fields need to be separated by a tab (no spaces), otherwise the entry is removed after a reboot
vim /etc/crontab
So put the next line. And replace spaces with tabs
*/5 * * * * root /opt/etc/init.d/S90zerotier-one start
Thanks for the write-up, Dmitry.
We've since tried to make it a bit easier to install ZeroTier on Synology devices so I figured I'd drop a link in here to our official packages.
https://github.com/zerotier/ZeroTierNAS