From 73bf83d2ffc8ae9f446dd63823a8ffe41958a08b Mon Sep 17 00:00:00 2001 From: zhayujie Date: Mon, 25 May 2026 00:09:52 +0800 Subject: [PATCH] docs: add public-access notes for server deployment --- README.md | 2 ++ docs/en/guide/manual-install.mdx | 4 ++-- docs/en/guide/quick-start.mdx | 4 ++++ docs/guide/manual-install.mdx | 4 ++-- docs/guide/quick-start.mdx | 4 ++++ docs/ja/README.md | 2 ++ docs/zh/README.md | 4 +++- 7 files changed, 19 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 1ffa941a..513ea959 100644 --- a/README.md +++ b/README.md @@ -72,6 +72,8 @@ docker compose up -d Once started, open `http://localhost:9899` to access the **Web console** — your one-stop hub to chat with the Agent, configure models, connect channels, and install skills. +> Deploying on a server? Set `web_host` to `0.0.0.0` in `config.json` to make the console reachable from outside, and set `web_password` to protect it. Don't forget to open port `9899` in your firewall or security group. + > 📖 Detailed guides: [Quick Start](https://docs.cowagent.ai/en/guide/quick-start) · [Install from Source](https://docs.cowagent.ai/en/guide/manual-install) · [Upgrade](https://docs.cowagent.ai/en/guide/upgrade) After installation, manage the service with the [cow CLI](https://docs.cowagent.ai/en/cli/index): diff --git a/docs/en/guide/manual-install.mdx b/docs/en/guide/manual-install.mdx index e610ae28..e17c0e84 100644 --- a/docs/en/guide/manual-install.mdx +++ b/docs/en/guide/manual-install.mdx @@ -81,7 +81,7 @@ nohup python3 app.py & tail -f nohup.out ``` - If deploying on a server, open port `9899` in your firewall or security group to access the Web console. It's recommended to restrict access to specific IPs for security. + **Deploying on a server?** By default `web_host` only listens on `127.0.0.1` (local access). Set `web_host` to `0.0.0.0` in `config.json` to make the console reachable from outside, and set `web_password` to protect it. Don't forget to open port `9899` in your firewall or security group — ideally restricted to specific IPs. ## Docker Deployment @@ -113,7 +113,7 @@ sudo docker logs -f chatgpt-on-wechat ``` - If deploying on a server, open port `9899` in your firewall or security group to access the Web console. It's recommended to restrict access to specific IPs for security. + **Running in Docker?** Set `WEB_HOST` to `0.0.0.0` in `docker-compose.yml` so the console is reachable from outside the container, and set `WEB_PASSWORD` to protect it. Make sure port `9899` is mapped to the host and open in your firewall or security group. ## Core Configuration diff --git a/docs/en/guide/quick-start.mdx b/docs/en/guide/quick-start.mdx index a23691e7..343956dc 100644 --- a/docs/en/guide/quick-start.mdx +++ b/docs/en/guide/quick-start.mdx @@ -33,6 +33,10 @@ The script automatically performs these steps: By default, the Web console starts after installation. Access `http://localhost:9899` to begin chatting. + + **Deploying on a server?** By default `web_host` only listens on `127.0.0.1` (local access only). Set `web_host` to `0.0.0.0` in `config.json` to make the console reachable from outside, and set `web_password` to protect it. Don't forget to open port `9899` in your firewall or security group — ideally restricted to specific IPs. + + ## Management Commands After installation, use the `cow` command to manage the service: diff --git a/docs/guide/manual-install.mdx b/docs/guide/manual-install.mdx index 305a355c..18aecd1d 100644 --- a/docs/guide/manual-install.mdx +++ b/docs/guide/manual-install.mdx @@ -97,7 +97,7 @@ nohup python3 app.py & tail -f nohup.out ``` - 如果在服务器上部署,需要在防火墙或安全组中放行 `9899` 端口才能通过浏览器访问 Web 控制台,建议仅对指定IP开放以保证安全。 + **服务器公网访问 Web 控制台**:默认 `web_host` 仅监听 `127.0.0.1`(本机访问),需公网访问时请在 `config.json` 中将 `web_host` 设为 `0.0.0.0`,同时强烈建议设置 `web_password` 启用鉴权。此外还需在防火墙/安全组中放行 `9899` 端口,建议仅对指定 IP 开放以保证安全。 ## Docker 部署 @@ -129,7 +129,7 @@ sudo docker logs -f chatgpt-on-wechat ``` - 如果在服务器上部署,需要在防火墙或安全组中放行 `9899` 端口才能通过浏览器访问 Web 控制台,建议仅对指定IP开放以保证安全。 + **Docker 公网访问 Web 控制台**:在 `docker-compose.yml` 中将 `WEB_HOST` 设为 `0.0.0.0`(容器内默认绑定 `127.0.0.1` 无法从宿主机外访问),同时强烈建议设置 `WEB_PASSWORD` 启用鉴权。此外需确保 `9899` 端口正确映射到宿主机,并在防火墙/安全组放行该端口。 ## 核心配置项 diff --git a/docs/guide/quick-start.mdx b/docs/guide/quick-start.mdx index 9a2b55f7..dd71ee88 100644 --- a/docs/guide/quick-start.mdx +++ b/docs/guide/quick-start.mdx @@ -33,6 +33,10 @@ description: 使用脚本一键安装和管理 CowAgent 运行后默认启动 Web 控制台,访问 `http://localhost:9899` 开始对话和管理Agent。 + + **服务器部署需要公网访问控制台时**,请在 `config.json` 中将 `web_host` 设为 `0.0.0.0`(默认仅监听 `127.0.0.1` 本机访问),同时强烈建议设置 `web_password` 启用鉴权。然后通过 `http://:9899` 访问,并确保防火墙/安全组放行 `9899` 端口。 + + ## 管理命令 安装完成后,使用 `cow` CLI 管理服务: diff --git a/docs/ja/README.md b/docs/ja/README.md index bf534951..62dba7a5 100644 --- a/docs/ja/README.md +++ b/docs/ja/README.md @@ -72,6 +72,8 @@ docker compose up -d 起動後、`http://localhost:9899` にアクセスして **Web コンソール**を開くと、モデル設定・チャネル接続・Skill インストールがすべてここで完結します。 +> サーバーデプロイでコンソールに公開アクセスする場合は、`config.json` の `web_host` を `0.0.0.0` に設定してください(あわせて `web_password` の設定も強く推奨)。その後 `http://:9899` にアクセスし、ファイアウォール/セキュリティグループで `9899` ポートを開放することも忘れずに。 + > 📖 詳細ガイド: [クイックスタート](https://docs.cowagent.ai/ja/guide/quick-start) · [ソースからインストール](https://docs.cowagent.ai/ja/guide/manual-install) · [アップグレード](https://docs.cowagent.ai/ja/guide/upgrade) インストール後は、[`cow` CLI](https://docs.cowagent.ai/ja/cli/index) でサービスを管理できます: diff --git a/docs/zh/README.md b/docs/zh/README.md index 36f2c4d3..0d8234e2 100644 --- a/docs/zh/README.md +++ b/docs/zh/README.md @@ -72,6 +72,8 @@ docker compose up -d 启动成功后访问 `http://localhost:9899` 进入 **Web 控制台**,在控制台内即可完成模型配置、渠道接入、技能安装等全部操作。 +> 服务器部署且需要公网访问控制台时,请在 `config.json` 中将 `web_host` 设为 `0.0.0.0`(同时强烈建议设置 `web_password` 启用鉴权),然后访问 `http://:9899`,并确保防火墙/安全组放行 `9899` 端口。 + > 📖 详细安装指南:[快速开始](https://docs.cowagent.ai/guide/quick-start) · [源码安装](https://docs.cowagent.ai/guide/manual-install) · [升级](https://docs.cowagent.ai/guide/upgrade) 安装后可使用 `cow` [CLI 命令](https://docs.cowagent.ai/cli) 管理服务: @@ -210,8 +212,8 @@ CowAgent 支持国内外主流厂商的大语言模型。**文本对话、图像 也可通过以下方式获取支持: -- 🤖 在线 AI 助手:[项目小助手](https://link-ai.tech/app/Kv2fXJcH)(基于项目知识库) - 🐛 [提交 Issue](https://github.com/zhayujie/CowAgent/issues) +- 🤖 在线 AI 助手:[项目小助手](https://link-ai.tech/app/Kv2fXJcH)(基于项目知识库)