Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/en/deploy/astrbot/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,16 @@ If there are no errors, you will see a log message similar to `🌈 Dashboard st
> If deployed on a cloud server, you need to open ports `6180-6200` and `11451` in the cloud provider's console.

Next, you need to deploy any messaging platform to use AstrBot on that platform.

## Configure an HTTP proxy in Docker

Set the HTTP proxy in the WebUI under `Settings → Network → Proxy & Dependency Sources → HTTP Proxy`. AstrBot reaches that address **from inside its own container**, so `http://127.0.0.1:7890` points at the AstrBot container itself rather than the host or another container.

If the proxy runs on the host, or in another container with the port published to the host:

- Mac / Windows (Docker Desktop): `http://host.docker.internal:7890`
- Linux: `http://172.17.0.1:7890` (replace `172.17.0.1` with your docker0 gateway if it differs)

If AstrBot and the proxy share a Docker network, use the proxy container name, for example `http://clash:7890`.

Clash-style clients commonly use HTTP on `7890` and SOCKS on `7891`. Use `http://` or `socks5://` to match the protocol. For a host-installed proxy, it must listen on a host interface reachable from Docker, such as `0.0.0.0` or the Docker gateway interface, rather than only `127.0.0.1`; publish the proxy port to the host.
2 changes: 1 addition & 1 deletion docs/en/dev/astrbot-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ Whether to enable the file service. Default is `false`. When enabled, the bot pr

### `http_proxy`

HTTP proxy. E.g., `http://localhost:7890`.
HTTP proxy. E.g., `http://localhost:7890`. When AstrBot runs in Docker, use an address reachable from the AstrBot container. See [Deploy with Docker](/en/deploy/astrbot/docker.md).

### `no_proxy`

Expand Down
2 changes: 1 addition & 1 deletion docs/en/use/webui.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ Global settings are under `Settings` at the bottom of the sidebar:

- `General`: timezone, external callback address, logs, and cache.
- `Appearance`: sidebar, theme, and text-to-image rendering.
- `Network`: HTTP proxy, Python package sources, and GitHub proxy.
- `Network`: HTTP proxy, Python package sources, and GitHub proxy. For the address to use when AstrBot runs in Docker, see [Deploy with Docker](/en/deploy/astrbot/docker.md).
- `Security`: WebUI HTTPS, login rate limits, and TOTP.
- `Maintenance`: backup, restore, and restart.
- `OpenAPI`: developer access keys.
Expand Down
13 changes: 13 additions & 0 deletions docs/zh/deploy/astrbot/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,16 @@ docker run -itd -p 6185:6185 -p 6199:6199 -e TZ=Asia/Shanghai -v "${PWD}\data:/A
> 如果部署在云服务器上,需要在相应厂商控制台里放行对应端口。

接下来,你需要部署任何一个消息平台,才能够实现在消息平台上使用 AstrBot。

## 在 Docker 中配置 HTTP 代理

AstrBot 的 HTTP 代理在 WebUI:`设置 → 网络 → 代理与依赖源 → HTTP 代理`。填写的地址由 **AstrBot 容器内部**访问,因此 `http://127.0.0.1:7890` 会连到 AstrBot 容器自己,而不是宿主机或其他容器。

代理跑在宿主机、或另一个容器并把端口映射到宿主机时:

- Mac / Windows(Docker Desktop):`http://host.docker.internal:7890`
- Linux:`http://172.17.0.1:7890`(把 `172.17.0.1` 换成本机 docker0 网关)

AstrBot 与代理在同一 Docker 网络时,用容器名,例如 `http://clash:7890`。

Clash 一类软件常见 HTTP `7890`、SOCKS `7891`,按实际协议写 `http://` 或 `socks5://`。请确认代理端口已映射到宿主机,且不是只绑在 `127.0.0.1`(写成 `127.0.0.1:7890:7890` 时,其他容器从网关进不去)。
2 changes: 1 addition & 1 deletion docs/zh/dev/astrbot-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ AstrBot API 的地址。用于渲染 Markdown 图片。当 `t2i_strategy` 为 `r

### `http_proxy`

HTTP 代理。如 `http://localhost:7890`。
HTTP 代理。如 `http://localhost:7890`。Docker 部署时请填写 AstrBot 容器能访问到的地址,见 [Docker 部署](/deploy/astrbot/docker.md)。

### `no_proxy`

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/use/webui.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ChatUI 支持以下常用能力:

- `常规`:时区、外部回调地址、日志和缓存。
- `外观`:侧边栏、主题和文本转图像。
- `网络`:HTTP 代理、Python 依赖源和 GitHub 加速地址。
- `网络`:HTTP 代理、Python 依赖源和 GitHub 加速地址。Docker 下的代理填法见 [Docker 部署](/deploy/astrbot/docker.md)。
- `安全`:WebUI HTTPS、登录限速和 TOTP。
- `维护`:备份、恢复和重启。
- `OpenAPI`:开发者访问密钥。
Expand Down
Loading