Files
deploy-zerotier-aio/README.md
2026-02-22 23:27:51 +08:00

39 lines
1.3 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# ZeroTier AIO 自建 Moon + Controller + ztncui中文版
## 目录说明
/opt/zerotier-aio/
├── docker-compose.yml 配置文件
├── etc ztncui 数据库、配置
├── zerotier-one ZeroTier 数据身份、Moon、网络
├── zerotier-aio-zh.tar 离线镜像包
└── zt-mkworld planet 生成目录(暂未使用)
## 快速部署
1. 上传 zerotier-aio-zh.tar 到 /opt/zerotier-aio/
2. chmod +x deploy-zerotier-aio.sh
3. sudo ./deploy-zerotier-aio.sh
4. 阿里云安全组放行9993/udp、3000/tcp、3443/tcp
## 备份与迁移
备份:
tar -czf zerotier-aio-$(date +%Y%m%d).tar.gz /opt/zerotier-aio
新服务器恢复:
1. 解压到 /opt/zerotier-aio
2. 修改 docker-compose.yml 中的 MYADDR 为新公网 IP
3. 如果 Moon IP 变了,需要重新生成 Moon删除 zerotier-one/moons.d 后重新运行脚本)
4. docker load -i zerotier-aio-zh.tar
5. docker compose up -d
## 客户端加入
1. 手动放置 Moon 文件 或 执行:
zerotier-cli orbit <MoonID> <MoonID>
2. zerotier-cli join <网络ID>
3. Web 面板授权成员
4. set <网络ID> allowManaged=1
## 注意事项
- 密码admin123首次登录立即修改
- HTTP 端口3000已禁用 HTTPS
- Moon 文件为二进制,不要用文本编辑器打开