OpenClaw安装及接入飞书方法

OpenClaw安装及接入飞书方法

1.安装 window powershell 以管理员身份登录

安装前可以清理缓存
npm cache clean --force
安装前设置镜像路径
npm config set registry https://registry.npmmirror.com
可视化安装命令,带日志输出
npm install -g openclaw --verbose

网关安装命令
openclaw gateway install
网关停止命令
openclaw gateway stop
网关运行命令
openclaw gateway run

与飞书配对命令:
openclaw pairing approve feishu QGPXVQK8

观察控制台输出,按 Ctrl+C 可以停止此进程。

客户端访问
http://127.0.0.1:18789/chat?session=main

2.配置模型的api key 及 url

# 启动初始化向导(推荐使用守护进程模式)
openclaw onboard --install-daemon
配置步骤:
Model/auth provider:选择 Custom Provider。
这里我们选择Custom Provider自定义提供商


免费提供商及 API Key 获取
2.1. 官方免费通道(首选,无需 Key) 待验证,后面选择的是阿里云百炼
OpenClaw 官方为 Kimi (Moonshot AI)​ 提供了补贴通道。在安装配置时,选择模型为 Moonshot AI,验证方式选 Kimi Code API Key,API Key 留空或输入任意字符即可直接免费使用 Kimi K2.5 模型 。

2.2. NVIDIA Build(完全免费,需注册) 测试了不能用。获取不了
这是目前最稳定的免费大模型 API 来源,支持 Kimi、智谱、千问等主流模型。
注册地址:https://build.nvidia.com
获取 Key:注册登录后,点击右上角头像 -> API Keys -> Generate API Key。
使用:在 OpenClaw 配置中,Provider 选 NVIDIA,填入生成的 Key,模型选 moonshot-ai/kimi-k2.5或 z-ai/glm5等

2.3. 阿里云百炼 获取key,免费注册获取
https://bailian.console.aliyun.com/cn-beijing/?tab=model#/api-key

设置正确的 baseUrl:
阿里云百炼(通义千问)兼容 OpenAI API 的端点地址应该是 https://dashscope.aliyuncs.com/compatible-mode/v1。请在 PowerShell 中执行以下命令:
openclaw config set models.providers.bailian.baseUrl "https://dashscope.aliyuncs.com/compatible-mode/v1"

设置 API Key 和模型:
确保你已经正确设置了 API Key 和希望使用的主模型。请依次执行以下命令,将 你的API_Key替换为你从阿里云控制台获取的密钥(以 sk-开头):
# 设置 API Key
openclaw config set models.providers.bailian.apiKey "你的API_Key"
# 设置要使用的具体模型
openclaw config set agents.defaults.model.primary "bailian/qwen3-max-2026-01-23"

重启服务:
完成配置后,重启 OpenClaw 网关服务以使配置生效:
openclaw gateway restart

验证配置:
你可以通过以下命令来查看当前完整的模型提供商配置,以确保所有值都已正确设置:
openclaw config get models.providers.bailian

3.配置飞书的api key 参数

飞书开放平台
https://open.feishu.cn/app/cli_a92d42ca3cb85bd6/version/7613335177012988865

# 启动初始化向导(推荐使用守护进程模式)
openclaw onboard --install-daemon

接入飞书机器人
Select channel (QuickStart)
| > Telegram (Bot API) (recommended · newcomer-friendly)
| WhatsApp (QR link)
| Discord (Bot API)
| IRC (Server + Nick)
| Google Chat (Chat API)
| Slack (Socket Mode)
| Signal (signal-cli)
| iMessage (imsg)
| Feishu/Lark (飞书)
| Nostr (NIP-04 DMs)
| Microsoft Teams (Bot Framework)
| Mattermost (plugin)
| Nextcloud Talk (self-hosted)
| Matrix (plugin)
| BlueBubbles (macOS app)
| LINE (Messaging API)
| Zalo (Bot API)
| Zalo (Personal Account)
| Synology Chat (Webhook)
| Tlon (Urbit)
| Skip for now

根据你的需求(接入飞书),请选择 Feishu/Lark (飞书)​ 这个选项。
选择后的操作流程:
按方向键 ↓ 或 ↑ 将高亮光标移动到 Feishu/Lark (飞书)这一行。
按回车确认选择。
之后向导会引导你输入飞书应用的 App ID 和 App Secret。如果你还没有,需要先去飞书开放平台
创建应用并获取这两个凭证。

后续步骤预览:
输入你的 App ID​ 和 App Secret。
选择域名:通常选择默认的 feishu.cn(国内版)。
按回车完成配置。

配置完成后,记得回到飞书开放平台,在应用中开启“机器人”能力,并配置相应的权限和事件,你的 OpenClaw 就可以在飞书中接收消息了。

4.飞书中配置 机器人

OpenClaw 接入飞书(保姆级教程)
https://mp.weixin.qq.com/s/aqffHsd4VOodM5Cjv6ne2A?scene=1&click_id=1

5.查询常用命令

