介绍如何在 Linux 系统下部署开源本地 AI 助手 OpenClaw,并配置飞书机器人实现交互。内容涵盖环境准备(Node.js、Git)、依赖安装、服务启动、Web UI 访问以及飞书开放平台应用创建与回调配置。通过 OAuth 绑定通义千问模型,完成权限设置后即可在飞书端使用 AI 助手进行对话及执行系统命令等操作。
云间漫步34 浏览
OpenClaw 本地 AI 助手部署与飞书对接指南
OpenClaw 是一款开源的本地 AI 助手,本篇安装教程将手把手教你在 Linux 系统下部署最新版 OpenClaw,并完成飞书机器人对接。OpenClaw 支持在你自己的服务器上运行,通过飞书、WhatsApp、Telegram 等聊天工具交互。与云端 SaaS 服务不同,OpenClaw 让你完全掌控数据隐私,可以执行系统命令、浏览网页、管理文件,甚至编写代码——是你的专属开源 AI 助手。
注意:本教程在 Linux 系统下进行
OpenClaw 是什么?
OpenClaw(原名 Clawdbot,后更名为 Moltbot,现正式命名为 OpenClaw)是一个运行在你本地环境的高权限 AI 智能体。它的核心特性包括:
┌ OpenClaw onboarding
│ ◇ Security ──────────────────────────────────────────────────────────────────────────────╮
│ │
│ Security warning — please read.
│ │
│ OpenClaw is a hobby project and still in beta. Expect sharp edges.
│ This bot can read files and run actions if tools are enabled.
│ A bad prompt can trick it into doing unsafe things.
│ │
│ If you're not comfortable with basic security and access control, don't run OpenClaw.
│ Ask someone experienced to help before enabling tools or exposing it to the internet.
│ │
│ Recommended baseline:
│ - Pairing/allowlists + mention gating.
│ - Sandbox + least-privilege tools.
│ - Keep secrets out of the agent's reachable filesystem.
│ - Use the strongest available model for any bot with tools or untrusted inboxes.
│ │
│ Run regularly:
│ openclaw security audit --deep
│ openclaw security audit --fix
│ │
│ Must read: https://docs.openclaw.ai/gateway/security
│ │
├─────────────────────────────────────────────────────────────────────────────────────────╯
│ ◆ I understand this is powerful and inherently risky. Continue?
│ ● Yes / ○ No
└
第一个选项就是询问你是否知道风险的,需要选择 yes, 然后回车。
第二步选择 QuickStart:
◆ Onboarding mode
│ ● QuickStart (Configure details later via openclaw configure.)
│ ○ Manual
└
第三步选择模型服务商,这里选择 Qwen,免费额度充足,适合入门快速使用:
◆ Model/auth provider
│ ○ OpenAI
│ ○ Anthropic
│ ○ MiniMax
│ ○ Moonshot AI (Kimi K2.5)
│ ○ Google
│ ○ xAI (Grok)
│ ○ OpenRouter
│ ● Qwen (OAuth)
│ ○ Z.AI (GLM 4.7)
│ ○ Qianfan
│ ○ Copilot
│ ○ Vercel AI Gateway
│ ○ OpenCode Zen
│ ○ Xiaomi
│ ○ Synthetic
│ ○ Venice AI
│ ○ Cloudflare AI Gateway
│ ○ Skip for now
└
选择千问模型后,选择 Qwen OAuth 之后 会提供一个链接,复制并在浏览器中打开:
Qwen auth method
│ ● QwenOAuth
│ ○ Back
└
Starting Qwen OAuth…
◇ Qwen OAuth ─────────────────────────────────────────────────────────────────────────╮
│ │
│ Open https://chat.qwen.ai/authorize?user_code=-AYWBJHL&client=qwen-code to approve
│ access.
│ If prompted, enter the code -AYWBJHL.
│ │
├──────────────────────────────────────────────────────────────────────────────────────╯
◓ Waiting for Qwen OAuth approval…...
Skillsstatus────────────╮│││Eligible:6│Missing requirements:43│Blocked by allowlist:0││├────────────────────────────╯│◆Configureskillsnow?(recommended)│○Yes/●No└
然后等待安装完成,最后会出现以下选项,这里选择 TUI:
◆ How do you want to hatch your bot?
│ ● Hatch in TUI(recommended)
│ ○ Open the Web UI
│ ○ Do this later
└
如果看到 TUI 聊天界面,说明安装成功,可以尝试输入 Hello 进行测试。
然后直接使用 ctrl+c 先关闭,后面我们再来设置。
查看 OpenClaw 服务状态
可以使用下面的命令来查看:
openclaw status
会看到如下图的结果就说明服务启动了:
🦞 OpenClaw2026.2.6-3 (85ed6c7) — I read logs so you can keep pretending you don't have to.
│◇│◇OpenClaw status Overview┌─────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐│Item│Value│├─────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤│Dashboard│ http://127.0.0.1:18789/ ││OS│ linux 6.8.0-71-generic (x64) · node22.22.0││Tailscale│ off ││Channel│ stable (default) ││Update│ pnpm · npm latest 2026.2.6-3││Gateway│ local · ws://127.0.0.1:18789 (local loopback) · reachable 42ms · auth token · VM-16-7-ubuntu (10.0.16.7) app unknown linux 6.8.0-71-generic ││Gateway service │ systemd installed · enabled · running (pid 327748, state active) ││Node service │ systemd not installed ││Agents│1 · 1 bootstrapping · sessions 1 · default main active 1m ago ││Memory│ enabled (plugin memory-core) · unavailable ││Probes│ skipped (use --deep) ││Events│ none ││Heartbeat│ 30m (main) ││Sessions│1 active · default coder-model (128k ctx) · ~/.openclaw/agents/main/sessions/sessions.json │└─────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
openclaw dashboard
🦞 OpenClaw 2026.2.6-3 (85ed6c7) — Works on Android. Crazy concept, we know.
Dashboard URL: http://127.0.0.1:18789/#token=e8e5cd1573123ae9b11111111111111e2b94b8b7b4ccd
Copy to clipboard unavailable. No GUI detected. Open from your computer: ssh -N -L 18789:127.0.0.1:18789 ubuntu@222222
Then open: http://localhost:18789/
http://localhost:18789/#token=e8e5cd1573123ae9b11111111111111e2b94b8b7b4ccd
Docs: https://docs.openclaw.ai/gateway/remote
https://docs.openclaw.ai/web/control-ui
复制对应的 Dashboard URL 到浏览器打开,即可正常查看聊天记录。
至此 OpenClaw 开源 AI 助手已安装完成,可以正常访问了。接下来在聊天框首次输入 Hello,OpenClaw 会询问你它应该叫什么、应该叫你什么。你需要给这个 AI 助手设置一个名字,以及它对你的称呼。可以在聊天框这么输入:
Select a channel
│ Feishu/Lark (飞书)
│ ◇ Feishu credentials ──────────────────────────────────────────────────────────────╮
│ │
│ 1) Go to Feishu Open Platform (open.feishu.cn)
│ 2) Create a self-built app
│ 3) Get App ID and App Secret from Credentials page
│ 4) Enable required permissions: im:message, im:chat, contact:user.base:readonly
│ 5) Publish the app oradd it to a test group
│ Tip: you can also set FEISHU_APP_ID / FEISHU_APP_SECRET env vars.
│ Docs: feishu
│ │
├───────────────────────────────────────────────────────────────────────────────────╯
│ ◆ Enter Feishu App ID
│ _ # 输入 App ID
└