Skip to content

Ai-court镜像内置 OpenClaw 与外部已有 OpenClaw 冲突,如何配置共用外部服务? #120

@zamelee

Description

@zamelee

你好,我在使用 boluobobo/ai-court 镜像时遇到一个问题:

该Ai-court镜像内置了 OpenClaw 服务,会自动启动一个独立的 OpenClaw 实例。
但我本地已经有另一个正在运行的 OpenClaw 容器,两者会出现:

  1. 端口冲突
  2. 服务冲突
  3. 配置重复

我希望实现:

  1. 关闭镜像内部的 OpenClaw 服务
  2. 让 ai-court 直接连接我外部已有的 OpenClaw 服务(Docker)
  3. 不启动新实例,不冲突

请问需要配置哪些环境变量?
是否需要:

  • ENABLE_INTERNAL_CLAW=false
  • CLAW_SERVER_HOST
  • CLAW_SERVER_PORT
  • CLAW_API_TOKEN

希望官方提供一个共用外部 OpenClaw的标准配置示例,谢谢!

Details

2026-03-24 08:48:39.083 |
2026-03-24 08:48:39.083 | ================================
2026-03-24 08:48:39.083 | ⚠ 配置文件不存在
2026-03-24 08:48:39.083 | ================================
2026-03-24 08:48:39.083 |
2026-03-24 08:48:39.083 | 请选择一种方式初始化:
2026-03-24 08:48:39.083 |
2026-03-24 08:48:39.083 | 方式一:新开终端进入容器初始化(推荐)
2026-03-24 08:48:39.083 | docker exec -it ai-court init-court
2026-03-24 08:48:39.083 |
2026-03-24 08:48:39.083 | 方式二:如果方式一失败(容器重启中),用 run 代替
2026-03-24 08:48:39.083 | docker compose run -it court bash
2026-03-24 08:48:39.083 | init-court
2026-03-24 08:48:39.083 |
2026-03-24 08:48:39.083 | ⚠ Windows Git Bash 用户若遇路径问题:
2026-03-24 08:48:39.083 | MSYS_NO_PATHCONV=1 docker exec -it ai-court /init-docker.sh
2026-03-24 08:48:39.083 |
2026-03-24 08:48:39.083 | 容器将保持运行,等待配置完成后自动启动 Gateway...
2026-03-24 08:48:39.083 |
2026-03-24 08:59:56.815 | ✓ 检测到配置文件,启动 Gateway...
2026-03-24 08:59:56.821 | ✓ 朝堂 Dashboard 启动中...
2026-03-24 08:59:56.822 | ✓ Dashboard 已启动 (PID: 371, 端口: 18795)
2026-03-24 08:59:56.822 |
2026-03-24 08:59:56.822 | 🏛️ AI 朝廷 Docker 启动中...
2026-03-24 08:59:56.822 | 工作区: /home/court/clawd
2026-03-24 08:59:56.822 | 配置: /home/court/.openclaw/openclaw.json
2026-03-24 08:59:56.822 | Gateway: http://localhost:18789
2026-03-24 08:59:56.822 | Dashboard: http://localhost:18795
2026-03-24 08:59:56.822 | 初始化: docker exec -it ai-court init-court
2026-03-24 08:59:56.822 |
2026-03-24 08:59:57.433 |
2026-03-24 08:59:57.434 | ╔══════════════════════════════════════════════════════════════╗
2026-03-24 08:59:57.434 | ║ ⚠️ 安全警告: BOLUO_AUTH_TOKEN 未设置或使用了默认值! ║
2026-03-24 08:59:57.434 | ║ 已自动生成随机 Token(仅本次运行有效) ║
2026-03-24 08:59:57.434 | ║ 请设置环境变量: export BOLUO_AUTH_TOKEN=$(openssl rand -hex 16) ║
2026-03-24 08:59:57.434 | ╚══════════════════════════════════════════════════════════════╝
2026-03-24 08:59:57.434 | 本次 Token: edf063c7ca239a8297d52e2511bd01af
2026-03-24 08:59:57.434 |
2026-03-24 08:59:57.451 | Boluo GUI running on http://0.0.0.0:18795 (HTTP + WebSocket)
2026-03-24 08:59:57.451 | ⚠️ GUI 监听所有网口,确保已配置防火墙或反向代理
2026-03-24 09:00:00.790 | Invalid config at /home/court/.openclaw/openclaw.json:\n- models.providers.provider.api: Invalid option: expected one of "openai-completions"|"openai-responses"|"openai-codex-responses"|"anthropic-messages"|"google-generative-ai"|"github-copilot"|"bedrock-converse-stream"|"ollama"
2026-03-24 09:00:01.050 | │
2026-03-24 09:00:01.050 | ◇ Config ───────────────────────────────────────────────────╮
2026-03-24 09:00:01.050 | │ │
2026-03-24 09:00:01.050 | │ Config invalid; doctor will run with best-effort config. │
2026-03-24 09:00:01.050 | │ │
2026-03-24 09:00:01.050 | ├────────────────────────────────────────────────────────────╯
2026-03-24 09:00:01.051 | │
2026-03-24 09:00:01.051 | ◇ Doctor changes ─────────────────────────────────────────────╮
2026-03-24 09:00:01.052 | │ │
2026-03-24 09:00:01.052 | │ Moved channels.feishu single-account top-level values into │
2026-03-24 09:00:01.052 | │ channels.feishu.accounts.default. │
2026-03-24 09:00:01.052 | │ │
2026-03-24 09:00:01.052 | ├──────────────────────────────────────────────────────────────╯
2026-03-24 09:00:01.132 | │
2026-03-24 09:00:01.132 | ◇ Doctor changes ────────────────────────────╮
2026-03-24 09:00:01.132 | │ │
2026-03-24 09:00:01.132 | │ feishu configured, enabled automatically. │
2026-03-24 09:00:01.132 | │ │
2026-03-24 09:00:01.132 | ├─────────────────────────────────────────────╯
2026-03-24 09:00:01.135 | │
2026-03-24 09:00:01.135 | ◇ Doctor warnings ──────────────────────────────────────────────────────╮
2026-03-24 09:00:01.135 | │ │
2026-03-24 09:00:01.135 | │ - channels.feishu.accounts.default.allowFrom: set to [""] (required │
2026-03-24 09:00:01.135 | │ by dmPolicy="open") │
2026-03-24 09:00:01.135 | │ - Run "openclaw doctor --fix" to add missing allowFrom wildcards. │
2026-03-24 09:00:01.135 | │ │
2026-03-24 09:00:01.135 | ├────────────────────────────────────────────────────────────────────────╯
2026-03-24 09:00:01.139 | │
2026-03-24 09:00:01.139 | ◇ Doctor ──────────────────────────────────────────────╮
2026-03-24 09:00:01.139 | │ │
2026-03-24 09:00:01.139 | │ Run "openclaw doctor --fix" to apply these changes. │
2026-03-24 09:00:01.139 | │ Run "openclaw doctor --fix" to apply these changes. │
2026-03-24 09:00:01.139 | │ │
2026-03-24 09:00:01.139 | ├───────────────────────────────────────────────────────╯
2026-03-24 09:00:01.197 | Config invalid
2026-03-24 09:00:01.198 | File: ~/.openclaw/openclaw.json
2026-03-24 09:00:01.198 | Problem:
2026-03-24 09:00:01.199 | - models.providers.provider.api: Invalid option: expected one of "openai-completions"|"openai-responses"|"openai-codex-responses"|"anthropic-messages"|"google-generative-ai"|"github-copilot"|"bedrock-converse-stream"|"ollama"
2026-03-24 09:00:01.200 |
2026-03-24 09:00:01.200 | Run: openclaw doctor --fix
2026-03-24 09:00:01.978 | ✓ 朝堂 Dashboard 启动中...
2026-03-24 09:00:01.978 | ✓ Dashboard 已启动 (PID: 10, 端口: 18795)
2026-03-24 09:00:01.978 |
2026-03-24 09:00:01.978 | 🏛️ AI 朝廷 Docker 启动中...
2026-03-24 09:00:01.978 | 工作区: /home/court/clawd
2026-03-24 09:00:01.978 | 配置: /home/court/.openclaw/openclaw.json
2026-03-24 09:00:01.978 | Gateway: http://localhost:18789
2026-03-24 09:00:01.978 | Dashboard: http://localhost:18795
2026-03-24 09:00:01.978 | 初始化: docker exec -it ai-court init-court
2026-03-24 09:00:01.978 |
2026-03-24 09:00:02.157 |
2026-03-24 09:00:02.157 | ╔══════════════════════════════════════════════════════════════╗
2026-03-24 09:00:02.157 | ║ ⚠️ 安全警告: BOLUO_AUTH_TOKEN 未设置或使用了默认值! ║
2026-03-24 09:00:02.157 | ║ 已自动生成随机 Token(仅本次运行有效) ║
2026-03-24 09:00:02.157 | ║ 请设置环境变量: export BOLUO_AUTH_TOKEN=$(openssl rand -hex 16) ║
2026-03-24 09:00:02.157 | ╚══════════════════════════════════════════════════════════════╝
2026-03-24 09:00:02.157 | 本次 Token: 30f336934139fea9483a985adbb36d71
2026-03-24 09:00:02.157 |
2026-03-24 09:00:02.166 | Boluo GUI running on http://0.0.0.0:18795 (HTTP + WebSocket)
2026-03-24 09:00:02.167 | ⚠️ GUI 监听所有网口,确保已配置防火墙或反向代理
2026-03-24 09:00:04.121 | Invalid config at /home/court/.openclaw/openclaw.json:\n- models.providers.provider.api: Invalid option: expected one of "openai-completions"|"openai-responses"|"openai-codex-responses"|"anthropic-messages"|"google-generative-ai"|"github-copilot"|"bedrock-converse-stream"|"ollama"
2026-03-24 09:00:04.281 | │
2026-03-24 09:00:04.282 | ◇ Config ───────────────────────────────────────────────────╮
2026-03-24 09:00:04.282 | │ │
2026-03-24 09:00:04.282 | │ Config invalid; doctor will run with best-effort config. │
2026-03-24 09:00:04.282 | │ │
2026-03-24 09:00:04.282 | ├────────────────────────────────────────────────────────────╯
2026-03-24 09:00:04.283 | │
2026-03-24 09:00:04.283 | ◇ Doctor changes ─────────────────────────────────────────────╮
2026-03-24 09:00:04.283 | │ │
2026-03-24 09:00:04.283 | │ Moved channels.feishu single-account top-level values into │
2026-03-24 09:00:04.283 | │ channels.feishu.accounts.default. │
2026-03-24 09:00:04.283 | │ │
2026-03-24 09:00:04.283 | ├──────────────────────────────────────────────────────────────╯
2026-03-24 09:00:04.319 | │
2026-03-24 09:00:04.319 | ◇ Doctor changes ────────────────────────────╮
2026-03-24 09:00:04.319 | │ │
2026-03-24 09:00:04.319 | │ feishu configured, enabled automatically. │
2026-03-24 09:00:04.319 | │ │
2026-03-24 09:00:04.319 | ├─────────────────────────────────────────────╯
2026-03-24 09:00:04.322 | │
2026-03-24 09:00:04.322 | ◇ Doctor warnings ──────────────────────────────────────────────────────╮
2026-03-24 09:00:04.322 | │ │
2026-03-24 09:00:04.322 | │ - channels.feishu.accounts.default.allowFrom: set to ["
"] (required │
2026-03-24 09:00:04.322 | │ by dmPolicy="open") │
2026-03-24 09:00:04.322 | │ - Run "openclaw doctor --fix" to add missing allowFrom wildcards. │
2026-03-24 09:00:04.322 | │ │
2026-03-24 09:00:04.322 | ├────────────────────────────────────────────────────────────────────────╯
2026-03-24 09:00:04.326 | │
2026-03-24 09:00:04.326 | ◇ Doctor ──────────────────────────────────────────────╮
2026-03-24 09:00:04.326 | │ │
2026-03-24 09:00:04.326 | │ Run "openclaw doctor --fix" to apply these changes. │
2026-03-24 09:00:04.326 | │ Run "openclaw doctor --fix" to apply these changes. │
2026-03-24 09:00:04.326 | │ │
2026-03-24 09:00:04.326 | ├───────────────────────────────────────────────────────╯
2026-03-24 09:00:04.346 | Config invalid
2026-03-24 09:00:04.347 | File: ~/.openclaw/openclaw.json
2026-03-24 09:00:04.348 | Problem:
2026-03-24 09:00:04.350 | - models.providers.provider.api: Invalid option: expected one of "openai-completions"|"openai-responses"|"openai-codex-responses"|"anthropic-messages"|"google-generative-ai"|"github-copilot"|"bedrock-converse-stream"|"ollama"
2026-03-24 09:00:04.352 |
2026-03-24 09:00:04.354 | Run: openclaw doctor --fix
......

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions