zerotier.is
AdLuoboyunAn account comes with 1 GB of trial traffic for 24 hours, used with Clash / MihomoPays by Alipay, WeChat, cryptoGet the trialLuoboyun: 1 GB on registrationFor 24 hours, Alipay / WeChat / cryptoGet the trialAd
  1. Home
  2. Download
  3. Routers, NAS, Docker

Routers, NAS and Docker

Running ZeroTier on OpenWrt, MikroTik, Synology DSM 7 and in Docker. Native NAS packages are no longer maintained; here is the recommended container way.

Routers, NAS, Docker

OpenWrt, MikroTik, Synology, anything with containers

Docker

Prepare a folder for the identity first
docker run -d --name zt --restart=always --device=/dev/net/tun --net=host --cap-add=NET_ADMIN -v /opt/zerotier:/var/lib/zerotier-one zerotier/zerotier NETWORK_ID

The mounted folder holds this device's identity. Without it every new container becomes a new device and takes a place.

Synology

ZeroTier stopped maintaining its native packages for Synology, QNAP, ASUSTOR and Western Digital and recommends containers. On DSM 7 the system first needs TUN:

Over SSH as root
echo -e '#!/bin/sh -e \ninsmod /lib/modules/tun.ko' > /usr/local/etc/rc.d/tun.sh
chmod a+x /usr/local/etc/rc.d/tun.sh
/usr/local/etc/rc.d/tun.sh

The rest is in this post.

OpenWrt

Install the zerotier package and put the network ID into its configuration. With it on the router nothing has to be installed on devices at home; continue with reaching home.

  1. Install onceon the router
  2. Add a static routein the console
  3. Devices at homeinstall nothing
  4. Devices outsideinstall as usual
What a router saves you

MikroTik

RouterOS 7 has a ZeroTier package with MikroTik's own commands, for ARM models only.

The container cannot ping anyone?

Check host networking and NET_ADMIN, then whether /dev/net/tun exists.

Does upgrading the image drop the line?

For a moment. With the identity folder mounted it returns as the same device.

Pages nearby

Marks: ZeroTier OpenWrt, ZeroTier Synology, ZeroTier Docker