渠道配置
约 663 字大约 2 分钟
Telegram
OpenClaw 使用 grammY 通过 Telegram Bot API 支持私聊与群组。内容基于 官方 Telegram。
获取 Bot Token
在 Telegram 中与 @BotFather 对话,创建 Bot 并获取 Token。
配置
在 ~/.openclaw/openclaw.json 中设置:
{
"channels": {
"telegram": {
"botToken": "123456:ABCDEF..."
}
}也可使用环境变量 TELEGRAM_BOT_TOKEN。
群组与提及
可为群组配置允许列表与提及规则,例如仅在被 @ 时回复。详见 官方文档。
相关
OpenClaw 通过 Baileys 使用 WhatsApp Web 协议连接 WhatsApp。内容基于 官方 WhatsApp。
登录
openclaw channels login选择 WhatsApp 后按提示扫码,凭证会保存在 ~/.openclaw/credentials。
配置限制(可选)
在 ~/.openclaw/openclaw.json 中可限制允许联系的号码与群组:
{
"channels": {
"whatsapp": {
"allowFrom": ["+15555550123"],
"groups": { "*": { "requireMention": true } }
}
},
"messages": { "groupChat": { "mentionPatterns": ["@openclaw"] } }allowFrom:允许的私信号码列表groups:群组规则,"*"表示所有群,requireMention: true表示需 @ 助手才回复
Discord
OpenClaw 通过 discord.js 使用 Discord Bot API,支持私聊与服务器频道。内容基于 官方 Discord。
创建应用与 Bot
在 Discord Developer Portal 创建应用并添加 Bot,获取 Token。
配置
在 ~/.openclaw/openclaw.json 中设置:
{
"channels": {
"discord": {
"token": "YOUR_BOT_TOKEN"
}
}也可使用环境变量 DISCORD_BOT_TOKEN。
权限与邀请
在开发者门户中配置 Bot 所需权限并生成邀请链接,将 Bot 邀请到你的服务器。
相关
Slack
Slack 通道集成。
配置
- 创建 Slack 应用:https://api.slack.com/apps
- 获取 Bot Token
- 配置 OpenClaw:
{
"channels": {
"slack": {
"enabled": true,
"token": "xoxb-your-bot-token",
"signingSecret": "your-signing-secret"
}
}添加通道
openclaw channels add --channel slack --token xoxb-xxx权限
需要的 OAuth 权限:
chat:writechannels:historychannels:readim:historyim:readim:write
事件订阅
配置事件订阅 URL:
https://your-gateway/slack/events订阅事件:
message.channelsmessage.im
使用
安装应用到工作区后,可以:
- 在频道中 @ 机器人
- 直接私信机器人
iMessage
OpenClaw 在 macOS 上通过 imsg CLI 集成 iMessage。内容基于 官方 iMessage。
限制
- 仅支持 macOS
- 需在「信息」中登录 Apple ID
- 依赖系统对 imsg 的支持
配置
若需限制可联系的群组,可在 ~/.openclaw/openclaw.json 的 channels.imessage.groups 中配置;包含 "*" 表示允许所有群组。
平台总览
OpenClaw 支持多种平台。
桌面
| 平台 | 支持 | 说明 |
|---|---|---|
| macOS | ✅ | 原生支持,伴侣应用 |
| Linux | ✅ | 完整支持 |
| Windows | ⚠️ | 通过 WSL2 |
移动
| 平台 | 支持 | 说明 |
|---|---|---|
| iOS | ✅ | 节点应用 |
| Android | ✅ | 节点应用 |
云/VPS
| 平台 | 文档 |
|---|---|
| Fly.io | 容器部署 |
| Hetzner | VPS 部署 |
| GCP | Google Cloud |
快速开始
macOS
curl -fsSL https://openclaw.bot/install.sh | bashLinux
curl -fsSL https://openclaw.bot/install.sh | bashWindows (WSL2)
## 安装 WSL2
wsl --install
## 在 WSL 中
curl -fsSL https://openclaw.bot/install.sh | bash