Skip to content

Instantly share code, notes, and snippets.

@elcritch
Last active July 24, 2019 13:12
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save elcritch/fd9cfdf442201acc0e9ae85deb2f56fd to your computer and use it in GitHub Desktop.
Save elcritch/fd9cfdf442201acc0e9ae85deb2f56fd to your computer and use it in GitHub Desktop.
Run ZeroTier on RancherOS
#cloud-config
rancher:
services:
zerotier:
image: zerotier/zerotier-containerized:1.2.4
labels:
io.rancher.os.scope: system
volumes:
- /var/lib/zerotier-one:/var/lib/zerotier-one
restart: always
net: host
devices:
- /dev/net/tun:/dev/net/tun
cap_add:
- NET_ADMIN
- SYS_ADMIN
volumes_from:
- system-volumes
zerotier-join:
image: zerotier/zerotier-containerized:1.2.4
labels:
io.rancher.os.scope: system
volumes:
- /var/lib/zerotier-one:/var/lib/zerotier-one
restart: on-failure
net: host
entrypoint: /zerotier-cli join XYZ
depends_on:
- zerotier
@vitobotta
Copy link

Hi! I was looking for more info about the Docker image but Docker Hub doesn't show any results for this. I am looking to use a VPN with RancherOS. Thanks

@elcritch
Copy link
Author

Odd, looks like the official zerotier image is missing on docker hub. I haven't used it in a while. But really it's pretty simple either run it as a sidecar process in another image you already have (e.g. Running ZeroTier in a Docker Container, or just take any barebones debian docker and install and configure zerotier in it. Then change the image name in here.

@vitobotta
Copy link

Odd, looks like the official zerotier image is missing on docker hub. I haven't used it in a while. But really it's pretty simple either run it as a sidecar process in another image you already have (e.g. Running ZeroTier in a Docker Container, or just take any barebones debian docker and install and configure zerotier in it. Then change the image name in here.

Hi, thanks for your reply and sorry for the delay. In the meantime I choose not to use Zerotier because anyway I'd have to trust third parties quite a bit. So I created a solution based on Wireguard instead (https://github.com/vitobotta/docker-wireguard). Thanks!

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