如何加速安装小龙虾 openclaw
前言
所谓加速,是针对国内用户而言的,海外用户不存在此问题
相关站点
加速方法
-
配置镜像(上述中国社区有相关说明,此方法无法解决Nodejs,git安装问题)
- Window 命令参数
-Registry https://registry.npmmirror.com - Linux 命令参数
--registry https://registry.npmmirror.com
- Window 命令参数
-
从gitee拉取(上述中国社区有相关说明,比 1. 更繁琐,但更彻底,此方法仍无法解决Nodejs,git安装问题)
-
设置代理(以下均为临时代理,命令行窗口关闭即失效)
- Windows CMD:
set HTTP_PROXY=http://47.82.11.22:60000
set HTTPS_PROXY=http://47.82.11.22:60000 - Windows PowerShell:
$env:HTTP_PROXY=http://47.82.11.22:60000
$env:HTTPS_PROXY=http://47.82.11.22:60000 - Linux:
export HTTP_PROXY="http://47.82.11.22:60000"
export HTTPS_PROXY="http://47.82.11.22:60000"
- Windows CMD:
备注:
-
Linux 自定义安装
curl -fsSL https://openclaw.ai/install.sh | bash -s -- --version 2026.4.12 --registry https://registry.npmmirror.com --no-onboard除了上述 -Registry 加速以外, apt 也要通过切换包源加速(中科大,清华都有镜像源,winget 只有中科大有)
-
Windows 自定义安装
安装
1. 为当前用户设置执行策略,允许运行本地脚本
2. (可选)临时为当前进程解除所有限制,确保安装脚本不被拦截
1、Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser(永久策略)
2、Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass(临时策略,可选)
3、 & ([scriptblock]::Create((iwr -useb https://openclaw.ai/install.ps1))) -Tag 2026.4.12 -Registry https://registry.npmmirror.com -NoOnboard
4、除了上述 -Registry 加速以外,安装过程中还会用到 winget 或 scoop,如果系统已经有了 winget 则加速 winget,否则优先安装 scoop,
winget 加速
-安装前:winget source remove winget,winget source add winget https://mirrors.ustc.edu.cn/winget-source --trust-level trusted
-安装后:winget source remove winget,winget source add winget https://cdn.winget.microsoft.com/cache --trust-level trusted
-(如果只用一次可以这样:winget source add ustc https://mirrors.ustc.edu.cn/winget-source --trust-level trusted,winget install <软件包ID> --source ustc)
scoop 加速
见 scoop 加速安装的帖子(scoop 似乎只有南京大学,上海交通大学有镜像源)
-
安装参数说明
--version 2026.4.12 之后版本出现配置中断问题
--registry https://registry.npmmirror.com 国内加速(Notejs或git下载速度慢只能预先安装或设置代理)
--no-onboard 避免路径出现问题被 openclaw doctor 胡乱解决(非root用户,使用sudo安装时,容易产生路径问题,按照自动安装脚本提示解决即可) -
运行说明
- openclaw onboard (--install-daemon,此参数作用==2.)完成基础配置(通常在安装过程尾部)
- openclaw gateway install 安装服务守护进程(确保主机重启后仍有效)
- openclaw gateway start或restart 启动服务
- openclaw dashboard 启动 WebUI(也可以使用 openclaw tui 快速测试或体验)

浙公网安备 33010602011771号