docker-zerotier-server
docker-zerotier-server copied to clipboard
docker-zerotier-server
Overview
Features:
- Fully functional, privately deployed Zerotier planet server with Official Controller and Controller UI (Zero-UI).
- Automatically detect the public ipv4 address of the server and generate the planet file to download.
- One-click deployment using
docker-composewith small size docker image. - Support switch China source to build.
Getting Started
Prerequisites
- A VPS with a static public ip (Open the following ports:
4000/tcpand9993/udp) dockeranddocker-composeinstalled
Installation
-
Clone this repo to your VPS
$ git clone https://github.com/hamlinzheng/docker-zerotier-server.git -
Modify the installation version of
ZeroTier(default: 1.8.6) andZero-UI(default: 1.2.1) indocker-compose.yml(Optional) -
Build the images
$ docker-compose build -
Run the containers in daemon
$ docker-compose up -d -
Navigate to
http://[PUBLIC_IP]:4000/app/to config your private ZeroTier service. The default username isadminand the default password iszero-ui
Note:
- This project does not provide HTTP reverse proxy, which needs to be deployed on the host machine.
- Since the public network ip of the server needs to be detected, it needs to be compiled on the deployed server
- A static key pair is used by default. You can use
zerotier-idtool generate identity.secret identity.publiccommand to generate a new key pair on the machine whereZeroTieris installed according to your own needs, and replace theconfigfolder.
Peers Usage
Download private planet file from http://[PUBLIC_IP]:4000/app/static/planet and use it replace the peer's planet file. Then you can connect to your own ZeroTier planet server.
Linux
$ sudo wget http://[PUBLIC_IP]:4000/app/static/planet -O /var/lib/zerotier-one/planet
$ sudo systemctl restart zerotier-one.service
Windows
Replace the planet file in the C:\ProgramData\ZeroTier\One path and restart the ZeroTier service.
Android
See kaaass/ZerotierFix
OpenWrt
Replace the planet file in the /etc/config/zero path and restart the ZeroTier service with $ /etc/init.d/zerotier restart
Synology and docker
TODO (https://docs.zerotier.com/devices/synology/)
How to verify
Use sudo zerotier-cli peers command to check whether your server ip is in the PLANET list.
Use zerotier-cli join command to join your private network.
TODO
- [ ] Optimize the docker image size of zero-ui
- [ ] Support multiple Planet
- [ ] Support IPv6
- [ ] Support domain