Run your own ZeroTier Controller!
This is a laboratory project and will be replaced by a new tool (incl. Web UI), after version 1.2.0 is released.
Check out the awesome work the nice folks at ZeroTier are doing.
Peer-to-Peer Networks FTW!
Feel free to open a Pull Request and help us, to improve the project and add more features.
Also check out https://makersphere.org & follow us on https://twitter.com/makerspherehq ✌️
- Always built from source
- Docker powered
- Written in pure Shell
- No elevated permissions required
- Easy to manage
This Docker app contains a special build of ZeroTier One with ZT_ENABLE_NETWORK_CONTROLLER enabled.
It allows you to run your own private (or public) ZeroTier network.
Make sure to read the official documentation before you start the setup.
Clone the repository and build the Docker image using docker build -t makerspherelabs/zerotier-ctl:1.1.14 . on your server.
You need to cd into the cloned repo before you run the docker build command.
Start the container with e.g. docker run -dit -p 9993:9993/udp --name=zerotier-ctl --restart=unless-stopped makerspherelabs/zerotier-ctl:1.1.14.
Alright, your very own ZeroTier Controller is up and running.
Have fun!
Below are some sample calls to get your new controller to assign IP addresses to new members on a private network
Add a managed route
curl -H "X-ZT1-Auth: $API_SECRET" -H "Content-Type: application/json" -X POST -d '{"routes": [{"target": "10.250.50.0/24", "via": null, "flags":0, "metric":0}]}' $CONTROLLER_ADDRESS/controller/network/$NETWORK_ID
Add IP assignment pools (make sure they are within the managed route)
curl -H "X-ZT1-Auth: $API_SECRET" -H "Content-Type: application/json" -X POST -d '{"ipAssignmentPools": [{"ipRangeStart": "10.250.50.1", "ipRangeEnd": "10.250.50.254"}]}' $CONTROLLER_ADDRESS/controller/network/$NETWORK_ID
Set IPv4 assignment mode
curl -H "X-ZT1-Auth: $API_SECRET" -H "Content-Type: application/json" -X POST -d '{"v4AssignMode":{"zt": "true"}}' $CONTROLLER_ADDRESS/controller/network/$NETWORK_ID
Authorize a new member on a private network
curl --H"X-ZT1-Auth: $API_SECRET" 5-H "Content-Type: application/json" -X POST -d '{"authorized":"true"}' $CONTROLLER_ADDRESS/controller/network/$NETWORK_ID/member/$MEMBER_ID
This project is powered by the ZeroTier One API.
Go ahead and say thank you!