准备工作
| 项目 | 说明 |
|---|---|
| Mac mini | 云服务器、旧电脑或树莓派亦可 |
| 飞书账号 | 用于创建机器人 |
| 国产模型 API | OpenClaw 默认显示国际模型,国产需单独配置 |
部署 OpenClaw
快速安装
终端执行稳定版命令:
curl -fsSL https://openclaw.ai/install.sh | bash
若需测试版(可能含 Bug):
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --beta
安装后确认风险提示,选择 Yes。进入 QuickStart 模式。
模型与通道配置
默认支持国际模型,国内模型建议跳过此步后续单独配置。注意 Kimi、MiniMax 等需使用国际版接口。 聊天软件引导多显示国外应用,此处先跳过,稍后通过插件添加。 技能包新手无需添加,选 No 跳过。 Hooks 配置建议启用 Memory,支持多轮对话上下文。
部署完成后,运行 openclaw --version 验证版本。耗时约 30 秒至 1 分钟。
如英文界面不友好,可安装汉化版:
curl -fsSL -o install.sh https://cdn.jsdelivr.net/gh/1186258278/OpenClawChineseTranslation@main/install.sh && bash install.sh
接入国产大模型
OpenClaw 消耗 Token 较多,国产模型性价比更高。以 DeepSeek 为例: 获取 API Key 后设置:
openclaw config set 'models.providers.deepseek' --json '{ "baseUrl": "https://api.deepseek.com/v1", "apiKey": "", "api": "openai-completions", "models": [ { "id": "deepseek-chat", "name": "DeepSeek Chat" }, { "id": "deepseek-reasoner", "name": "DeepSeek Reasoner" } ] }'
设置合并模式并指定默认模型:
openclaw config set models.mode merge
openclaw models set deepseek/deepseek-chat
通用模板适用于其他兼容 OpenAI 协议的模型:
openclaw config set 'models.providers.{provider_name}' --json '{ "baseUrl": "https://{baseurl}", "apiKey": "", "api": "openai-completions", "models": [ { "id": "{model_id}", "name": "{model_name}" } ] }'
openclaw config set models.mode merge
openclaw models set {provider_name}/{model_id}

