Why is an OpenClaw Gateway set up with Quick start gone after a reboot, and how do you keep it running?
answer
- who supervises the process?
- Quick start runs in the foreground
- one command installs the service
- LaunchAgent, systemd user unit, Scheduled Task
- status shows install state and health
basics
~20 sQuick start runs the OpenClaw Gateway in the foreground of your terminal, so nothing restarts it after Ctrl+C, a closed terminal or a reboot. Install it as a managed service with openclaw gateway install, or openclaw onboard --install-daemon, then check openclaw gateway status.
solid answer
~50 sQuick start saves the config and then runs the Gateway in that terminal; **Ctrl+C**, closing the terminal or rebooting ends the process, and nothing on the system knows to start it again. The config survives, so the fix is to hand the process to the OS supervisor: `openclaw gateway install` (or `openclaw onboard --install-daemon`, which runs the classic wizard and installs the service in one step). That writes a **LaunchAgent** `ai.openclaw.gateway` on macOS, a **systemd user unit** `openclaw-gateway.service` on Linux and WSL2, or a **Scheduled Task** `OpenClaw Gateway` on native Windows, with a Startup-folder login item as the fallback. Confirm with `openclaw gateway status`, which shows the install state and probes the Gateway. Note that these are per-user services: a macOS LaunchAgent needs the user to be logged in, and a Linux user unit needs lingering to outlive logout.
code
bash · 6 lines# stop the foreground Quick start Gateway with Ctrl+C, then:
openclaw gateway install
openclaw gateway status
# after an npm install, onboarding plus the service in one step:
openclaw onboard --install-daemongo deeper
Remember that Quick start runs the Gateway in your terminal, and that openclaw gateway install or openclaw onboard --install-daemon makes it a background service you check with openclaw gateway status.
Explain which supervisor each platform gets, a LaunchAgent, a systemd user unit or a Scheduled Task with its login-item fallback, and how status, restart and stop --disable behave once it is installed.
Go past the install: per-user services stop without a login session or lingering, competing manual units show up under status --deep, and only a managed service can take automatic updates.
Treat supervision as part of the service level you promise the people who message the bot: decide who owns restarts, logins and power loss on the host before calling it always-on.
## The symptom: it worked once, then vanished A very common first experience with OpenClaw: you run the installer, choose **Quick start**, chat with the assistant in the dashboard, and everything works. The next morning, after a reboot, the dashboard does not load and the phone channels stay silent. Nothing is broken in the config. The **Gateway** (the single long-running process that holds channel connections, sessions and the dashboard) simply is not running, because nobody was ever asked to start it. ## Foreground process against managed service Quick start is designed to get you to a first answer fast. After it verifies the model route and saves the config, it starts the Gateway **in the foreground of the current terminal**. That process lives exactly as long as the terminal session: - **Ctrl+C** stops it (the config stays saved); - closing the terminal window or SSH session ends it; - a reboot ends it, and nothing brings it back. The same is true of `openclaw gateway run`, the explicit foreground command. A foreground Gateway is fine for trying things out and for debugging, but an assistant that should answer at 3 a.m. needs a **supervisor**: the operating system's service manager, which starts the process at login or boot and restarts it when it crashes. ## Installing the service Two commands install the managed service, and both end in the same place: 1. `openclaw gateway install` installs and starts the service for an existing config. `openclaw daemon install` is a legacy alias for the same thing. 2. `openclaw onboard --install-daemon` selects the classic onboarding wizard and installs the service as its daemon step, which is the usual route after an npm install. What gets installed depends on the platform: | Platform | Service | Name | |---|---|---| | macOS | per-user LaunchAgent | `ai.openclaw.gateway` | | Linux and WSL2 | systemd **user** unit | `openclaw-gateway.service` | | Native Windows | Scheduled Task, Startup-folder login item if task creation is denied | `OpenClaw Gateway` | Named profiles get their own service names, so two profiles can run side by side on separate ports. ## Checking that it worked - `openclaw gateway status` shows the service install state (launchd, systemd or schtasks) and probes the Gateway's health; a healthy install reports the Gateway listening on port 18789. - `openclaw gateway status --deep` adds a scan for other gateway-like services on the machine, useful when an old manual unit competes with the managed one. - `openclaw doctor` audits the service definition for drift and can repair it. After the install, use `openclaw gateway restart` for restarts rather than chaining `stop` and `start`, and `openclaw gateway stop` to stop it. On macOS a plain stop unloads the job for the current boot session only; `openclaw gateway stop --disable` also keeps it from respawning across reboots. ## Where per-user services still stop All three services run as **your** user, not as a system service, and that has consequences: - A **macOS LaunchAgent** runs in the logged-in user's session. After a reboot it starts when that user logs in, not at the login window. OpenClaw does not install or manage system LaunchDaemons. - A **Linux systemd user unit** is stopped when the user's session ends unless **lingering** is enabled for that account. Onboarding tries to enable it; on a headless server it is the first thing to check. - The **Windows** fallback login item starts at the user's login; the Scheduled Task stays preferred because it gives better supervisor status. A container install is a different shape again: its lifecycle belongs to the container runtime, which is a hosting decision rather than an onboarding one. ## Why this matters beyond convenience A foreground Gateway also cannot take **automatic updates**: the auto-updater needs a managed service it can hand the update to and restart safely. So installing the service is the step that turns a demo into something you can leave running, and it is the first thing to check when an assistant that "worked yesterday" is silent today.
- On a Mac, the OpenClaw service is installed, but after a power cut the assistant stays silent until someone logs in. Why?OpenClaw installs a per-user LaunchAgent, `ai.openclaw.gateway`, which runs inside the logged-in user's session. After a reboot it starts when that user logs in, not before. OpenClaw does not install or manage system LaunchDaemons, so a Mac host meant to answer unattended needs an automatic login for that user or a supervisor you own.
- What is the difference between `openclaw gateway install` and `openclaw gateway start` when the service seems missing?`install` writes the service definition and starts it, so it is the command for a service that does not exist yet. `start` loads a service that is already installed but not running. `openclaw gateway status --deep` tells you which case you are in, and `openclaw gateway install --force` rewrites an existing definition from the intended installation.
A Quick start Gateway is a market stall you staff yourself: it is open while you stand there and shut the moment you walk away. Installing the service hires a caretaker who reopens the stall every time the market opens, though on some platforms the caretaker only arrives once the owner signs in.
- The Quick start Gateway keeps running after the terminal closes
- A reboot wiped the config, so onboarding has to be rerun
- openclaw gateway run installs a background service
- OpenClaw installs a system-wide LaunchDaemon on macOS by default
- Chaining gateway stop and gateway start is the normal way to restart