diff --git a/src/nemoclaw.ts b/src/nemoclaw.ts index dbf93b62782..657556c5ba5 100644 --- a/src/nemoclaw.ts +++ b/src/nemoclaw.ts @@ -843,8 +843,19 @@ async function deploy(instanceName) { async function start() { const { startAll } = require("./lib/services"); + + // Recover gateway and port forwarding for the default sandbox before + // starting host-side services (cloudflared). After a system reboot the + // OpenClaw gateway inside the sandbox and the dashboard port forward are + // lost — checkAndRecoverSandboxProcesses re-establishes both. + const sandboxes = registry.listSandboxes(); + const defaultSandbox = sandboxes.defaultSandbox; + if (defaultSandbox) { + checkAndRecoverSandboxProcesses(defaultSandbox); + } + await runStartCommand({ - listSandboxes: () => registry.listSandboxes(), + listSandboxes: () => sandboxes, startAll, }); } @@ -1486,7 +1497,7 @@ function help() { nemoclaw deploy Deprecated Brev-specific bootstrap path ${G}Services:${R} - nemoclaw start Start auxiliary services ${D}(Telegram, tunnel)${R} + nemoclaw start Start services ${D}(gateway, port fwd, tunnel)${R} nemoclaw stop Stop all services nemoclaw status Show sandbox list and service status diff --git a/test/cli.test.ts b/test/cli.test.ts index 6e28cc4dca9..4c0a4a30c0c 100644 --- a/test/cli.test.ts +++ b/test/cli.test.ts @@ -43,6 +43,12 @@ describe("CLI dispatch", () => { expect(r.out.includes("Compatibility Commands")).toBeTruthy(); }); + it("help mentions gateway in start description", () => { + const r = run("help"); + expect(r.code).toBe(0); + expect(r.out.includes("gateway")).toBeTruthy(); + }); + it("--help exits 0", () => { expect(run("--help").code).toBe(0); });