Windows安装OpenClaw龙虾助手

1. 打开管理员PowerShell
  1. Win 键,搜索 PowerShell

  2. 右键 → 管理员 身份运行(必须管理员)

  3. 弹出"用户账户控制" → 点

2. 解锁脚本执行权限(必做)

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

3.安装Node.js: https://nodejs.org/zh-cn 进行下载
  • 安装时务必勾选Add Git to PATH,新手保持默认选项即可。
4.安装龙虾OpenClaw

npm config set registry https://registry.npmmirror.com

配置国内镜像 完成后,再次执行 npm i -g openclaw 进行安装。

openclaw --version

openclaw onboard

5、windows如果报错
复制代码
选择一:修复 Windows 原生安装
在管理员 PowerShell 中依次执行:

powershell
# 1. 先卸载
npm uninstall -g openclaw

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

# 3. 重新用官方脚本安装
iwr -useb https://clawd.org.cn/install.ps1 -OutFile install.ps1; ./install.ps1 -Registry https://registry.npmmirror.com

# 1. 先查看当前配置
Get-Content C:\Users\Administrator\.openclaw\openclaw.json

# 2. 创建一个正确的配置文件(无 bind 字段)
@'
{
  "wizard": {
    "lastRunAt": "2026-04-07T12:16:48.158Z",
    "lastRunVersion": "0.2.0",
    "lastRunCommand": "onboard",
    "lastRunMode": "local"
  },
  "models": {
    "mode": "merge",
    "providers": {
      "custom": {
        "baseUrl": "https://maas-api.cn-huabei-1.xf-yun.com/v2",
        "apiKey": ":",
        "api": "openai-completions",
        "models": [
          {
            "id": "xopglm5",
            "name": "xopglm5",
            "reasoning": false,
            "input": ["text"],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 128000,
            "maxTokens": 4096
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "custom/xopglm5"
      },
      "models": {
        "custom/xopglm5": {
          "alias": "xopglm5"
        }
      },
      "workspace": "C:\\Users\\Administrator\\.openclaw\\workspace",
      "maxConcurrent": 4,
      "subagents": {
        "maxConcurrent": 8
      }
    }
  },
  "commands": {
    "native": "auto",
    "nativeSkills": "auto"
  },
  "gateway": {
    "port": 9999,
    "mode": "local",
    "auth": {
      "mode": "password",
      "password": "s19911009!"
    },
    "tailscale": {
      "mode": "off",
      "resetOnExit": false
    }
  },
  "meta": {
    "lastTouchedVersion": "0.2.0",
    "lastTouchedAt": "2026-04-07T12:16:48.194Z"
  }
}
'@ | Out-File -FilePath C:\Users\Administrator\.openclaw\openclaw.json -Encoding utf8

# 3. 验证配置是否还有错误
openclaw-cn doctor

# 4. 重启 gateway
openclaw-cn gateway restart
相关推荐
qq_369224339 天前
Windows全系通用!ntdll.dll文件丢失、报错、闪退问题的完整排查与修复教程
windows·dll·dll修复·dll丢失·dll错误
阿米亚波9 天前
【Windows】QEMU 启动 openEuler aarch64/arm64 架构系统 + 离线软件源
linux·windows·经验分享·笔记·架构·arm
caimouse9 天前
Reactos 第 10 章 网络操作 — 10.3.1 NIC驱动
网络·windows
初圣魔门首席弟子9 天前
Node.js 详细介绍(知识库版)
windows·qt·node.js·知识库
CHENG-JustDoIt9 天前
AI工具 | 爆火开源项目Odysseus AI 工作台:从项目介绍、部署情况及其使用等多方位分析指南(含详细步骤)
大数据·人工智能·windows·python·ai·开源·github
kingbal9 天前
Windows:flutter环境搭建
windows·flutter
未若君雅裁9 天前
Python 数据容器详解,list、tuple、str、set、dict 到底怎么选
windows·python·list
CodeKwang9 天前
Windows 环境 OCCT 8.0 编译构建及与 Qt6 项目集成
windows·qt·opencascade
我是伪码农9 天前
小兔鲜1-25
linux·服务器·windows
vx-Biye_Design9 天前
springboot安阳地区研学旅游服务小程序-计算机毕业设计源码12785
java·vue.js·windows·spring boot·tomcat·maven·mybatis