openclaw的安装

卸载、清理之前安装的(可选)

shell 复制代码
# 1. 完全卸载
npm uninstall -g openclaw

# 2. 清理缓存
npm cache clean --force

# 3. 删除残留(可选)
rmdir /s /q D:\software\node\node-v22.22.0-win-x64\node_modules\openclaw

安装步骤

一、安装node

1、安装node

  • node环境按照官方要求 node>=22.0.0
    Node.js 安装指南
  • git安装(下一步下一步安装方式安装即可)

https://git-scm.com/install/windows

https://github.com/git-for-windows/git/releases/download/v2.55.0.windows.2/Git-2.55.0.2-64-bit.exe

2、安装pnpm(可选如果用pnpm安装)

shell 复制代码
npm install -g pnpm

3、安装WSL2(可选-如果用PowerShell)

在管理员模式下打开PowerShell,输入wsl --install命令,然后重启计算机

shel 复制代码
wsl  --install

二、下载openclaw

使用npm或者pnpm

1、方式一

shell 复制代码
# 安装最新版
npm install -g openclaw@latest
#安装指定版本
#npm install -g openclaw@2026.6.1
# 或使用 
#pnpm add -g openclaw@latest

2、方式二

shell 复制代码
# 1. 重新安装并自动安装所有依赖
npm install -g openclaw --registry=https://registry.npmmirror.com

三、正式安装openClaw

默认在C盘安装,此处设置环境变量,会安装到指定目录

1、设置安装目录参数

cmd命令

shell 复制代码
setx OPENCLAW_HOME "D:\software\openclaw" /M
setx OPENCLAW_WORKSPACE "D:\software\openclaw\workspace" /M
setx OPENCLAW_CONFIG_PATH "D:\software\openclaw\config\openclaw.json" /M
setx OPENCLAW_STATE_DIR "D:\software\openclaw\state" /M

/M"Machine" 表示系统级 永久变量;如果不要管理员权限,去掉 /M 写到用户级也行。

powershell命令

shell 复制代码
[System.Environment]::SetEnvironmentVariable("OPENCLAW_HOME","D:\software\openclaw","Machine")
[System.Environment]::SetEnvironmentVariable("OPENCLAW_WORKSPACE","D:\software\openclaw\workspace","Machine")
[System.Environment]::SetEnvironmentVariable("OPENCLAW_CONFIG_PATH","D:\software\openclaw\config\openclaw.json","Machine")
[System.Environment]::SetEnvironmentVariable("OPENCLAW_STATE_DIR","D:\software\openclaw\state","Machine")

2、执行安装命令

因为本人前面下载了openclaw@latest最新版本,当时最新的版本是2026.6.1的版本,所以你们看到的配置会有所不同,根据提示来配置即可

shell 复制代码
#完整安装向导+安装系统服务
openclaw onboard --workspace D:\software\openclaw\workspace --install-daemon
#仅运行配置向导(或使用该命令)
openclaw onboard --workspace D:\software\openclaw\workspace

运行 openclaw onboard --install-daemon 后,会进入交互式配置向导,以下是每个步骤的详细说明:

3、安装向导步骤说明

步骤 1:安全风险告知

含义 :OpenClaw 默认是个人使用工具,如果用作多人共享或多用户场景,需要额外做好权限管控和安全加固。这一步让你确认已了解相关风险后,才能继续安装。

界面提示

复制代码
I understand this is personal-by-default and shared/multi-user use requires lock-down. Continue?
|    Yes / > No

筛选项说明

选项 说明
Yes 确认已知晓安全风险,继续安装
No 终止安装

建议 :输入 Yes 或直接回车,确认继续安装。

步骤 2:选择配置模式(Setup Mode)

含义:决定以何种方式初始化 OpenClaw。不同模式的自动化程度不同,适合不同用户群体。

界面提示

复制代码
 Setup mode
|  > QuickStart (recommended) (Recommended local setup. Change details later with openclaw configure.)
|    Manual setup
|    Import from Claude

筛选项说明

