OpenClaw 是一款开源的本地 AI 智能体,支持在 Linux 环境下部署并通过飞书等工具交互。详细讲解了从环境准备、依赖安装、服务启动到飞书机器人配置的全流程。重点涵盖 Node.js 环境搭建、模型选择(推荐通义千问)、飞书应用创建及权限设置,并提供常用命令速查与常见问题解答,帮助用户快速搭建专属 AI 助手并实现安全可控的数据管理。
CloudNative1 浏览
OpenClaw 本地 AI 助手部署与飞书对接指南
OpenClaw 是一款开源的本地 AI 智能体,支持在 Linux 系统下部署最新版,并完成飞书机器人对接。它运行在你自己的服务器上,通过飞书、WhatsApp、Telegram 等聊天工具交互。与云端 SaaS 服务不同,OpenClaw 让你完全掌控数据隐私,可以执行系统命令、浏览网页、管理文件,甚至编写代码——是你的专属开源 AI 助手。
注意:本教程基于 Linux 系统环境。
OpenClaw 是什么?
OpenClaw(原名 Clawdbot,后更名为 Moltbot)是一个运行在你本地环境的高权限 AI 智能体。它的核心特性包括:
🦞 OpenClaw Installer Siri's competent cousin.
✓ Detected: linux
✓ Node.js v22.22.0 found
✓ Git already installed
→ Installing OpenClaw 2026.2.6-3...
✓ OpenClaw installed
🦞 OpenClaw installed successfully (2026.2.6-3)!
Home sweet home. Don't worry, I won't rearrange the furniture.
Starting setup...
如果首次安装,时间会很长,需要耐心等待。如果最后输出 npm install failed; cleaning up and retrying...,说明新的脚本服务器内存要求变高了。据经验,2G 内存肯定会 OOM,如果出错的话,建议使用 swap 把硬盘空间当作虚拟内存使用。
成功之后会看到下面的安全警告界面:
┌ 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 └
◇ 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. │
└ ◆ Enter Feishu App ID │ _ # 输入 App ID └