#help

24 messages · Page 1 of 1 (latest)

summer stag
#

openclaw gateway restart

OpenClaw 2026.4.12 (1c0672b)
Your terminal just grew claws—type something and let the bot pinch the busywork.

Gateway restart failed: Error: systemctl restart failed: Job for openclaw-gateway.service failed.
See "systemctl --user status openclaw-gateway.service" and "journalctl --user -xeu openclaw-gateway.service" for details.
Tip: openclaw gateway install
Tip: openclaw gateway
Tip: systemctl --user start openclaw-gateway.service
root@openclaw:~#

balmy crescentBOT
thorn crystalBOT
#

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

upper mulchBOT
#

2026.4.12 noted.

That message only says the user systemd unit restarted and then crashed again. The next step is logs, not reinstall.

Please paste these:

openclaw status --all
openclaw gateway status
openclaw doctor --non-interactive
journalctl --user -u openclaw-gateway.service -n 100 --no-pager

Most common causes here are:

  • invalid config, so the gateway refuses to start
  • port conflict
summer stag
#

🦞 OpenClaw 2026.4.12 (1c0672b)
I'm not magic—I'm just extremely persistent with retries and coping strategies.

│
â—‡
18:06:30 [gateway] loading configuration…
18:06:30 [gateway] resolving authentication…
18:06:30 [gateway] starting...
18:06:33 [gateway] starting HTTP server...
18:06:33 [canvas] host mounted at http://127.0.0.1:18789/__openclaw__/canvas/ (root /root/.openclaw/canvas)
18:06:33 [health-monitor] started (interval: 300s, startup-grace: 60s, channel-connect-grace: 120s)
18:06:33 [gateway] agent model: openai-codex/gpt-5.4
18:06:33 [gateway] ready (7 plugins: acpx, browser, device-pair, discord, phone-control, talk-voice, telegram; 3.3s)
18:06:33 [gateway] log file: /tmp/openclaw/openclaw-2026-04-13.log
18:06:33 [gateway] security warning: dangerous config flags enabled: gateway.controlUi.allowInsecureAuth=true. Run openclaw security audit.
18:06:33 [gateway] starting channels and sidecars...
18:06:34 [hooks] loaded 4 internal hook handlers
18:06:40 [telegram] fetch fallback: enabling sticky IPv4-only dispatcher (codes=ETIMEDOUT,ENETUNREACH)
18:06:40 [bonjour] watchdog detected non-announced service; attempting re-advertise (gateway fqdn=openclaw._openclaw-gw._tcp.local. host=openclaw.local. port=18789 state=probing)
18:06:42 [plugins] embedded acpx runtime backend registered (cwd: /root/.openclaw/workspace)
18:06:42 [browser/server] Browser control listening on http://127.0.0.1:18791/ (auth=token)
18:06:43 [heartbeat] started
18:06:43 [plugins] embedded acpx runtime backend ready
18:06:43 [ws] webchat connected conn=2fd31875-9e4f-4b5a-99e9-f1f3a15c39e8 remote=127.0.0.1 client=openclaw-control-ui webchat v2026.4.12
18:06:43 [telegram] [default] starting provider (@claw_louis_bot)
18:06:44 [ws] ⇄ res ✓ commands.list 353ms conn=2fd31875…39e8 id=4425c902…3bd4
18:06:44 [telegram] menu text exceeded the conservative 5700-character payload budget; shortening descriptions to keep 55 commands visible.

upper mulchBOT
#

This is actually useful, and a bit encouraging: the gateway itself boots fine. Your pasted log looks like a successful foreground openclaw gateway start, so this is probably not a basic config-parse failure.

That usually narrows it to one of these:

  1. CLI config and systemd service config differ
  2. The systemd unit points at stale install metadata/path
  3. The service starts, then crashes later, after the “ready” line

Next check:

openclaw gateway status --deep
systemctl --user status openclaw-gateway.service --no-pager
journalctl --user -u openclaw-gateway.service -n 200 --no-pager

