docs: add public-access notes for server deployment

This commit is contained in:
zhayujie
2026-05-25 00:09:52 +08:00
parent 36e1988fee
commit 73bf83d2ff
7 changed files with 19 additions and 5 deletions

View File

@@ -97,7 +97,7 @@ nohup python3 app.py & tail -f nohup.out
```
<Tip>
如果在服务器上部署,需要在防火墙安全组中放行 `9899` 端口才能通过浏览器访问 Web 控制台建议仅对指定IP开放以保证安全。
**服务器公网访问 Web 控制台**:默认 `web_host` 仅监听 `127.0.0.1`(本机访问),需公网访问时请在 `config.json` 中将 `web_host` 设为 `0.0.0.0`,同时强烈建议设置 `web_password` 启用鉴权。此外还需在防火墙/安全组中放行 `9899` 端口,建议仅对指定 IP 开放以保证安全。
</Tip>
## Docker 部署
@@ -129,7 +129,7 @@ sudo docker logs -f chatgpt-on-wechat
```
<Tip>
如果在服务器上部署,需要在防火墙或安全组中放行 `9899` 端口才能通过浏览器访问 Web 控制台建议仅对指定IP开放以保证安全
**Docker 公网访问 Web 控制台**:在 `docker-compose.yml` 中将 `WEB_HOST` 设为 `0.0.0.0`(容器内默认绑定 `127.0.0.1` 无法从宿主机外访问),同时强烈建议设置 `WEB_PASSWORD` 启用鉴权。此外需确保 `9899` 端口正确映射到宿主机,并在防火墙/安全组放行该端口
</Tip>
## 核心配置项

View File

@@ -33,6 +33,10 @@ description: 使用脚本一键安装和管理 CowAgent
运行后默认启动 Web 控制台,访问 `http://localhost:9899` 开始对话和管理Agent。
<Note>
**服务器部署需要公网访问控制台时**,请在 `config.json` 中将 `web_host` 设为 `0.0.0.0`(默认仅监听 `127.0.0.1` 本机访问),同时强烈建议设置 `web_password` 启用鉴权。然后通过 `http://<server-ip>:9899` 访问,并确保防火墙/安全组放行 `9899` 端口。
</Note>
## 管理命令
安装完成后,使用 `cow` CLI 管理服务: