访问Web界面
- 在浏览器中打开:
http://<SERVER_IP>:3000 - The first registered user automatically becomes administrator.
重要文件和目录
- 应用程序安装:
/root/ztnet - Docker Compose 文件:
/root/ztnet/docker-compose.yml - 环境变量:
/root/ztnet/.env - PostgreSQL database data:
/var/lib/docker/volumes/ztnet_postgres-data/_data - ZeroTier controller data:
/var/lib/docker/volumes/ztnet_zerotier/_data
ZeroTier Usage
Enter the container:
docker exec -it zerotier sh
Useful commands inside container:
zerotier-cli status # show node status
zerotier-cli listnetworks # list joined networks
zerotier-cli listpeers # list connected peers
ip a # check network interfaces
Join a network:
docker exec -it zerotier zerotier-cli join <network-id>
服务管理
列出容器:
docker ps
重启容器:
# ZTNET stack
cd /root/ztnet
docker compose restart
# Single container
docker restart zerotier
docker restart ztnet
docker restart postgres
Follow container logs:
# All containers
docker compose logs -f
# Single container
docker logs -f ztnet
docker logs -f zerotier
docker logs -f postgres
Deploy the stack:
cd /root/ztnet
docker compose up -d --wait
SSL / HTTPS Setup (Optional)
- Uncomment the HTTPS proxy section in
docker-compose.yml. - 替换
<YOUR-PUBLIC-HOST-NAME>with your domain. - Create the Caddy volume (if not already).
- Set
NEXTAUTH_URLto your domain indocker-compose.yml. - Recreate the stack:
docker compose up -d
