Skip to content

zerotier

This directory contains two examples of how to run Zerotier in Docker:

Create a copy of one of them and simply name it docker-compose.yml.

Then generate a client identity (private key) and place it into the ZEROTIER_IDENTITY_SECRET environment variable section:

Bash
docker run -it --rm --entrypoint=/usr/sbin/zerotier-idtool zerotier/zerotier generate

Write the network ID of the network you want to join into the command section of the Zerotier service.

Then run:

Bash
docker-compose up -d

To check that the Zerotier client has successfully joined the network (and also see its IP address for the VPN):

Bash
docker-compose exec zerotier zerotier-cli listnetworks