#Openclaw dead - not started

1 messages · Page 1 of 1 (latest)

proven tulipBOT
#

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

slender hound
#

13:13:13 [gateway] signal SIGTERM received
13:13:13 [gateway] received SIGTERM; shutting down

daring pivotBOT
#

That output is basically two separate issues:

  1. openclaw gateway restart says “Gateway service disabled”
    That means you never installed the managed service (systemd/launchd). restart can only restart something that’s installed.

  2. systemctl --user … fails because you don’t have a user systemd session bus
    That’s why you see: $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined. This often happens if you’re:

  • in a root shell / did su to the user (env not set), or
  • on a minimal/container-like system without a real user session, or
  • you logged out and the user service stopped (no “linger”).

Fix (normal Debian VPS with systemd)

Log in as the same user that should run OpenClaw (e.g. luna) in a normal SSH session (not su), then run:

openclaw gateway install
#
sudo loginctl enable-linger luna
systemctl --user enable --now openclaw-gateway.service
openclaw gateway status
openclaw logs --follow

The “linger” part is explicitly recommended in the Gateway runbook for Linux user services: https://docs.openclaw.ai/gateway (Linux systemd user tab)

Quick checks (so we know which case you’re in)

Please paste the output of these:

ps -p 1 -o comm=
echo "$XDG_RUNTIME_DIR"
id
#
  • If ps -p 1 is not systemd, you’re likely in a container / no systemd → systemctl --user won’t work, and you should either run openclaw gateway in the foreground (tmux/screen) or set up a system service instead (see https://docs.openclaw.ai/platforms/linux and https://docs.openclaw.ai/gateway).
  • If XDG_RUNTIME_DIR is empty, you’re not in a proper user session → usually fixed by re-SSH as the user (don’t su) and/or enabling linger.

Docs that match your situation:

#

That log line:

[gateway] signal SIGTERM received … shutting down

means the Gateway didn’t “crash” — it was told to stop (most commonly: you started it in an SSH session and then disconnected / logged out, or the user-session manager stopped and systemd sent SIGTERM).

Get it running again (right now)

Run it in the foreground again:

openclaw gateway --verbose

If you want it to keep running even when you disconnect, put it in tmux/screen or install the systemd service (recommended).

#

Proper fix (keep it running after logout): install service + enable lingering

On Linux, OpenClaw expects a systemd user service by default + “linger” for persistence after logout (docs): https://docs.openclaw.ai/gateway

Run:

openclaw gateway install
sudo loginctl enable-linger luna
systemctl --user enable --now openclaw-gateway.service
openclaw gateway status

Why systemctl --user is failing for you

This error:

$DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined

#

means you’re not in a real systemd user session (common if you used su/sudo su, or you’re in a container/minimal environment).

Please paste these 3 outputs and I’ll tell you which path you’re on:

ps -p 1 -o comm=
echo "$XDG_RUNTIME_DIR"
ls -la /run/user/$(id -u) 2>/dev/null || true
  • If PID 1 is not systemd, you can’t use systemctl --user (container) → use tmux or set up a system service instead.
  • If /run/user/<uid> doesn’t exist, log in as luna via normal SSH (not su) and try again; on very minimal Debian installs you may need PAM/systemd user-session packages enabled.
slender hound
#

ça marche pas :

luna@openclaw:~$ openclaw gateway install

:lobster: OpenClaw 2026.3.7 (42a1394) — Your personal assistant, minus the passive-aggressive calendar reminders.

Gateway install failed: Error: systemctl daemon-reload failed: Failed to connect to system scope bus via machine transport: Permission denied
Reload daemon failed: Noeud final de transport n'est pas connecté
daring pivotBOT
#

OK, lĂ  on voit mieux ce qui se passe.

Ce que disent tes erreurs

  • systemctl --user … $DBUS_SESSION_BUS_ADDRESS and $XDG_RUNTIME_DIR not defined
    → tu n’es pas dans une session “user systemd” (typiquement quand tu es dans un shell obtenu via su, sudo -u, ou SSH sans PAM), donc systemctl --user ne peut pas parler au bus.

  • openclaw gateway install … systemctl daemon-reload … Permission denied
    → l’install essaye de faire un daemon-reload côté system (pas --user), et sans sudo/polkit ça échoue. Souvent ça arrive justement quand le mode user service n’est pas possible → il “tombe” sur une tentative côté system.

1) Diagnostic rapide (copie/colle les outputs)

Sur la machine, en tant que luna, colle-moi :

ps -p 1 -o comm=
echo "XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR"
echo "DBUS_SESSION_BUS_ADDRESS=$DBUS_SESSION_BUS_ADDRESS"
#
ls -la /run/user/$(id -u)/bus 2>/dev/null || echo "no user bus"

Ça va dire tout de suite si tu es sur une vraie Debian avec systemd (PID1 = systemd) et si le bus user existe.

2) Fix le plus courant (VPS Debian “normal”)

Si ps -p 1 renvoie systemd :

  1. Reconnecte-toi en SSH directement sur l’utilisateur luna (important)
    Ne fais pas su luna depuis root, et ne lance pas OpenClaw via sudo -u luna ….

  2. Vérifie que tu as bien XDG_RUNTIME_DIR=/run/user/<uid> après reconnexion.

  3. Ensuite seulement :

#
openclaw gateway install
sudo loginctl enable-linger luna
systemctl --user enable --now openclaw-gateway.service

Le “linger” est la partie qui évite que ça s’arrête après ~15 min / logout (cf runbook): https://docs.openclaw.ai/gateway

3) Si tu es dans un conteneur / pas de systemd user bus

Si PID1 n’est pas systemd (ou si /run/user/<uid>/bus n’existe jamais), alors systemctl --user ne marchera pas.

Dans ce cas, pour que ça reste lancé après déconnexion, fais simple :

Option A (recommandée): tmux

sudo apt-get update && sudo apt-get install -y tmux