Sign inSign up

imashen/zerotier-aio

By imashen

•Updated almost 2 years ago

Zerotier Private Server with WebUI

Image
Networking
Security
Integration & delivery
0

3.6K

imashen/zerotier-aio repository overview

⁠README.md

⁠Zerotier All in One

GitHub License Docker Automated build Current Release GitHub stars GitHub forks Docker Pulls Docker Image Size GitHub issues GitHub closed issues GitHub contributors

Quick Navigation:

Setup Standalone Panel⁠ Environment Variables⁠ File Server⁠ Setup Moon/Planet Server⁠


⁠Simple Usage⁠

docker run -d -p 9993:9993/udp -p 3443:3443 -p 3180:3180 \
    -v zerotier-one:/var/lib/zerotier-one \
    -v zerotier-webui:/opt/imashen/zerotier-webui/etc \
    -v zerotier-logs:/var/log/zerotier-aio \
    --env-file ./denv \
    --name zerotier-aio \
    imashen/zerotier-aio

Additionally, you can change the data volume to be mounted as a local directory, and the method of introducing environment variables can also be changed to use the -e option. For the contents of the --env-file environment variable file, please refer to the denv in the repository.

docker run -d -p 9993:9993/udp -p 3443:3443 -p 3180:3180 \
    -v /opt/zerotier/zerotier-one:/var/lib/zerotier-one \
    -v /opt/zerotier/zerotier-webui:/opt/imashen/zerotier-webui/etc \
    -v /opt/zerotier/zerotier-logs:/var/log/zerotier-aio \
    -e NODE_ENV=production \
    -e ZEROTIER-WEBUI_PASSWD=password \
    -e MYDOMAIN=site.test \
    --name zerotier-aio \
    imashen/zerotier-aio
⁠Files Func

/var/lib/zerotier-one is used to store Zerotier's default runtime and configuration files.

files-zt1

/opt/imashen/zerotier-webui/etc is the file server and contains the certificates for the Web UI.

files-webui

/var/log/zerotier-aio stores the log files.

files-logs


⁠Environment Variables⁠

⁠Required Environment Variables
NameDescriptionDefault Value
NODE_ENVRefer to https://pugjs.org/api/express.html⁠production
MYADDRYour IP address, preferably a public IPNo default value
⁠Optional Environment Variables
NameDescriptionDefault Value
HTTPS_HOSTListen only on HTTPS_HOST:HTTPS_PORTNo default value
HTTPS_PORT⁠HTTPS Port3443
HTTP_PORT⁠HTTP Port3000
HTTP_ALL_INTERFACESListen on all interfaces, applicable only to HTTP, suitable for reverse proxyNo default value
MYDOMAINDomain name for dynamically generated TLS certificatessite.test(can also be the local IP)
ZEROTIER-WEBUI_PASSWDPassword for the dynamically generated adminpassword(in the new version of the image, it may be dynamically generated; see the logs for details)

Please note that for security, HTTPS_PORT⁠ listens on all network interfaces by default, while HTTP_PORT⁠ listens only on localhost/127.0.0.1.


⁠File Server⁠

This image opens an HTTP server on port 3180⁠, allowing you to serve files stored in /myfs/. For example, you can use this to build your own root server and distribute planet files.


⁠Moon/Planet Easy Deployment

You can enter the container using docker exec -it zerotier-aio /bin/bash.

exec_container

Run mkmoon⁠ or mkplanet⁠ to view help.


⁠1. Setup Moon Server | mkmoon⁠

Enter the command mkmoon to get help information.

usage_mkmoon

Usage: mkmoon [options]
Options:
  -h, --help            Display this help message
  -4 <IPv4>             Set the IPv4 address for the moon
  -6 <IPv6>             Set the IPv6 address for the moon
  -p <port>             Set the port for the moon (default is 9993)

You must provide either an IPv4 or IPv6 address. Each parameter can be omitted. The default port is 9993.

The following is an example of a successful operation:

usage_mkmoon_out


⁠2. Setup Planet Server | mkplanet⁠

Enter the command mkplanet to get help information.

usage_mkplanet

Usage: mkplanet [options]
Options:
  -h, --help          Display this help message
  -j2b, --json2bin      Convert from JSON file to planet
  -b2j, --bin2json      Convert from planet to JSON format
  -r, --reset              Reset planet from origin-planet.json

First, run mkplanet -b2j or mkplanet --bin2json to convert the official planet file to a JSON file for easy modification.

usage_mkplanet_b2j

Fill in your own Planet server information in the planet.json file following the specified structure. You can fill in up to four entries.

planet_json

After configuring, run mkplanet -j2b or mkplanet --json2bin to repackage the JSON file into a planet file.

usage_mkplanet_j2b

Distribute this planet file to your devices to set up your own Moon server. For easier distribution, see File Server⁠.

Additionally, the mkplanet tool includes a one-click reset feature. If your configuration file is corrupted or you lose the official file,
you can use mkplanet -r or mkplanet --reset to regenerate the official planet file.

usage_mkplanet_reset

Tag summary

Content type

Image

Digest

sha256:6658a4cf7…

Size

107.4 MB

Last updated

almost 2 years ago

docker pull imashen/zerotier-aio