boot_installer
Runs {baseDir}/boot.sh to manage the full openclaw environment lifecycle.
Requires Linux and root/sudo access. The script handles privilege escalation automatically.
Slash commands
| Command | What it does |
|---|
| INLINECODE1 | Fresh install of all components |
| INLINECODE2 |
Upgrade all packages to latest versions |
|
/boot-repair | Deep clean and rebuild broken state |
|
/boot-check | Health-check — verify all components |
When to run which mode
- - User says "install openclaw", "set it up", "run the installer" → install (no flag)
- User says "update", "upgrade packages" → update
- User says "repair", "fix", "something is broken", "rebuild" → repair
- User says "check", "status", "is everything installed", "health check" → check
How to invoke
Always run as the calling user (sudo is handled internally by the script):
CODEBLOCK0
Use the exec tool. Stream output so the user sees the spinner progress live.
What gets installed (install mode)
- - Node.js v24+ via NodeSource
- UV Python package manager (
~/.local/bin/uv) - Python 3.10 venv at
~/venv with INLINECODE8 - Chromium browser via Playwright (
~/.cache/ms-playwright) - NPM globals:
9router, openclaw@latest, clawhub, paperclipai, @presto-ai/google-workspace-mcp, INLINECODE15 - System symlinks in INLINECODE16
- INLINECODE17 autostart via systemd user service (falls back to
.bashrc hook) - INLINECODE19 systemd user service
- Mcporter Google Workspace connector
Key paths
| Path | Purpose |
|---|
| INLINECODE20 | Python virtual environment |
| INLINECODE21 |
UV binary |
|
~/.local/npm/bin | NPM global binaries |
|
~/.cache/ms-playwright | Chromium browser |
|
~/.openclaw/workspace/skills | Workspace skills |
|
~/.config/systemd/user/9router.service | 9router systemd unit |
|
~/.config/systemd/user/openclaw-gateway-watchdog.service | Gateway watchdog |
After install
If .bashrc was modified, remind the user to reload their shell:
CODEBLOCK1
Logs and errors
The script writes a full log to /tmp/boot-YYYYMMDD-HHMMSS.log. If a step fails, the last 15 lines of output are printed inline and the log path is shown. Surface that path to the user on failure.
Check mode exit codes
INLINECODE29 exits with the count of failed checks (0 = all pass, 1–125 = N issues, capped at 125). Parse the exit code and tell the user how many checks failed and to run bash {baseDir}/boot.sh to repair.
Troubleshooting
- - APT lock held — script waits up to 120 s and kills blocking processes automatically. No user action needed.
- Node.js wrong version — script upgrades it automatically if the installed major is below 24.
- Broken Python venv — run
--repair first, then run without flags to reinstall packages. - 9router not starting — logs at
~/.local/share/9router.log. Falls back to .bashrc login hook if systemd unavailable. - Gateway watchdog not starting — run
journalctl --user -u openclaw-gateway-watchdog -n 50. - Permission errors on files — run without flags (install mode);
_fix_ownership runs at the end of every install/update.
boot_installer
运行 {baseDir}/boot.sh 来管理完整的 openclaw 环境生命周期。
需要 Linux 系统和 root/sudo 权限。该脚本会自动处理权限提升。
斜杠命令
| 命令 | 功能 |
|---|
| /boot-install | 全新安装所有组件 |
| /boot-update |
将所有软件包升级到最新版本 |
| /boot-repair | 深度清理并重建损坏状态 |
| /boot-check | 健康检查 — 验证所有组件 |
何时运行哪种模式
- - 用户说 安装 openclaw、设置、运行安装程序 → 安装(无标志)
- 用户说 更新、升级软件包 → 更新
- 用户说 修复、修理、有东西坏了、重建 → 修复
- 用户说 检查、状态、是否全部安装、健康检查 → 检查
如何调用
始终以调用用户身份运行(sudo 由脚本内部处理):
bash
bash {baseDir}/boot.sh # 安装
bash {baseDir}/boot.sh --update # 更新
bash {baseDir}/boot.sh --repair # 修复
bash {baseDir}/boot.sh --check # 检查 — 退出时返回失败检查项数量(最大 125)
使用 exec 工具。流式输出,让用户实时看到旋转进度。
安装内容(安装模式)
- - 通过 NodeSource 安装 Node.js v24+
- UV Python 包管理器(~/.local/bin/uv)
- 在 ~/venv 创建 Python 3.10 虚拟环境,包含 scrapling[fetchers]
- 通过 Playwright 安装 Chromium 浏览器(~/.cache/ms-playwright)
- NPM 全局包:9router、openclaw@latest、clawhub、paperclipai、@presto-ai/google-workspace-mcp、mcporter
- /usr/local/bin 中的系统符号链接
- 通过 systemd 用户服务实现 9router 自启动(回退到 .bashrc 钩子)
- openclaw-gateway-watchdog systemd 用户服务
- Mcporter Google Workspace 连接器
关键路径
| 路径 | 用途 |
|---|
| ~/venv | Python 虚拟环境 |
| ~/.local/bin |
UV 二进制文件 |
| ~/.local/npm/bin | NPM 全局二进制文件 |
| ~/.cache/ms-playwright | Chromium 浏览器 |
| ~/.openclaw/workspace/skills | 工作区技能 |
| ~/.config/systemd/user/9router.service | 9router systemd 单元 |
| ~/.config/systemd/user/openclaw-gateway-watchdog.service | 网关看门狗 |
安装后
如果 .bashrc 被修改,提醒用户重新加载 shell:
bash
source ~/.bashrc
日志和错误
脚本会将完整日志写入 /tmp/boot-YYYYMMDD-HHMMSS.log。如果某个步骤失败,会内联打印最后 15 行输出,并显示日志路径。失败时向用户展示该路径。
检查模式退出码
--check 退出时返回失败检查项的数量(0 = 全部通过,1–125 = N 个问题,上限为 125)。解析退出码并告知用户有多少检查项失败,以及运行 bash {baseDir}/boot.sh 进行修复。
故障排除
- - APT 锁被占用 — 脚本最多等待 120 秒,并自动终止阻塞进程。无需用户操作。
- Node.js 版本错误 — 如果安装的主版本低于 24,脚本会自动升级。
- Python 虚拟环境损坏 — 先运行 --repair,然后无标志运行以重新安装软件包。
- 9router 无法启动 — 日志位于 ~/.local/share/9router.log。如果 systemd 不可用,回退到 .bashrc 登录钩子。
- 网关看门狗无法启动 — 运行 journalctl --user -u openclaw-gateway-watchdog -n 50。
- 文件权限错误 — 无标志运行(安装模式);每次安装/更新结束时都会运行 fixownership。