OpenClaw 安装与入门指南
写给电脑小白 · 手把手 · 有图有真相
适用 Windows 10/11 · macOS 12+ | 2026 年 5 月更新
1. OpenClaw 是什么(30 秒搞懂)
OpenClaw(社区昵称「龙虾」)是一个在你电脑上运行的 AI 助手。跟网页版 AI 的区别是:
| 网页版 AI | OpenClaw | |
|---|---|---|
| 能聊天 | ✅ | ✅ |
| 能操作你的电脑 | ❌ | ✅ |
| 能读/写文件 | ❌ | ✅ |
| 数据存在哪里 | 云端 | 你的电脑 |
| 费用 | 月费 | 软件免费,API 按量付费 |
💡 一句话理解
网页 AI 只能「说」;OpenClaw 可以「做」。你告诉它「帮我把桌面上的 PDF 翻译成中文并生成摘要」,它真的会去读文件、调 AI、写出结果。
2. 安装前的准备
🪟 Windows 用户
•操作系统 Windows 10 或 11(Win7 不行)
•至少 4GB 内存(8GB 更流畅)
•有管理员权限(能装软件)
•网络畅通(能访问 GitHub)
•暂时关闭杀毒软件(360、火绒、腾讯管家、Windows Defender 实时保护)
⚠️ 关杀软很重要
安装过程中杀毒软件可能拦截或误删文件。装完再打开。OpenClaw 是 GitHub 4 万星的开源项目,不是病毒。
🍎 Mac 用户
•操作系统 macOS 12(Monterey)或更新
•至少 4GB 内存
•知道「终端」在哪(找不到?按 Cmd+空格,输入「终端」回车)
3. 正式安装
🪟 Windows 系统
第 1 步:打开 PowerShell(管理员)
右键点击「开始菜单」→ 选择「终端(管理员)」或「Windows PowerShell(管理员)」。弹出权限确认点「是」。
第 2 步:设置脚本执行权限
复制下面这行命令,在 PowerShell 窗口右键粘贴,回车:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
如果问你是否确认,输入 `Y` 回车。
第 3 步:运行一键安装
iwr -useb https://openclaw.ai/install.ps1 | iex
⏳ 耐心等待 5-10 分钟
脚本自动检测系统 → 安装 Node.js → 下载 OpenClaw → 配置环境。大量文字滚动是正常的,别关窗。
>
🇨🇳 网络慢?换国内镜像:`iwr -useb https://open-claw.org.cn/install-cn.ps1 | iex`
第 4 步:运行初始化向导
openclaw onboard --install-daemon
🍎 Mac 系统
第 1 步:打开终端
按 ⌘ + 空格,输入「终端」,回车。
第 2 步:运行一键安装
curl -fsSL https://openclaw.ai/install.sh | bash
提示输密码时正常输入(屏幕不显示字符),输完回车。
🇨🇳 国内网络慢?换镜像:`curl -fsSL https://open-claw.org.cn/install-cn.sh | bash`
第 3 步:初始化
openclaw onboard --install-daemon
4. 第一次启动:初始化向导怎么答
① Gateway 端口 → 直接回车,用默认 18789
② 模型提供商 → 用键盘 ↑↓ 箭头键 选择:
| 提供商 | 特点 | |
|---|---|---|
| 🥇 | DeepSeek | 国产模型,性价比极高,注册简单 |
| 🥈 | Kimi(月之暗面) | 长文本能力强,注册送额度 |
| 🥉 | 阿里云百炼 | 首月 7.9 元,模型种类多 |
③ API Key → 去你选的平台注册/登录,创建 API Key,粘贴回来。
④ 守护进程 → 选是,开机自动后台运行。
5. 配置 AI 模型(四选一)
⭐ 方案 A:DeepSeek(首选推荐)
1. 打开 [platform.deepseek.com](https://platform.deepseek.com) 注册(手机号即可)
2. 进入「API Keys」→「创建 API Key」,复制 Key
3. 终端配置:
openclaw config set model.provider deepseek
openclaw config set model.apiKey 你的Key
openclaw config set model.baseUrl https://api.deepseek.com/v1
openclaw config set model.default deepseek-chat
DeepSeek 价格极低(每百万 token 仅 1 元起),效果对标 GPT-4,目前国内性价比最优。
方案 B:Kimi(月之暗面)
1. 打开 [platform.moonshot.cn](https://platform.moonshot.cn) 注册
2. 控制台 →「API Key 管理」→「新建」,复制 Key
3. 终端配置:
openclaw config set model.provider moonshot
openclaw config set model.apiKey 你的Key
长文本处理突出,128K 上下文,适合处理长文档和复杂阅读任务。
方案 C:阿里云百炼(模型最全)
1. 打开 [bailian.console.aliyun.com](https://bailian.console.aliyun.com) 登录
2. 开通百炼 → 订阅 Coding Plan(首月 7.9 元)
3. 模型广场选模型(推荐 qwen-plus),右上角创建 API Key
4. 终端配置:
openclaw config set model.provider alibaba-cloud
openclaw config set model.apiKey 你的Key
openclaw config set model.baseUrl https://dashscope.aliyuncs.com/compatible-mode/v1
openclaw config set model.default bailian/qwen-plus
方案 D:Ollama 本地模型(完全免费)
不花一分钱,用自己的电脑跑 AI。需 16GB+ 内存。
ollama pull qwen2.5:7b
openclaw config set model.provider ollama
openclaw config set model.default qwen2.5:7b
6. 完成第一个任务
第 1 步:启动 OpenClaw
openclaw gateway --port 18789
看到「Gateway online at http://127.0.0.1:18789」说明启动成功。
第 2 步:打开浏览器
浏览器地址栏输入:http://127.0.0.1:18789
第 3 步:试试这些命令
| 你对 AI 说 | 它应该做什么 |
|---|---|
| `你好,介绍一下你自己` | 回复它是 OpenClaw,列出能力 |
| `现在几点了` | 执行系统命令获取时间 |
| `在桌面创建 hello.txt 文件,内容是”你好世界”` | 在桌面创建文件 |
✅ 搞定了!
如果 AI 成功在桌面创建了文件,你的 OpenClaw 就已经能「动手」了,不只是聊天。
7. 日常命令速查
| 命令 | 作用 |
|---|---|
| `openclaw gateway –port 18789` | 启动 OpenClaw |
| `openclaw status` | 查看运行状态 |
| `openclaw dashboard` | 打开浏览器控制台 |
| `openclaw doctor` | 系统诊断(出问题时先跑这个) |
| `openclaw update –channel stable` | 更新到最新版 |
8. 常见问题(避坑)
❌ 运行安装命令后一片红字或「无法识别」
① 彻底关闭杀毒软件和 Windows Defender 实时保护;② 换成国内镜像地址重试。
❌ 装完后输入 openclaw 提示「不是内部或外部命令」
关掉 PowerShell,重新打开一个新的(管理员),再试。不行就重启电脑。
❌ 浏览器打开 127.0.0.1:18789 显示「无法访问」
OpenClaw 没在跑。终端里执行 `openclaw gateway –port 18789`,看到「Gateway online」后再刷新。
❌ AI 发任务后一直转圈没反应
API Key 没配或配错了。执行 `openclaw config list` 检查配置;确认 Key 复制完整;确认平台账户有余额。
❌ 安装到一半卡住了
网络慢,在下载大文件。等 5-10 分钟。超过 15 分钟就关掉,用国内镜像重装。
9. 国内 AI 模型 API 平台汇总
以下平台均支持国内手机号注册、人民币支付,无需特殊网络环境:
| 平台 | API 申请地址 | 特点 |
|---|---|---|
| DeepSeek | [platform.deepseek.com](https://platform.deepseek.com) | 性价比最高,每百万 token 仅 1 元起 |
| Kimi | [platform.moonshot.cn](https://platform.moonshot.cn) | 128K 长上下文,新用户赠免费额度 |
| 阿里云百炼 | [bailian.console.aliyun.com](https://bailian.console.aliyun.com) | 通义千问全系列,首月 7.9 元 |
| 豆包(字节) | [console.volcengine.com/ark](https://console.volcengine.com/ark) | 火山引擎方舟平台,有免费额度 |
| 智谱 GLM | [open.bigmodel.cn](https://open.bigmodel.cn) | GLM 系列,国内最早的大模型 API 之一 |
| 百度千帆 | [console.bce.baidu.com/qianfan](https://console.bce.baidu.com/qianfan) | 文心一言系列,有免费额度 |
| 讯飞星火 | [xinghuo.xfyun.cn/sparkapi](https://xinghuo.xfyun.cn/sparkapi) | 语音能力突出,有免费额度 |
| 腾讯混元 | [console.cloud.tencent.com/hunyuan](https://console.cloud.tencent.com/hunyuan) | 与微信 / 企微生态整合好 |
| 硅基流动 | [siliconflow.cn](https://siliconflow.cn) | 聚合平台,一个 Key 访问多个模型 |
💡 省钱建议
新手推荐 DeepSeek 或 硅基流动——价格低、注册简单、效果够用。
📚 GitHub:[github.com/openclaw/openclaw](https://github.com/openclaw/openclaw)
🌐 官网:[openclaw.ai](https://openclaw.ai)
✌️ 祝你养虾愉快 🦞
夜雨聆风