#OpenClaw global systemd service crashing with "Missing config" on minimal VPS (Ubuntu 24.04)

1 messages · Page 1 of 1 (latest)

signal tangle
#

Environment:

OS: Ubuntu 24.04 LTS (Hostinger VPS)

The Problem:
I am trying to run OpenClaw as a persistent background service. The built-in user-level openclaw daemon fails due to systemctl --user bus issues typical of this minimal VPS environment (systemctl is-enabled unavailable).

To bypass the broken user-level manager, I created a global systemd service to run the process as my user. The service executes, but it instantly enters a crash loop, throwing a Missing config error. The openclaw.json config file definitely exists in /home/user/.openclaw/.
The Error Log (journalctl -u openclaw -n 10):
openclaw[11892]: 2026-03-04T20:13:38.999+00:00 Missing config. Run openclaw setup or set gateway.mode=local (or pass --allow-unconfigured).
systemd[1]: openclaw.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: openclaw.service: Failed with result 'exit-code'.

when i try to run the Install Gateway service and Gateway service runtime i keep getting this error:
Error: systemctl is-enabled unavailable: Command failed: systemctl --user is-enabled openclaw-gateway.service
please halp me solve this proplem, i reset everything and reinstalled the VPS OS but the error keep repeating,

jade berryBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

shut slateBOT
#

You’re hitting two separate things:

1) systemctl --user … is-enabled unavailable

openclaw gateway install installs a systemd user service and checks it with systemctl --user …. On minimal VPS setups, the user systemd bus isn’t available unless you have lingering / a user session bus.

Two options:

Option A (recommended on VPS): use a system service instead

Don’t use openclaw gateway install at all. Create a normal /etc/systemd/system/... unit (example below).

Option B: make user systemd work

Try:

sudo loginctl enable-linger $USER
# log out and back in (or reboot)
#
systemctl --user status

If systemctl --user status still can’t connect to the bus, you’re back to Option A.

Docs: https://docs.openclaw.ai/gateway (Linux systemd user + lingering)


2) Gateway crash loop: Missing config … set gateway.mode=local

This message is not saying “the file doesn’t exist”, it’s saying:

the Gateway refuses to start unless gateway.mode = "local" is set in config
(guardrail)

So make sure your config contains:

#
{
  gateway: {
    mode: "local",
  },
}

Quick way:

openclaw config set gateway.mode local
openclaw config validate
openclaw config get gateway.mode

Docs: https://docs.openclaw.ai/cli/gateway (mentions the gateway.mode=local requirement)

#

A working systemd system unit (VPS-safe)

Create:

/etc/systemd/system/openclaw-gateway.service

[Unit]
Description=OpenClaw Gateway
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
User=<YOUR_USER>
#
Environment=OPENCLAW_HOME=/home/<YOUR_USER>
Environment=OPENCLAW_CONFIG_PATH=/home/<YOUR_USER>/.openclaw/openclaw.json
Environment=OPENCLAW_NO_RESPAWN=1
ExecStart=/usr/local/bin/openclaw gateway --port 18789
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

Important notes:

  • Don’t use ~ in systemd unit env vars (systemd won’t expand it).
  • Make sure ExecStart matches which openclaw for that user.

Then: