综述由AI生成OpenClaw 是一款开源本地 AI 智能体,支持在 Linux 环境下部署并对接飞书等聊天工具。档详细记录了从环境准备、依赖安装、服务启动到飞书应用配置的全过程。重点解决了内存不足导致的 OOM 问题,提供了通义千问模型接入方案及 Web UI 访问方法。通过 SSH 隧道管理后台,可实现文件操作、网页浏览及系统命令执行,确保数据隐私可控。
芝士奶盖12 浏览
OpenClaw 本地 AI 助手部署与飞书对接指南
OpenClaw 是一款开源的本地 AI 智能体,支持在 Linux、macOS 或 Windows (WSL2) 环境下部署。它允许你在自己的服务器上运行,通过飞书、WhatsApp、Telegram 等聊天工具交互。与云端 SaaS 服务不同,OpenClaw 让你完全掌控数据隐私,可以执行系统命令、浏览网页、管理文件,甚至编写代码——是你的专属开源 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 把硬盘空间当作虚拟内存使用。
成功之后会看到 TUI 界面提示,如果是首次安装,会询问你是否了解风险:
┌ OpenClaw onboarding
│ ◇ Security ──────────────────────────────────────────────────────────────────────────────╮
│ │ Security warning — please read. │
│ │ 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 之后会提供一个链接,复制并在浏览器中打开授权:
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…...
登录完成后,会出现以下选项,提示选择对应的千问模型,选择默认模型 Keep current (qwen-portal/coder-model) 即可。
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
└