模式 说明 适用人群
QuickStart(推荐) 一键生成默认配置,仅需配置核心参数(模型、渠道、搜索引擎),其余全部自动处理。后续可通过 openclaw configure 随时修改 新手、首次使用 ✅
Manual setup 全量自定义,所有配置项(端口、权限、代理规则等)需手动逐项填写 进阶用户、有定制需求
Import from Claude 一键迁移本地 Claude Desktop 的全量数据(API密钥、MCP插件、聊天记录、主题等) 已有 Claude Desktop 的用户

建议 :直接回车选择 QuickStart,90% 用户首选。

步骤 3:选择模型提供商(Model/Auth Provider)
1、大模型选择

含义 :选择你要使用哪个厂商的大模型。OpenClaw 预适配了国内外主流模型厂商,选完后输入对应的 API Key 即可绑定。

界面提示

复制代码
*  Model/auth provider
|  > OpenAI (ChatGPT/Codex sign-in or API key)
|    Anthropic
|    xAI (Grok)
|    Google
|    More...
|    Skip for now

筛选项说明

选项 说明
OpenAI GPT 全系列(GPT-4o、o1、o3-mini 等),支持 API Key 或扫码登录 ChatGPT 账号
Anthropic Claude 3/3.5/4 全系列,原生兼容 Claude MCP 插件生态
xAI (Grok) 马斯克旗下 Grok 3 大模型
Google Gemini 全系列(2.0/2.5 Pro 等)
More... 展开更多厂商:DeepSeek、通义千问、智谱清言、豆包、Kimi、Ollama 等国产模型,参数全部自动适配
Skip for now 暂时跳过,后续在 WebUI 中再配置,不会阻塞安装流程

建议

  • 已有 API Key:直接选择对应厂商并填入密钥
  • 国内用户首推 More... → DeepSeek(性价比高、国内直连)
  • 也可以先 Skip for now,安装完再补配
2、大模型配置以及默认的模型选择

含义 :选定模型提供商后,需要进一步指定使用该厂商的哪个具体模型作为默认对话模型。

界面提示

复制代码
*  Default model
|  > Keep current (deepseek/deepseek-v4-flash)
|    Enter model manually
|    Browse all models

筛选项说明

选项 说明
Keep current 保持当前默认模型不变
Enter model manually 手动输入模型名称(需知道精确名称)
Browse all models 浏览该厂商所有可用模型,上下键选择(推荐)

选择 Browse all models 后会列出该厂商下所有模型,例如 DeepSeek:

复制代码
*  Default model
|  Search:
|  > deepseek/deepseek-v4-pro (DeepSeek V4 Pro · ctx 977k · reasoning)
|    deepseek/deepseek-v4-flash
|    deepseek/deepseek-chat
|    deepseek/deepseek-reasoner

建议 :选择 Browse all models,浏览后按需选择:

  • deepseek/deepseek-v4-pro:推理能力更强(推荐)
  • deepseek/deepseek-v4-flash:速度更快,适合日常对话
3、整个模型选择配置过程记录
shell 复制代码
o  Model/auth provider
|  More...

o  Model/auth provider
|  DeepSeek

o  Enter DeepSeek API key
|  •••••••••••••••••••••••••••••••••••

o  Model configured --------------------------------+
|                                                   |
|  Default model set to deepseek/deepseek-v4-flash  |
|                                                   |
+---------------------------------------------------+
|
o  Default model
|  Browse all models


o  Default model
|  deepseek/deepseek-v4-pro
步骤 4:选择通信渠道(Channel)

含义 :决定通过哪个平台和 AI 对话。OpenClaw 支持微信、飞书、QQ、Telegram、Discord 等 20+ 种渠道,选一个你常用的平台即可。

界面提示

复制代码
*  Select channel (QuickStart)
|  Search: _
|  > ClickClack
|    Discord (Bot API)
|    Feishu/Lark (飞书)
|    QQ Bot (Official API)
|    Telegram (Bot API)
|    WeCom(企业微信)
|    Weixin(微信)
|    WhatsApp (QR link)
|    Yuanbao(元宝)
|    ...(共20+个渠道)
|    Skip for now

筛选项说明

类别 代表渠道 说明
🇨🇳 国内常用 Weixin(微信)、WeCom(企业微信)、Feishu(飞书)、QQ Bot、Yuanbao(元宝) 国内直连,扫码或简单配置即可
🌍 国际常用 Telegram、Discord、WhatsApp、Slack、LINE 需海外网络或对应平台账号
💻 自部署 Matrix、Mattermost、Nextcloud Talk、IRC 需自行搭建服务端
⏭️ 跳过 Skip for now 安装完成后可随时补配