命令 说明
openclaw onboard 运行引导向导
openclaw gateway 启动网关
openclaw gateway status 查看网关状态
openclaw dashboard 打开 Web 控制台
openclaw doctor 诊断检查
openclaw status 查看整体状态
openclaw logs --follow 实时查看日志
openclaw channels login 登录聊天渠道
openclaw configure 修改配置
openclaw config get 查看当前配置
openclaw agents add 添加额外代理实例

6.常见问题及排查分析

6.1.飞书插件重复冲突
# 查看已安装的飞书插件
查询插件列表
openclaw plugins list
删除多余的插件,保留安装自带的@openclaw/feishu
openclaw plugins uninstall Feishu


6.2.查看日志
openclaw logs

6.3.查看网关状态
openclaw gateway status
openclaw status


PS C:\WINDOWS\system32> openclaw status

🦞 OpenClaw 2026.3.2 (85377a2) — I don't sleep, I just enter low-power mode and dream of clean diffs.

02:24:58 [plugins] feishu_doc: Registered feishu_doc, feishu_app_scopes
02:24:58 [plugins] feishu_chat: Registered feishu_chat tool
02:24:58 [plugins] feishu_wiki: Registered feishu_wiki tool
02:24:58 [plugins] feishu_drive: Registered feishu_drive tool
02:24:58 [plugins] feishu_bitable: Registered bitable tools
|
o
|
o
OpenClaw status

Overview
┌─────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Item │ Value │
├─────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Dashboard │ http://127.0.0.1:18789/ │
│ OS │ windows 10.0.26200 (x64) · node 24.14.0 │
│ Tailscale │ off │
│ Channel │ stable (default) │
│ Update │ pnpm · npm latest 2026.3.2 │
│ Gateway │ local · ws://127.0.0.1:18789 (local loopback) · unreachable (timeout) │
│ Gateway service │ Scheduled Task installed · registered · unknown │
│ Node service │ Scheduled Task not installed │
│ Agents │ 1 · 1 bootstrap file present · sessions 1 · default main active 13m ago │
│ Memory │ 0 files · 0 chunks · dirty · sources memory · plugin memory-core · vector unknown · fts ready · │
│ │ cache on (0) │
│ Probes │ skipped (use --deep) │
│ Events │ none │
│ Heartbeat │ 30m (main) │
│ Sessions │ 1 active · default qwen3-max-2026-01-23 (16k ctx) · ~\.openclaw\agents\main\sessions\sessions. │
│ │ json │
└─────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────┘

Security audit
Summary: 0 critical · 3 warn · 1 info
WARN Reverse proxy headers are not trusted
gateway.bind is loopback and gateway.trustedProxies is empty. If you expose the Control UI through a reverse proxy, configure trusted proxies so local-client c…
Fix: Set gateway.trustedProxies to your proxy IPs or keep the Control UI local-only.
WARN Feishu doc create can grant requester permissions
channels.feishu tools include "doc"; feishu_doc action "create" can grant document access to the trusted requesting Feishu user.
Fix: Disable channels.feishu.tools.doc when not needed, and restrict tool access for untrusted prompts.
WARN Some gateway.nodes.denyCommands entries are ineffective
gateway.nodes.denyCommands uses exact node command-name matching only (for example `system.run`), not shell-text filtering inside a command payload. - Unknown …
Fix: Use exact command names (for example: canvas.present, canvas.hide, canvas.navigate, canvas.eval, canvas.snapshot, canvas.a2ui.push, canvas.a2ui.pushJSONL, canvas.a2ui.reset). If you need broader restrictions, remove risky command IDs from allowCommands/default workflows and tighten tools.exec policy.
Full report: openclaw security audit
Deep probe: openclaw security audit --deep

Channels
┌──────────┬─────────┬────────┬───────────────────────────────────────────────────────────────────────────────────────┐
│ Channel │ Enabled │ State │ Detail │
├──────────┼─────────┼────────┼───────────────────────────────────────────────────────────────────────────────────────┤
│ Feishu │ ON │ OK │ configured │
└──────────┴─────────┴────────┴───────────────────────────────────────────────────────────────────────────────────────┘

Sessions
┌────────────────────────────────────────────────────────┬────────┬─────────┬──────────────────────┬──────────────────┐
│ Key │ Kind │ Age │ Model │ Tokens │
├────────────────────────────────────────────────────────┼────────┼─────────┼──────────────────────┼──────────────────┤
│ agent:main:feishu:direct:ou_e99… │ direct │ 13m ago │ qwen3-max-2026-01-23 │ unknown/16k (?%) │
└────────────────────────────────────────────────────────┴────────┴─────────┴──────────────────────┴──────────────────┘

FAQ: https://docs.openclaw.ai/faq
Troubleshooting: https://docs.openclaw.ai/troubleshooting

Next steps:
Need to share? openclaw status --all
Need to debug live? openclaw logs --follow
Fix reachability first: openclaw gateway probe

7.参考文档

OpenClaw 接入飞书(保姆级教程)
https://mp.weixin.qq.com/s/aqffHsd4VOodM5Cjv6ne2A?scene=1&click_id=1

(可能是全网最详细的小白都能操作的)Openclaw保姆安装教程
https://mp.weixin.qq.com/s/Ikyf1qCxJd3t_eyu2XPktg

posted on 2026-03-05 11:46  oktokeep  阅读(730)  评论(1)    收藏  举报