惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
P
Palo Alto Networks Blog
C
Cisco Blogs
The Hacker News
The Hacker News
T
Threatpost
S
Schneier on Security
K
Kaspersky official blog
Spread Privacy
Spread Privacy
博客园_首页
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
NISL@THU
NISL@THU
量子位
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Google DeepMind News
Google DeepMind News
Security Latest
Security Latest
博客园 - 司徒正美
云风的 BLOG
云风的 BLOG
博客园 - 叶小钗
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
News and Events Feed by Topic
爱范儿
爱范儿
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
Project Zero
Project Zero
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Cisco Talos Blog
Cisco Talos Blog
GbyAI
GbyAI
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Apple Machine Learning Research
Apple Machine Learning Research
T
Tenable Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
Vulnerabilities – Threatpost
Forbes - Security
Forbes - Security
博客园 - 三生石上(FineUI控件)
C
Cyber Attacks, Cyber Crime and Cyber Security
N
News and Events Feed by Topic
V
V2EX
Webroot Blog
Webroot Blog
The Register - Security
The Register - Security
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
阮一峰的网络日志
阮一峰的网络日志
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Blog — PlanetScale
Blog — PlanetScale
M
MIT News - Artificial intelligence
Scott Helme
Scott Helme
Simon Willison's Weblog
Simon Willison's Weblog
L
LangChain Blog
W
WeLiveSecurity
Cloudbric
Cloudbric

博客园 - work hard work smart

使用 LangChain + Hugging Face 构建文本向量化服务 SQLAlchemy 使用详解 Python 中使用 Elasticsearch 的完整指南 Qdrant 向量数据库使用指南 OpenEvals 快速入门:LLM 评估指南 DeepEval 快速入门:LLM 应用评估指南 LangSmith 批量评估完全指南 Qwen-Agent 入门指南:快速构建智能体应用 LangSmith 集成实战:从追踪到评估的完整指南 初识 go-zero:一款让你写后端更规范、更高效的 Go 微服务框架 RAG 中为什么需要 Rerank,以及如何使用 Rerank LangChain4j RAG 核心组件与组合方式 如何使用 Elasticsearch 进行全文检索和向量检索 MinerU Docker 部署指南 5 分钟上手:为 Cline 配置一个免费的 MCP 天气服务 Neo4j 图数据库安装与 Spring Boot 集成实战指南 LangFuse 实战指南:用 @observe 三行代码给 LLM 应用加上全链路追踪 Function Call 深度解析:让大模型从"嘴炮"到"实干"的技术革命 Spring AI 提示词模板实战:告别硬编码,实现提示词工程化管理 LangChain4j 实战指南:用 Java 轻松构建 AI 应用 Spring AI 对话短期记忆实战:让大模型拥有"记忆力" Spring AI 提示词工程实战:让大模型更懂你的意图 Spring AI ChatClient 深度解析:优雅构建大模型应用的利器 Spring AI Alibaba DashScopeChatModel 实战 Spring 中 SSE 流式输出的多种实现方式详解 OpenSandbox 实战指南:为 AI Agent 构建安全的代码执行沙箱 在本机启动 LangGraph 开发服务器:完整指南 DeepAgents中Backend的奥秘:让AI Agent拥有文件操作能力 为什么选择 Go 开发 Web 接口?从入门到实践 智能搜索DeepAgent笔记 RAG学习笔记2--系统查询流程 RAG学习笔记1--系统文件导入流程 百炼 WebSearch 快速入门指南 Python 连接 MongoDB 完整指南:从连接配置到增删改查实战 一行命令搞定 MongoDB 开发环境:Docker Compose 部署 + 可视化管理 使用 Attu 可视化管理 Milvus 向量数据库 在 Windows Docker 中快速安装 Milvus 2.5.6 minio使用 Spark 集群搭建 hadoop集群安装 Spring AI Alibaba 入门实战 MyBatis 核心流程和原理 Idea中安装Claude code插件 Spark 编程 使用Matplotlib 绘制直方图 Flink安装部署 Flume安装 查找导致cpu过高的代码方法 JVisualVM监控远程Java进程 jmap jacoco多模块生成java单元测试报告实践 arthas 使用demo LockSupport Exchanger CyclicBarrier CountDownLatch 手把手教你用python开始第一个机器学习项目
Windows 安装 OpenClaw 实战指南
work hard work smart · 2026-03-12 · via 博客园 - work hard work smart

Windows 安装 OpenClaw 实战指南

这篇文章记录我在 Windows 上安装和使用 OpenClaw 的完整流程。
目标:安装成功 -> 跑起 Gateway -> 打开控制台 -> 配置可用大模型。

最终安装效果图
打开openclaw http://127.0.0.1:18789/#token=xxx
image


一、安装前准备

OpenClaw 在 Windows 上最关键的依赖是 Node.js 22+
Python 不是 OpenClaw 本体必须依赖(除非你还有其他 Python 项目需求)。

先检查版本:

node -v
npm -v

如果 Node 版本小于 22,先升级后再继续。


二、安装 OpenClaw

推荐安装命令:

npm install -g openclaw@latest

安装后验证:

openclaw --version

三、初始化向导(必须)

执行:

openclaw onboard --install-daemon

向导建议选择:

  1. Onboarding mode: Manual
  2. Set up: Local gateway (this machine)
  3. Model/Auth: 选择你的模型提供商(OpenAI / Anthropic / Ollama / 自定义兼容)
  4. Gateway auth: 开启 token(推荐)

四、启动与验证 Gateway

openclaw gateway status
openclaw dashboard

默认控制台地址一般是:

  • http://127.0.0.1:18789/

五、如何配置“使用哪个大模型”

方案 1:OpenAI API Key

$env:OPENAI_API_KEY="sk-xxx"
openclaw onboard --auth-choice openai-api-key

方案 2:自定义 OpenAI 兼容地址(第三方网关/代理)

建议用单行命令,避免 PowerShell 换行转义问题:

$env:CUSTOM_API_KEY="your-key"; openclaw onboard --auth-choice custom-api-key --custom-compatibility openai --custom-provider-id myproxy --custom-base-url "https://your-endpoint/v1" --custom-model-id "gpt-4o"

方案 3:本地模型(Ollama)

$env:OLLAMA_API_KEY="ollama-local"

然后在模型里选择类似:

  • ollama/llama3.3
  • ollama/qwen2.5-coder:32b

六、常见报错与解决

现象:Dashboard 能打开,但聊天页提示未授权。
原因:Control UI 没有携带/保存 Gateway Token。

处理步骤

  1. 重新执行 openclaw dashboard,用命令返回的完整 URL 打开
  2. 在 Control UI 设置中填入 Gateway Token 并保存
  3. 刷新页面
  4. 仍失败时,重新执行:
openclaw onboard --install-daemon

七、日常运维命令

openclaw doctor
openclaw gateway status
openclaw logs follow
openclaw dashboard

总结

Windows 下 OpenClaw 稳定运行,关键就三件事:

  1. Node.js 版本正确(22+)
  2. 首次 onboarding 配置完整(尤其 gateway token)
  3. 模型提供商 keybase_url 配置正确

把这三点做好,OpenClaw 基本就能顺利用起来。