Skip to content

Instantly share code, notes, and snippets.

@DraTeots
Last active March 8, 2023 20:20
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save DraTeots/c2519efdd3774b6044e2b2d6e977f24d to your computer and use it in GitHub Desktop.
Save DraTeots/c2519efdd3774b6044e2b2d6e977f24d to your computer and use it in GitHub Desktop.
Sinology DS211j ZeroTier configuration

Taken from zerotier forum here

  1. You have to access your Synology NAS with ssh. To enable SSH go to: Control Panel -> Terminal & SNTP.

  2. 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

  3. Then install ZeroTier using Entware:

    opkg install zerotier
  4. 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 end

    To insert tunko manually (to test zerotier) sudo insmod /lib/modules/tun.ko

  5. So we can now test the network:

    zerotier-cli join <network>
    
  6. 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
@joseph-henry
Copy link

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

@meoso
Copy link

meoso commented Jul 19, 2018

thanks for the mention! im useful after-all. i came across this searching how to do it again for 1.2.x

I'd also like to link to issue 12 for future reference zerotier/ZeroTierNAS#12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment