Skip to content

Commit e3700dc

Browse files
authored
fix(install): use gateway service instead of foreground run, add completion hints (#1406)
## Summary - **Replace foreground `gateway run` with background service**: Use `openclaw gateway install` + `openclaw gateway start` instead of `exec npx openclaw gateway run`. The gateway now runs as a system background service (launchd/systemd/schtasks), so the install script exits cleanly and Ctrl+C won't kill the gateway. - **Add post-install hints**: Show the user OpenClaw Web UI (`http://localhost:<port>`) and Memory Viewer (`http://localhost:18799`) URLs after installation completes. ## Files changed - `apps/memos-local-openclaw/install.sh` - `apps/memos-local-openclaw/install.ps1` ## Test plan - [ ] Run `bash install.sh --version <version>` — verify script exits after installation - [ ] Verify gateway is running as a background service after script exits - [ ] Verify Web UI and Memory Viewer URLs are displayed at the end - [ ] Ctrl+C during the install process does not leave gateway in a broken state Made with [Cursor](https://cursor.com)
2 parents 825ec0d + f7a35d4 commit e3700dc

File tree

2 files changed

+29
-4
lines changed

2 files changed

+29
-4
lines changed

apps/memos-local-openclaw/install.ps1

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,5 +361,18 @@ if (-not (Test-Path $ExtensionDir)) {
361361

362362
Update-OpenClawConfig -OpenClawHome $OpenClawHome -ConfigPath $OpenClawConfigPath -PluginId $PluginId -InstallPath $ExtensionDir -Spec $PackageSpec
363363

364-
Write-Success "Restarting OpenClaw Gateway..."
365-
& npx openclaw gateway run --port $Port --force
364+
Write-Info "Installing OpenClaw Gateway service..."
365+
& npx openclaw gateway install --port $Port --force 2>&1
366+
if (-not $?) { Write-Warn "Gateway service install returned a warning; continuing..." }
367+
368+
Write-Success "Starting OpenClaw Gateway service..."
369+
& npx openclaw gateway start 2>&1
370+
371+
Write-Host ""
372+
Write-Success "=========================================="
373+
Write-Success " Installation complete!"
374+
Write-Success "=========================================="
375+
Write-Host ""
376+
Write-Info " OpenClaw Web UI: http://localhost:$Port"
377+
Write-Info " Memory Viewer: http://localhost:18799"
378+
Write-Host ""

apps/memos-local-openclaw/install.sh

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -360,5 +360,17 @@ fi
360360

361361
update_openclaw_config
362362

363-
success "Restart OpenClaw Gateway, 重启 OpenClaw Gateway..."
364-
exec npx openclaw gateway run --port "${PORT}" --force
363+
info "Install OpenClaw Gateway service, 安装 OpenClaw Gateway 服务..."
364+
npx openclaw gateway install --port "${PORT}" --force 2>&1 || true
365+
366+
success "Start OpenClaw Gateway service, 启动 OpenClaw Gateway 服务..."
367+
npx openclaw gateway start 2>&1
368+
369+
echo ""
370+
success "=========================================="
371+
success " Installation complete! 安装完成!"
372+
success "=========================================="
373+
echo ""
374+
info " OpenClaw Web UI: http://localhost:${PORT}"
375+
info " Memory Viewer: http://localhost:18799"
376+
echo ""

0 commit comments

Comments
 (0)