主题
OpenClaw
安装与初始化
OpenClaw 是面向服务端的 Agent Gateway,适合 Linux 服务器或 macOS 终端运行。
1. 安装
bash
curl -fsSL https://openclaw.ai/install.sh | bash提示时输入 yes 确认。
2. 初始化
按提示走完:
| 步骤 | 选择 |
|---|---|
| 启动模式 | QuickStart |
| 厂商选择 | Skip for now |
| Adapter | anthropic |
| Model | opus-4.6 或 sonnet-4-6 |
| Social media adapter | Telegram |
| Bot Token | 输入你 BotFather 拿到的 Token |
| Skill 安装 | 跳过(后续在 Web UI 装) |
| Hooks | 用空格选全部 + 回车确认 |
| Access method | 跳过 |
| Shell completion | 输 yes 确认 |
渠道与模型配置
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 接入。
按交互菜单走:
- 选 "Add Provider" → "Custom"(填 OpusClaw)
- 选模型(例如
claude-opus-4-6-thinking) - 输入 API Key(claude 分组令牌)
- 选已配置的模型
- 退出后重启 Gateway:
bash
openclaw gateway restart- 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
- 从 console 拿 Dashboard URL
- 修改
~/.openclaw/openclaw.json,加入浏览器访问设置 openclaw gateway restart- 浏览器打开 Dashboard URL
Telegram Bot 授权
- 回到 BotFather 对话,点击你的 bot 链接
- 拿到第一次对话里的
Pairing code - 执行:
bash
openclaw pairing approve telegram <your-pairing-code>常见问题
| 现象 | 解决 |
|---|---|
| Gateway 启动报错 | 检查 ~/.openclaw/openclaw.json 字段格式 |
| 401 / 模型不存在 | 检查 API Key 与分组是否对应 |
| Telegram bot 无响应 | 检查 Pairing code 是否正确,Bot Token 是否有效 |