手把手WSL源码安装openclaw(Clawdbot、Moltbot)
windows手动安装openclaw
·
文章目录
纯粹个人比较喜欢手动安装,简单记录下
Windows
Nodejs安装
下载安装
https://nodejs.org/dist/v24.13.1/node-v24.13.1-x64.msi
Nodejs源配置
Git安装
使用默认安装选项
安装openclaw
用git bash打开
d:
cd D:/opt/
# 具体tag自己查询最新的就行
git clone -b v2026.2.22 https://gitcode.com/GitHub_Trending/cl/openclaw.git
cd D:/opt/openclaw
pnpm install
pnpm ui:build
pnpm build
pnpm openclaw onboard --install-daemon
配置参考
OpenClaw(原 Clawdbot)钉钉对接保姆级教程 手把手教你打造自己的 AI 助手
自动重启脚本
主要避免进程异常挂掉后,手机端无法控制
chcp 65001
@echo off
d:
call cd D:\OpenClaw\openclaw
:restart
echo [%date% %time%] 正在启动 OpenClaw Gateway...
call pnpm openclaw gateway --port 18789 --verbose
echo [%date% %time%] 进程已退出,5秒后自动重启...
timeout /t 5 /nobreak >nul
goto restart
pause
Windows(WSL)
安装系统
https://learn.microsoft.com/zh-cn/windows/wsl/install
查询可安装列表
wsl --list --online

安装系统
wsl --install Ubuntu-24.04
配置镜像源
# 备份镜像源
cp -a /etc/apt/sources.list /etc/apt/sources.list.bak
# 刷新源
sed -i "s@http://.*archive.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list.d/ubuntu.sources
sed -i "s@http://.*security.ubuntu.com@http://mirrors.huaweicloud.com@g" /etc/apt/sources.list.d/ubuntu.sources
# 安装依赖
apt install -y git tar unzip
安装Nodejs
下载软件
nodejs:https://nodejs.org/dist/v24.13.0/node-v24.13.0-linux-x64.tar.xz
将软件下载至:C:\Users\Administrator\Downloads\目录下
拷贝软件
cp -r /mnt/c/Users/Administrator/Downloads/node-v24.13.0-linux-x64.tar.xz /opt/
安装
nodejs
cd /opt/
xz -d node-v24.13.0-linux-x64.tar.xz
tar -xvf node-v24.13.0-linux-x64.tar.xz
mv node-v24.13.0-linux-x64 nodejs
echo 'PATH=/opt/nodejs/bin:$PATH' >> /etc/profile
source /etc/profile
Nodejs源配置
cat > ~/.npmrc << EOF
registry = https://mirrors.huaweicloud.com/repository/npm/
always-auth = false
strict-ssl = true
EOF
安装pnpm
npm install -g pnpm

安装openclaw
cd /opt/
# 具体tag自己查询最新的就行
git clone -b v2026.2.22 https://gitcode.com/GitHub_Trending/cl/openclaw.git
cd /opt/openclaw
pnpm install
pnpm ui:build
pnpm build
pnpm openclaw onboard --install-daemon
配置参考
OpenClaw(原 Clawdbot)钉钉对接保姆级教程 手把手教你打造自己的 AI 助手
访问
获取token
# 查看token
cat ~/.openclaw/openclaw.json | grep \"token\":

访问地址
http://127.0.0.1:18789/?token=2eee0905ec11526425441d30b22028da7ba88a5d44f0df6d
更多推荐

所有评论(0)