建议 :国内用户推荐选 Weixin(微信),扫码登录即可,最省事。

步骤 5:选择搜索引擎(Search Provider)

含义 :给 AI 配一个联网搜索能力。当你问"今天天气"、"最新新闻"等实时信息时,AI 会自动上网搜索后再回复,而不是仅靠训练数据回答。

界面提示

复制代码
*  Search provider
|  Search: _
|    Brave Search
|    DuckDuckGo Search (experimental)
|    Kimi (Moonshot)
|    MiniMax Search
|    Parallel Search
|  > Parallel Search (Free) (Free web search via Parallel's hosted Search MCP --- no API key required · key-free)
|    Tavily Search
|    ...(共15+个选项)
|    Skip for now

筛选项说明

分类 选项 说明 前提
✅ 免密钥免费 Parallel Search (Free) 无需注册、无需 API Key,零门槛开箱即用
DuckDuckGo Search 无广告隐私搜索引擎,免密钥 需海外网络
Brave Search 隐私搜索引擎,有免费额度 需海外网络
🇨🇳 国内友好 Kimi (Moonshot) 复用 Kimi 密钥,中文搜索优化,国内直连 已配 Kimi API Key
MiniMax Search 复用 MiniMax 密钥,国内直连 已配 MiniMax API Key
🌟 专业搜索 Tavily Search AI 场景专门优化,结果精简精准,每月 1000 次免费 需注册 Tavily
🔧 自部署 SearXNG Search 开源元搜索引擎,100% 隐私可控 需自行部署
⏭️ 跳过 Skip for now 暂不启用搜索,AI 无法获取实时信息

建议 :直接选 Parallel Search (Free),免密钥、免费、零配置,最省心。

步骤 6:是否立即配置技能(Configure Skills)

含义 :技能(Skills)让 AI 不只是"聊天",而是能真正动手做事------读写文件、执行命令、发邮件、处理 PDF 等。选 Yes 进入下一步选择具体技能依赖;选 No 全部跳过。

界面提示

复制代码
*  Configure skills now? (recommended)
|  > Yes /   No

筛选项说明

选项 说明
Yes 进入下一步,勾选需要安装的技能依赖包
No 跳过所有技能配置,后续可通过 openclaw configure 补配

建议 :选择 Yes,让 AI 成为能干活儿的"智能助理"。

步骤 7:安装技能依赖(Install Skill Dependencies)

含义 :勾选需要安装的额外技能依赖包。这些都是可选扩展,按需安装即可,不要一次性全选。

界面提示

复制代码
*  Install missing skill dependencies
|  [•] Skip for now (Continue without installing dependencies)
|  [ ] 🐙 github        --- GitHub 仓库操作
|  [ ] 📧 himalaya      --- 命令行邮件客户端
|  [ ] 📄 nano-pdf      --- PDF 文件处理
|  [ ] 🎤 openai-whisper--- 语音转文字
|  [ ] 💡 openhue       --- 智能灯泡控制
|  [ ] 📋 trello        --- Trello 看板管理
|  [ ] 🎬 video-frames  --- 视频帧处理
|  ...(共20+个技能)

筛选项说明

常用技能 功能简介 需要额外配置
🐙 github 操作 GitHub 仓库(Issues、PR 等) GitHub Token
📧 himalaya 命令行收发邮件 邮箱账号配置
📄 nano-pdf 读取和处理 PDF 文件
🎤 openai-whisper 语音消息转文字 OpenAI API Key
📋 trello Trello 看板任务管理 Trello API Key
🎬 video-frames 提取/处理视频帧 ffmpeg

建议 :直接选 Skip for now,后续用到哪个再装哪个,避免一次性装一堆用不上的依赖。

步骤 8:配置 Google Places API 密钥(地点查询)

含义 :为 goplaces(地点查询)技能配置 Google 地图 API 密钥。当 AI 需要回答"附近有什么餐厅"、"这个地址在哪"等问题时使用。国内用户基本用不到

界面提示

复制代码
*  Set GOOGLE_PLACES_API_KEY for goplaces?
|    Yes / > No

筛选项说明

选项 说明
Yes 输入 Google Places API Key(需海外 Google Cloud 账号申请)
No 跳过,不影响核心功能使用

建议 :选择 No,国内用户不需要。

步骤 9:配置 OpenAI API 密钥(Whisper 语音识别)

含义 :为 openai-whisper 技能配置 OpenAI API 密钥。Whisper 是 OpenAI 的语音识别模型,能把微信里的语音条转成文字让 AI 理解。

界面提示

复制代码
*  Set OPENAI_API_KEY for openai-whisper-api?
|    Yes / > No

筛选项说明

选项 说明
Yes 输入 OpenAI API Key,启用语音转文字功能
No 跳过,AI 仅处理文字消息

建议 :选择 No,除非你需要 AI 听懂微信语音消息。

步骤 10:配置 ElevenLabs API 密钥(AI 语音合成)

含义 :为 sag 技能配置 ElevenLabs API 密钥。ElevenLabs 是全球顶级的 AI 语音合成服务,能把文字转成逼真的人声音频,让 AI 直接发语音消息回复你。

界面提示

复制代码
*  Set ELEVENLABS_API_KEY for sag?
|    Yes / > No

筛选项说明

选项 说明
Yes 输入 ElevenLabs API Key,启用 AI 语音回复功能
No 跳过,仅使用文字回复

建议 :选择 No,文字回复已足够,语音合成需额外付费。

步骤 11:配置钩子(Hooks)

含义 :钩子(Hooks)是自动化触发器,可以在特定时机(如网关启动、对话重置)自动执行预设脚本,增强自动化能力。

界面提示

复制代码
*  Enable hooks?
|  [•] Skip for now
|  [ ] 🚀 boot-md
|  [ ] 📎 bootstrap-extra-files
|  [ ] 📝 command-logger
|  [ ] 🧹 compaction-notifier
|  [ ] 💾 session-memory

筛选项说明

钩子 触发时机 功能
🚀 boot-md 网关启动时 自动执行根目录 BOOT.md 中的指令
📎 bootstrap-extra-files AI 启动时 自动加载额外配置文件或提示词
📝 command-logger 每次对话命令 将所有命令记录到日志文件,方便回溯
🧹 compaction-notifier 对话过长压缩时 自动压缩总结并发送通知提醒
💾 session-memory 使用 /new/reset 自动保存当前会话摘要到长期记忆

建议 :选择 Skip for now,后续有需要再手动添加。

步骤 12:启动 AI 代理(Hatch Agent)

含义 :配置全部完成后,最后一步决定以什么方式启动运行你的 AI 代理。

界面提示

复制代码
*  How do you want to hatch your agent?
|  > Hatch in Terminal (recommended)
|    Hatch later

筛选项说明

选项 说明 适用场景
Hatch in Terminal(推荐) 在当前终端以命令行交互界面(TUI)直接运行,可立即开始对话 首次启动、快速测试
Hatch later 跳过启动,仅生成配置文件。后续通过 openclaw dashboard 在浏览器 WebUI 中启动和管理 长期后台运行、服务器部署

建议 :选择 Hatch in Terminal (recommended),立即体验。

13、完整安装过程实录

以下是实际执行 openclaw onboard --install-daemon 的终端输出全过程,每一步均已在上方章节中说明,可对照参考。本次安装选择:DeepSeek 模型提供商 + deepseek-v4-pro 模型 + 微信渠道 + Parallel Search 搜索引擎。

前置操作:清理旧版并重新安装最新版

shell 复制代码
Microsoft Windows [版本 10.0.22621.6060]
(c) Microsoft Corporation。保留所有权利。

C:\Users\Administrator>npm uninstall -g openclaw

removed 285 packages in 2m

C:\Users\Administrator>npm cache clean --force
npm warn using --force Recommended protections disabled.

C:\Users\Administrator>npm install -g openclaw@latest

added 285 packages in 1m

66 packages are looking for funding
  run `npm fund` for details

C:\Users\Administrator>set OPENCLAW_HOME=D:\software\openclaw

C:\Users\Administrator>set OPENCLAW_WORKSPACE=D:\software\openclaw\workspace

C:\Users\Administrator>set OPENCLAW_CONFIG_PATH=D:\software\openclaw\config\openclaw.json

C:\Users\Administrator>set OPENCLAW_STATE_DIR=D:\software\openclaw\state

C:\Users\Administrator>openclaw onboard --workspace D:\software\openclaw\workspace --install-daemon
|
o

OpenClaw 2026.6.6 (8c802aa) --- I'll do the boring stuff while you dramatically stare at the logs like it's cinema.

Windows detected - OpenClaw runs great on WSL2!
Native Windows might be trickier.
Quick setup: wsl --install (one command, one reboot)
Guide: https://docs.openclaw.ai/windows
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██
██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██
██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       OPENCLAW

T  OpenClaw setup
|
o  Security disclaimer ----------------------------------------------------------------------+
|                                                                                            |
|  OpenClaw is a hobby project and still in beta. Expect sharp edges.                        |
|  By default, OpenClaw is a personal agent: one trusted operator boundary.                  |
|  This bot can read files and run actions if tools are enabled.                             |
|  A bad prompt can trick it into doing unsafe things.                                       |
|                                                                                            |
|  OpenClaw is not a hostile multi-tenant boundary by default.                               |
|  If multiple users can message one tool-enabled agent, they share that delegated tool      |
|  authority.                                                                                |
|                                                                                            |
|  If you're not comfortable with security hardening 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.                                                    |
|  - Multi-user/shared inbox: split trust boundaries (separate gateway/credentials, ideally  |
|    separate OS users/hosts).                                                               |
|  - Sandbox + least-privilege tools.                                                        |
|  - Shared inboxes: isolate DM sessions (session.dmScope: per-channel-peer) and keep tool   |
|    access minimal.                                                                         |
|  - 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                                                             |
|                                                                                            |
|  Learn more                                                                                |
|  - https://docs.openclaw.ai/gateway/security                                               |
|                                                                                            |
+--------------------------------------------------------------------------------------------+
|
o  I understand this is personal-by-default and shared/multi-user use requires lock-down. Continue?
|  Yes
|
o  Setup mode
|  QuickStart (recommended)
|
o  QuickStart -------------------------+
|                                      |
|  Gateway port: 18789                 |
|  Gateway bind: Loopback (127.0.0.1)  |
|  Gateway auth: Token (default)       |
|  Tailscale exposure: Off             |
|  Direct to chat channels.            |
|                                      |
+--------------------------------------+
|
o  Model/auth provider
|  More...
|
o  Model/auth provider
|  DeepSeek
|
o  Enter DeepSeek API key
|  •••••••••••••••••••••••••••••••••••
|
o  Model configured --------------------------------+
|                                                   |
|  Default model set to deepseek/deepseek-v4-flash  |
|                                                   |
+---------------------------------------------------+
|
o  Default model
|  Browse all models
|
|
o  Default model
|  deepseek/deepseek-v4-pro
|
o  How channels work -----------------------------------------------------------------------+
|                                                                                           |
|  Inbound DM safety defaults to pairing: unknown senders get a pairing code first.         |
|  Approve with: openclaw pairing approve <channel> <code>                                  |
|  Open/public DMs require dmPolicy="open" plus allowFrom=["*"].                            |
|  For multi-user DMs, isolate sessions with: openclaw config set session.dmScope           |
|  "per-channel-peer" (or "per-account-channel-peer" for multi-account channels).           |
|  Docs: channels/pairing                                                                   |
|                                                                                           |
|  Feishu: 飞书/Lark enterprise messaging with doc/wiki/drive tools.                        |
|  Google Chat: Google Workspace Chat app with HTTP webhook.                                |
|  Nostr: Decentralized protocol; encrypted DMs via NIP-04.                                 |
|  Microsoft Teams: Teams SDK; enterprise support.                                          |
|  Mattermost: self-hosted Slack-style chat; install the plugin to enable.                  |
|  Nextcloud Talk: Self-hosted chat via Nextcloud Talk webhook bots.                        |
|  Matrix: open protocol; install the plugin to enable.                                     |
|  LINE: LINE Messaging API webhook bot.                                                    |
|  Zalo: Vietnam-focused messaging platform with Bot API.                                   |
|  ClickClack: self-hosted chat via first-class ClickClack bot tokens.                      |
|  Zalo Personal: Zalo personal account via QR code login.                                  |
|  SMS: Twilio-backed SMS with inbound webhooks and outbound replies.                       |
|  Synology Chat: Connect your Synology NAS Chat to OpenClaw with full agent capabilities.  |
|  Tlon: decentralized messaging on Urbit; install the plugin to enable.                    |
|  Discord: very well supported right now.                                                  |
|  iMessage: Local iMessage/SMS through the imsg bridge, including private API message      |
|  actions when enabled.                                                                    |
|  IRC: classic IRC networks with DM/channel routing and pairing controls.                  |
|  QQ Bot: connect to QQ via official QQ Bot API with group chat and direct message         |
|  support.                                                                                 |
|  Signal: signal-cli linked device; more setup (David Reagans: "Hop on Discord.").         |
|  Slack: supported (Socket Mode).                                                          |
|  Telegram: simplest way to get started --- register a bot with @BotFather and get going.    |
|  Twitch: Twitch chat integration                                                          |
|  WhatsApp: works with your own number; recommend a separate phone + eSIM.                 |
|  WeCom: Enterprise messaging and documents, scheduling, task tools.                       |
|  Weixin: Personal WeChat messaging via QR-code login.                                     |
|  Yuanbao: Tencent Yuanbao AI assistant conversation channel.                              |
|                                                                                           |
+-------------------------------------------------------------------------------------------+
|
o  Select channel (QuickStart)
|  Weixin(微信)
|
o  Installed Weixin plugin
|
o  Channel setup ----------------------------------------------------------------------------+
|                                                                                            |
|  openclaw-weixin does not have an interactive setup screen yet. Run openclaw channels add  |
|  --channel openclaw-weixin --help for supported flags.                                     |
|                                                                                            |
+--------------------------------------------------------------------------------------------+
Updated config: $OPENCLAW_HOME\config\openclaw.json
Workspace OK: $OPENCLAW_HOME\workspace
Sessions OK: $OPENCLAW_HOME\state\agents\main\sessions
|
o  Web search -----------------------------------------------------------------+
|                                                                              |
|  Web search lets your agent look things up online.                           |
|  Choose a provider. Some providers need an API key, and some work key-free.  |
|  Docs: https://docs.openclaw.ai/tools/web                                    |
|                                                                              |
+------------------------------------------------------------------------------+
|
o  Search provider
|  Parallel Search (Free)
|
o  Web search --------------------------------------------------------------+
|                                                                           |
|  Parallel Search (Free) works without an API key.                         |
|  OpenClaw will enable the plugin and use it as your web_search provider.  |
|  Docs: https://docs.openclaw.ai/tools/parallel-search                     |
|                                                                           |
+---------------------------------------------------------------------------+
|
o  Skills status -------------+
|                             |
|  Eligible: 17               |
|  Missing requirements: 33   |
|  Unsupported on this OS: 8  |
|  Blocked by allowlist: 0    |
|                             |
+-----------------------------+
|
o  Configure skills now? (recommended)
|  Yes
|
o  Install missing skill dependencies
|  Skip for now
|
o  Set GOOGLE_PLACES_API_KEY for goplaces?
|  No
|
o  Set OPENAI_API_KEY for openai-whisper-api?
|  No
|
o  Set ELEVENLABS_API_KEY for sag?
|  No
|
o  Hooks ------------------------------------------------------------------+
|                                                                          |
|  Hooks let you automate actions when agent commands are issued.          |
|  Example: Save session context to memory when you issue /new or /reset.  |
|                                                                          |
|  Learn more: https://docs.openclaw.ai/automation/hooks                   |
|                                                                          |
+--------------------------------------------------------------------------+
|
o  Enable hooks?
|  Skip for now
|
o  Gateway service runtime --------------------------------------------+
|                                                                      |
|  QuickStart uses Node for the Gateway service (stable + supported).  |
|                                                                      |
+----------------------------------------------------------------------+
|
•  Installing Gateway service......
Installed Scheduled Task: OpenClaw Gateway
Task script: D:\software\openclaw\state\gateway.cmd
o  Gateway service installed.
Health check failed: connect ECONNREFUSED 127.0.0.1:18789
|
o  Health check help --------------------------------+
|                                                    |
|  Docs:                                             |
|  https://docs.openclaw.ai/gateway/health           |
|  https://docs.openclaw.ai/gateway/troubleshooting  |
|                                                    |
+----------------------------------------------------+
|
o  Optional apps ------------------------+
|                                        |
|  Add nodes for extra features:         |
|  - macOS app (system + notifications)  |
|  - iOS app (camera/canvas)             |
|  - Android app (camera/canvas)         |
|                                        |
+----------------------------------------+
|
o  Control UI ---------------------------------------------------------------------+
|                                                                                  |
|  Web UI: http://127.0.0.1:18789/                                                 |
|  Web UI (with token):                                                            |
|  http://127.0.0.1:18789/#token=36985bd44c9ab7dc9c524d3bff3b7d423e3426cc96491efb  |
|  Gateway WS: ws://127.0.0.1:18789                                                |
|  Gateway: not detected (connect ECONNREFUSED 127.0.0.1:18789)                    |
|  Docs: https://docs.openclaw.ai/web/control-ui                                   |
|                                                                                  |
+----------------------------------------------------------------------------------+
|
o  Hatch your agent ---------------------------------------------------+
|                                                                      |
|  Your workspace is ready.                                            |
|  The first Terminal chat run will send: "Wake up, my friend!"        |
|  Edit BOOTSTRAP.md later to change how the agent introduces itself.  |
|                                                                      |
+----------------------------------------------------------------------+
|
o  How do you want to hatch your agent?
|  Hatch in Terminal (recommended)
|
o

OpenClaw 2026.6.6 (8c802aa) --- I'm not saying your workflow is chaotic... I'm just bringing a linter and a helmet.

 openclaw tui - local embedded - agent main - session main

 session agent:main:main


Wake up, my friend!


 ⠙ flibbertigibbeting... • 0s | local ready
 agent main | session main | deepseek/deepseek-v4-pro | think high | tokens ?/1.0m
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

4、验证安装

配置完成后,执行以下命令验证安装是否成功:

bash 复制代码
# 1. 检查版本
openclaw --version

# 2、启动
openclaw gateway start

# 3. 查看状态
openclaw status

# 4. 访问 WebUI
# 浏览器打开:http://localhost:18789

四、命令管理

1、常用命令

bash 复制代码
# 启动 Gateway 服务(后台启动)
openclaw gateway start

# 停止 Gateway 服务
openclaw gateway stop

# 重启 Gateway 服务(修改配置后常用)
openclaw gateway restart

# 查看运行状态(Gateway、模型、渠道等信息)
openclaw status

# 前台运行查看日志(调试闪退/连接问题)
openclaw gateway run

# 运行诊断检查(能修则加 --fix)
openclaw doctor

# 切换默认模型,如 openclaw models set zai/glm-5.2
openclaw models set <模型ID>

2、其他命令(服务管理、模型配置等)

bash 复制代码
# ===============服务管理相关命令===============
# 启动 Gateway 服务(后台启动)
openclaw gateway start

# 停止 Gateway 服务
openclaw gateway stop

# 重启 Gateway 服务(修改配置后常用)
openclaw gateway restart

# 前台运行查看日志(调试闪退/连接问题)
openclaw gateway run

# 查看整体运行状态
openclaw status

# 运行诊断检查并自动修复
openclaw doctor
# 如果执行了doctor并且提示能修复,则使用下面的命令
openclaw doctor --fix

# 闪退时先卸载再重装服务
openclaw gateway uninstall
openclaw gateway install

# ===============模型配置相关命令===============
# 查看已安装的模型列表
openclaw models list

# 查看所有可用模型(包括未安装的)
openclaw models list --all

# 显示当前正在使用的默认模型
openclaw models current

# 查看模型切换结果与状态
openclaw models status

# 切换默认模型,如 openclaw models set zai/glm-5.2
openclaw models set <模型ID>

# 交互式添加新的 API Key 认证配置
openclaw models auth add

# 查看所有已配置的认证 Profile
openclaw models auth list

# 同提供商多 Key 时设定使用顺序
openclaw models auth order set --provider <名称> <profile1> <profile2>

# 快速添加 API Key,如 --provider zai
openclaw models auth paste-api-key --provider <名称>

# 扫描 OpenRouter 免费模型,可加 --set-default
openclaw models scan
openclaw models scan --set-default

# 移除指定提供商的配置
openclaw config set models.providers.<名称> null --strict-json

# 设置模型备用链路(主模型挂了自动切备用)
openclaw config set agents.defaults.model.fallbacks '["zai/glm-5.2", "zai/glm-4.5-flash"]'

# 查看当前 fallback 配置
openclaw models fallbacks list

# ===============配置文件相关命令===============
# 查看当前完整配置
openclaw config get

# 查看具体配置项,如 openclaw config get gateway.port
openclaw config get <key>

# 修改任意配置项
openclaw config set <key> <value>

# 修改监听地址(默认127.0.0.1,改0.0.0.0允许外部访问)
openclaw config set gateway.host 0.0.0.0

# 修改端口
openclaw config set gateway.port 18789

# 配置文件路径:D:\software\openclaw\config\openclaw.json

# 手动备份配置文件
copy D:\software\openclaw\config\openclaw.json D:\software\openclaw\config\openclaw.json.bak

# ===============Token与渠道相关命令===============
# 重新生成 WebUI 访问令牌
openclaw token generate

# 查看所有渠道是否在线
openclaw channels status --probe

# 查看已安装的所有插件
openclaw plugins list

# Workboard 插件启用/禁用
openclaw config set plugins.entries.workboard.enabled true
openclaw config set plugins.entries.workboard.enabled false

# ===============Ollama本地模型相关命令===============
# 查看已下载的模型
ollama list

# 下载模型
ollama pull qwen3.5:4b

# 查看模型信息
ollama show qwen3.5:4b

# 删除模型
ollama rm qwen3.5:4b

# 查看 Ollama 进程 PID 并杀掉
# tasklist | findstr ollama
# taskkill /F /PID <PID号>

# 设置 Ollama 环境变量(cmd 管理员模式)
# setx OLLAMA_MODELS "D:\ollama\models" /M
# setx OLLAMA_HOST "0.0.0.0" /M

# 重启 Ollama 服务(设置环境变量后需要重启)
# ollama serve

# ===============安全与定时任务相关命令===============
# 深度安全扫描,可加 --fix 修复
openclaw security audit --deep
openclaw security audit --fix

# 查看已设置的定时任务
openclaw cron list

# 添加定时任务,例如每天18:30
openclaw cron add --name "日报提醒" --schedule "0 18 * * *" --tz "Asia/Shanghai" --message "该写日报了"
  • 查看安装后的token信息(找到里面的token)
shell 复制代码
D:\software\openclaw\config\openclaw.json
相关推荐
AC赳赳老秦10 小时前
Excel 动态仪表盘制作:用 OpenClaw 自动处理数据、生成交互式图表并实时更新仪表盘
大数据·服务器·后端·测试用例·excel·deepseek·openclaw
龙亘川1 天前
开源本地 AI 智能体网关 OpenClaw 深度实践:架构解析、全场景部署与自动化落地指南
人工智能·架构·开源·openclaw
AC赳赳老秦2 天前
传感器数据自动汇总:OpenClaw 采集多类传感器数据、清洗入库、生成趋势分析
java·人工智能·python·自动化·github·php·openclaw
Ai尚研修-贾莲3 天前
基于Claude Code与Codex双Agent协作的WebGIS全链路开发
codex·webgis·ai-agent·claude code·maplibre·openclaw·leaflet交互地图
AC赳赳老秦4 天前
采购专员自动化:OpenClaw 自动比价、生成询价单、跟踪供应商报价进度实战指南
开发语言·数据库·人工智能·python·自动化·github·openclaw
七夜zippoe4 天前
OpenClaw 数据加密:敏感信息保护的完整方案
数据库·mysql·php·openclaw·敏感保护
yanwei20205 天前
NinChat:构建 AI 时代的实时新闻搜索基础设施
人工智能·ai agent·openclaw·hermes·meilishard·热点新闻聚合
Koma-forever5 天前
OpenClaw-使用本地Ollamam模型(opencalw config+ ollama launch)
ollama·openclaw
梦想的初衷~6 天前
【科研自动化实战】Codex × Claude Code × OpenClaw × Hermes:四位AI研究员的科研协作流水线搭建指南
人工智能·codex·claude code·openclaw·科研自动化·agent协作·ai科研助手