OpenClaw 是一款开源 AI 助手平台,支持 WhatsApp、Telegram、飞书、微信等多平台接入,并可调用代码执行、联网搜索、浏览器自动化等 Skills。本页把 OpenClaw 是什么、怎么安装、怎么部署、怎么配置、怎么开始使用整合到一个页面里,适合第一次接触 OpenClaw 的个人用户、开发者和团队管理员快速上手。
先理解它的定位、核心概念和适合场景,再决定怎么安装和部署
按这个顺序做,通常 10 到 20 分钟可以完成第一次可用配置
openclaw --version,确认命令可用。首次上手建议先选择最省事的安装方式,再回头优化部署方式。openclaw init 或 openclaw config,先填入大模型 API Key,再决定连接哪些消息平台。transports 部分填写 Telegram Bot Token、飞书 App ID / Secret、企业微信参数或 WhatsApp 连接方式。web-search、code-runner、browser-auto 这类最常用技能,让 OpenClaw 能查信息、执行代码和操作网页。openclaw start
openclaw stop
openclaw status
openclaw config
openclaw skills install web-search
openclaw logs -f
按平台选择安装方式。对大多数用户来说,先装起来并跑通第一条消息比纠结最佳部署方式更重要。
curl -fsSL https://get.openclaw.ai | bash
brew install openclaw
npm install -g openclaw
先从 Node.js 官网安装 LTS 版本,再在 PowerShell 中运行:
npm install -g openclaw
如果已配置 WSL2,可在 Linux 子系统里直接使用一键安装脚本:
curl -fsSL https://get.openclaw.ai | bash
Set-ExecutionPolicy RemoteSigned 后重试。curl -fsSL https://get.openclaw.ai | bash
npm install -g openclaw
docker pull openclaw/openclaw
openclaw --version 确认安装成功。openclaw init 进入初始化向导,先配置模型提供商和 API Key。openclaw config 补充消息平台凭据,完成后再启动服务。部署重点不是“装上去”,而是让服务稳定、可恢复、可维护,并且不把敏感配置暴露出去。
| 对比项 | 本地部署 | 云服务器 | Docker |
|---|---|---|---|
| 成本 | 最低 | 有服务器成本 | 依赖宿主机环境 |
| 在线时长 | 设备开机时可用 | 适合 7x24 小时 | 适合长期运行 |
| 技术门槛 | 最低 | 中等 | 中等 |
| 适用场景 | 个人体验 | 稳定个人使用 / 团队 | 环境隔离 / 运维统一 |
优先把 API Key 和消息平台凭据填好,避免部署完仍无法连通。
openclaw start --daemon
openclaw logs -f
curl -fsSL https://get.openclaw.ai | bash
openclaw init
sudo openclaw service install
sudo systemctl enable --now openclaw
docker pull openclaw/openclaw
mkdir -p ./openclaw-config
docker run -d --name openclaw --restart=unless-stopped -v $(pwd)/openclaw-config:/app/config openclaw/openclaw
allowed_users 或对应白名单,只允许指定账号、手机号或用户 ID 与 OpenClaw 交互。openclaw logs,比盲目改配置更有效。配置分三层:模型、消息平台、Skills。先让模型可用,再决定消息入口,最后补能力扩展。
运行 openclaw config 打开配置文件,在 llm 部分填入提供商、模型和 API Key。
llm:
provider: anthropic
model: claude-sonnet-4-6
api_key: sk-ant-xxxxxxxxxxxxx
llm:
provider: openai
model: gpt-4o
api_key: sk-xxxxxxxxxxxxx
llm:
provider: ollama
model: llama3:8b
base_url: http://localhost:11434
export OPENCLAW_LLM_API_KEY=你的Key,避免把密钥明文写进配置文件。在 transports 部分填入平台凭据。先接入一个你最常用的平台,跑通后再扩展到其他入口。
transports:
feishu:
enabled: true
app_id: cli_xxxxxxxxxxxxx
app_secret: xxxxxxxxxxxxx
verification_token: xxxxxxxxxxxxx
transports:
wecom:
enabled: true
corp_id: xxxxxxxxxxxxx
agent_id: 1000002
secret: xxxxxxxxxxxxx
transports:
telegram:
enabled: true
bot_token: xxxxxxxxxxxxx
Skills 决定 OpenClaw 能不能联网、能不能执行代码、能不能操作浏览器。先装最常用的,再按场景逐步扩展。
openclaw skills install web-search
openclaw skills install code-runner
openclaw skills install browser-auto
这些问题基本覆盖了 OpenClaw 教程、安装、部署、配置这几类搜索意图