Skip to content

OpenClaw

安装与初始化

OpenClaw 是面向服务端的 Agent Gateway,适合 Linux 服务器或 macOS 终端运行。

1. 安装

bash
curl -fsSL https://openclaw.ai/install.sh | bash

提示时输入 yes 确认。

2. 初始化

按提示走完:

步骤选择
启动模式QuickStart
厂商选择Skip for now
Adapteranthropic
Modelopus-4.6sonnet-4-6
Social media adapterTelegram
Bot Token输入你 BotFather 拿到的 Token
Skill 安装跳过(后续在 Web UI 装)
Hooks用空格选全部 + 回车确认
Access method跳过
Shell completionyes 确认

todo

渠道与模型配置

OpusClaw 用户可以用现成的配置脚本接入(也可手工配,本节用脚本)。

用配置器

bash
curl -fsSL https://github.com/opusclaw/openclaw-configurator/releases/latest/download/index.js \
  -o /tmp/openclaw-config.js && node /tmp/openclaw-config.js

上述脚本仓库为示例占位,如尚未发布,可以参考下面"手工配"小节自行用 OpusClaw 接入。

按交互菜单走:

  1. 选 "Add Provider" → "Custom"(填 OpusClaw)
  2. 选模型(例如 claude-opus-4-6-thinking)
  3. 输入 API Key(claude 分组令牌)
  4. 选已配置的模型
  5. 退出后重启 Gateway:
bash
openclaw gateway restart
  1. TUI 测试:
bash
openclaw tui

手工配(不用脚本)

编辑 ~/.openclaw/openclaw.json,在 providers 段加:

json
{
  "name": "OpusClaw",
  "base_url": "https://api.opusclaw.me",
  "api_key": "你的 claude 分组令牌",
  "model": "claude-opus-4-6-thinking",
  "adapter": "anthropic"
}

然后 openclaw gateway restart

浏览器访问 Dashboard

  1. 从 console 拿 Dashboard URL
  2. 修改 ~/.openclaw/openclaw.json,加入浏览器访问设置
  3. openclaw gateway restart
  4. 浏览器打开 Dashboard URL

Telegram Bot 授权

  1. 回到 BotFather 对话,点击你的 bot 链接
  2. 拿到第一次对话里的 Pairing code
  3. 执行:
bash
openclaw pairing approve telegram <your-pairing-code>

常见问题

现象解决
Gateway 启动报错检查 ~/.openclaw/openclaw.json 字段格式
401 / 模型不存在检查 API Key 与分组是否对应
Telegram bot 无响应检查 Pairing code 是否正确,Bot Token 是否有效

OpusClaw