Install issue with Docker (compose) on QNAP NAS

Hello,

I am trying to install ZeroTier on my QNAP. I’m aware that there’s a specific QNAP package, however I use Docker for everything and if possible I’d like to try and get ZT working with Docker as well.

Error:

zerotier_1 | WARNING: unable to write to file: /var/lib/zerotier-one/identity.secret (unable to open)

zerotier_1 | WARNING: unable to write to file: /var/lib/zerotier-one/identity.public (unable to open)

zerotier_1 | ERROR: unable to configure virtual network port: could not open TUN/TAP device: No such file or directory

The first part of the instructions on the ZT documentation ask me to install QVPN, which I have done.

Otherwise, here’s my docker compose file:

> ## zerotier: used to create mesh network for secure remote access
> zerotier:
> 
Image: zerotier/zerotier:latest
> restart: unless-stopped
> network_mode: host
> devices:
> - /dev/net/tun:/dev/net/tun
> command: myNetworkID
> volumes:
> - /share/CACHEDEV3_DATA/Docker/zeroTier/authtoken.secret:/var/lib/zerotier-one/authtoken.secret
> - /share/CACHEDEV3_DATA/Docker/zeroTier/identity.public:/var/lib/zerotier-one/identity.public
> - /share/CACHEDEV3_DATA/Docker/zeroTier/identity.secret:/var/lib/zerotier-one/identity.secret
> /
> 
> - ./config/authtoken.secret:/var/lib/zerotier-one/authtoken.secret
> ## - ./config/identity.public:/var/lib/zerotier-one/identity.public
> ## - ./config/identity.secret:/var/lib/zerotier-one/identity.secret
> cap_add:
> - NET_ADMIN
> - SYS_ADMIN
> environment:
> - TZ=Europe/London
> labels:
> - "com.centurylinklabs.watchtower.enable=true"
> 
> dns:
> image: zerotier/zeronsd:latest
> restart: unless-stopped
> depends_on:
> - zerotier
> network_mode: host
> command: start myNetworkID -d home-network.zt
> volumes:
> - /share/CACHEDEV3_DATA/Docker/zeroTier:/var/lib/zerotier-one/authtoken.secret:ro
> ## - ./config/authtoken.secret:/var/lib/zerotier-one/authtoken.secret:ro
> environment:
> - TZ=Europe/London
> - ZEROTIER_CENTRAL_TOKEN=myAPIKey
> labels:
> - "com.centurylinklabs.watchtower.enable=true"

Can anyone assist?