Big one to watch for in openclaw gateway status --deep:

#
  • if it shows Config (cli) and Config (service) are different, the fix is usually:
openclaw gateway install --force
openclaw gateway restart

Run that from the same profile / same environment you want the service to use.

So, short version: manual start looks good, service wiring still looks suspicious. Paste the status --deep output and I can probably tell you which side it is.

summer stag
#

openclaw gateway status --deep
systemctl --user status openclaw-gateway.service --no-pager
journalctl --user -u openclaw-gateway.service -n 200 --no-pager

🦞 OpenClaw 2026.4.12 (1c0672b)
Built by lobsters, for humans. Don't question the hierarchy.

│
â—‡
Service: systemd (enabled)
File logs: /tmp/openclaw/openclaw-2026-04-13.log
Command: /usr/bin/node /usr/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Service env: OPENCLAW_GATEWAY_PORT=18789

Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.

Runtime: stopped (state failed, sub failed, last exit 1, reason 1)
RPC probe: failed
RPC target: ws://127.0.0.1:18789
gateway closed (1006):

Service is loaded but not running (likely exited immediately).
File logs: /tmp/openclaw/openclaw-2026-04-13.log
Logs: journalctl --user -u openclaw-gateway.service -n 200 --no-pager

Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting
Ă— openclaw-gateway.service - OpenClaw Gateway (v2026.4.12)
Loaded: loaded (/root/.config/systemd/user/openclaw-gateway.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Mon 2026-04-13 18:08:26 UTC; 35s ago
Duration: 7.157s
Process: 15257 ExecStart=/usr/bin/node /usr/lib/node_modules/openclaw/dist/index.js gateway --port 18789 (code=exited, status=1/FAILURE)
Main PID: 15257 (code=exited, status=1/FAILURE)
CPU: 9.007s

upper mulchBOT
#

Nice, that rules out the big obvious one: CLI config and service config match. So this is not a profile/path mismatch.

Also, the service lives for ~7 seconds, which means it is starting and then dying after boot. The missing piece is the actual exception at the bottom of the log.

What you pasted is the status summary, but not the real journal lines yet. Please paste:

journalctl --user -u openclaw-gateway.service -n 120 --no-pager -o cat
tail -n 120 /tmp/openclaw/openclaw-2026-04-13.log

I want the last lines after the “ready” line, because that’s almost certainly where the crash reason is.

So far we’ve narrowed it down to:

  • not a missing unit
  • not a config path mismatch
  • not a basic startup failure
#
  • likely a post-start crash in a plugin/sidecar/runtime task

Don’t reinstall yet, we’re close.

summer stag
#

journalctl --user -u openclaw-gateway.service -n 120 --no-pager -o cat
tail -n 120 /tmp/openclaw/openclaw-2026-04-13.log
2026-04-13T18:06:30.739+00:00 [gateway] starting...
2026-04-13T18:06:33.200+00:00 [secrets] [SECRETS_RELOADER_DEGRADED] SecretRefResolutionError: Environment variable "DISCORD_BOT_TOKEN" is missing or empty.
2026-04-13T18:06:33.202+00:00 Gateway failed to start: Error: Startup failed: required secrets are unavailable. SecretRefResolutionError: Environment variable "DISCORD_BOT_TOKEN" is missing or empty.
openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
openclaw-gateway.service: Failed with result 'exit-code'.
openclaw-gateway.service: Consumed 8.422s CPU time.
openclaw-gateway.service: Scheduled restart job, re

upper mulchBOT
#

Nice, we found it.

Root cause: your service is configured to read Discord auth from the env var DISCORD_BOT_TOKEN, but the systemd user service does not have that env var.

That’s why the service dies with:

  • required secrets are unavailable
  • Environment variable "DISCORD_BOT_TOKEN" is missing or empty

Best fix on a VPS

Put the token in ~/.openclaw/.env on the gateway host, then restart.

mkdir -p ~/.openclaw
chmod 700 ~/.openclaw
printf 'DISCORD_BOT_TOKEN=YOUR_TOKEN_HERE\n' >> ~/.openclaw/.env
#
chmod 600 ~/.openclaw/.env
openclaw gateway restart
openclaw gateway status

Do not paste the token here.

If you do not actually need Discord on this box

Disable the Discord channel and restart:

openclaw config set channels.discord.enabled false --strict-json
openclaw gateway restart

Alternate fix

#

Enable shell env import, but I’d usually prefer .env for a service:

{
  env: {
    shellEnv: {
      enabled: true,
      timeoutMs: 15000,
    },
  },
}

Then restart.

Docs:

summer stag
#

Mijn Claw zegt dit in Discord dm:
Kan nu niet veilig geven, de gateway is nog alleen op loopback gebonden.

Kort:
huidige status: Gateway is only bound to loopback
dus een telefoon/app kan er niet bij voor pairing

Fix eerst één route:
zelfde wifi: openclaw config set gateway.bind lan
via Tailscale: Tailscale/serve inschakelen
publiek URL: plugins.entries.device-pair.config.publicUrl instellen

Daarna:
gateway herstarten
nieuwe code genereren met openclaw qr --json

Als je wil, fix ik dit meteen met je.

upper mulchBOT
#

Ja, dat klopt.

Je gateway staat nu op loopback only (127.0.0.1), dus een telefoon kan die pairing-URL niet bereiken.
Voor een VPS zou ik niet gateway.bind lan aanraden, tenzij dit echt een private LAN is.

Mijn aanrader voor jouw setup: Tailscale Serve

curl -fsSL https://tailscale.com/install.sh | sh
tailscale up
openclaw config set gateway.tailscale.mode serve
openclaw gateway restart
openclaw qr --remote --json

Daarna:

#
openclaw devices list
openclaw devices approve <requestId>

Andere opties

  • Zelfde wifi / private LAN
    openclaw config set gateway.bind lan
    openclaw gateway restart
    openclaw qr --json
    
  • Publieke URL / reverse proxy
    gebruik een wss:// URL en zet die in je remote/public pairing config, daarna opnieuw openclaw qr.

Belangrijke nuance

  • SSH tunnel is prima voor je dashboard op laptop
summer stag
#

To authenticate, visit:

    https://login.tailscale.com/a/ca1581701e7e4

Success.

🦞 OpenClaw 2026.4.12 (1c0672b)
I'll do the boring stuff while you dramatically stare at the logs like it's cinema.

Error: Config validation failed: gateway.bind: gateway.bind must resolve to loopback when gateway.tailscale.mode=serve (use gateway.bind="loopback" or gateway.bind="custom" with gateway.customBindHost="127.0.0.1")

🦞 OpenClaw 2026.4.12 (1c0672b)
Running on your hardware, reading your logs, judging nothing (mostly).

Restarted systemd service: openclaw-gateway.service
Error: qr --remote requires gateway.remote.url (or gateway.tailscale.mode=serve/funnel).

upper mulchBOT
#

Yep, dat is gewoon een config-conflict.

Tailscale Serve vereist gateway.bind=loopback.
Je hebt dus nog ergens lan of tailnet staan.

Doe dit in deze volgorde:

openclaw config set gateway.bind loopback
openclaw config set gateway.tailscale.mode serve
openclaw gateway restart
openclaw qr --remote --json

Eventueel eerst even checken:

#
openclaw config get gateway.bind
openclaw config get gateway.tailscale.mode

Waarom qr --remote nog faalde:

  • die eerdere serve-config werd niet geldig opgeslagen / niet actief, omdat validatie stukliep
  • daardoor zag openclaw qr --remote nog steeds geen bruikbare remote route

Belangrijk detail uit de docs: voor mobile pairing via Tailscale/public wil je Serve/Funnel (https / wss), niet een kale ws://<tailscale-ip>:18789 route.

Als dit lukt, daarna nog:

openclaw devices list
openclaw devices approve <requestId>