#Autostart
1 messages · Page 1 of 1 (latest)
Yep, you can make it auto-start.
First, can you check your version so we don’t send you down the wrong path:
openclaw --version
On Ubuntu, the usual fix is to install the Gateway as a user service:
openclaw gateway install
openclaw gateway status
That sets up a systemd user service so OpenClaw starts automatically instead of needing a terminal window.
If you want it to keep running even after logout, or start on boot for a headless box, also run:
sudo loginctl enable-linger "$(whoami)"
If you’d rather re-run the guided setup, this also does the daemon install step:
openclaw onboard --install-daemon
Docs:
If you paste the output of openclaw --version and openclaw gateway status, I can tell you the exact next step.
Alright, I ran all the commands. Now how to check? Can I close the terminal and see?
Yep, if the service installed properly, you can close the terminal.
Quick check first:
openclaw gateway status
On Ubuntu, this is also useful:
systemctl --user status openclaw-gateway.service
What you want to see is basically running / active.
How to test it:
- Run
openclaw gateway status - Close the terminal
- Reopen a new terminal later and run
openclaw gateway statusagain, or check if your bot/dashboard still responds - Best final test: reboot the PC
One important detail:
- If you enabled
linger, it can start on boot even before login - Without linger, it usually starts when you log into Ubuntu
If you want, paste the output of openclaw gateway status and I’ll confirm whether it’s set up right.
Should I close the terminal now and message my bot?
Yep, exactly, close the terminal and message your bot.
If it still responds, the auto-start/background service is working 🎉
If it does not respond, reopen terminal and check:
openclaw gateway status
openclaw logs --follow
If you want true final confirmation, reboot once and message the bot again after startup.
It went offline after closing the terminal
Ah, got it, that means you were still running the foreground process, and the background service either didn’t install or didn’t start.
Can you paste these 4 outputs:
openclaw --version
openclaw gateway status
systemctl --user status openclaw-gateway.service --no-pager
journalctl --user -u openclaw-gateway.service -n 50 --no-pager
Most likely fix, if the service is missing or inactive:
openclaw gateway install --force
openclaw gateway start
openclaw gateway status
Then close the terminal and test again.
If systemctl says the service doesn’t exist, that’s the clue. If it exists but failed, the journalctl output will tell us why.
openclaw-gateway.service wrakeeb@DESKTOPMRKJH:~$ openclaw gateway status 🦞 OpenClaw 2026.4.21 (f788c88) — Less clicking, more shipping, fewer "where did that file go" moments. Service: systemd (enabled) File logs: /tmp/openclaw/openclaw-2026-04-23.log Command: /usr/bin/node /home/wrakeeb/.npm-global/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: running (pid 720, state active, sub running, last exit 0, reason 0) Warm-up: launch agents can take a few seconds. Try again shortly. Connectivity probe: failed Probe target: ws://127.0.0.1:18789 connect ECONNREFUSED 127.0.0.1:18789 Capability: unknown Gateway port 18789 is not listening (service appears running). Logs: journalctl --user -u openclaw-gateway.service -n 200 --no-pager Restart log: ~/.openclaw/logs/gateway-restart.log Troubles: run openclaw status Troubleshooting: https://docs.openclaw.ai/troubleshooting
Nice, this tells us a lot.
The service is installed, but the actual Gateway is not successfully opening port 18789. So systemd is alive, but OpenClaw itself is not fully starting.
Next step, please run these and paste the output:
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
openclaw doctor
openclaw status
One quick thing you can try first:
openclaw gateway install --force
openclaw gateway restart
openclaw gateway status
If it still says:
Runtime: running- but
Connectivity probe: failed - and
connect ECONNREFUSED 127.0.0.1:18789
then the logs will show the real reason, usually:
- config issue
- startup crash
- missing env/auth
- or a bad install state
Paste the journalctl output next, that’s the key piece now.
I was this
journalctl --user -u openclaw-gateway.service -n 200 --no-pager
openclaw doctor
openclaw status```
The output is so big, can't paste
No worries, just send the important bits, not the whole thing.
Try these smaller ones:
journalctl --user -u openclaw-gateway.service -n 60 --no-pager | tail -40
openclaw doctor | tail -40
openclaw status | tail -40
If that’s still noisy, filter just likely error lines:
journalctl --user -u openclaw-gateway.service --no-pager | grep -iE "error|fail|exception|refused|missing|invalid" | tail -40
Or honestly, a screenshot of the bottom part of the terminal is fine too. I mainly need the last error lines.
which part to send?
Send these parts only:
- The last 30-40 lines from:
journalctl --user -u openclaw-gateway.service -n 60 --no-pager
- From
openclaw doctorandopenclaw status, send only lines that mention:
errorfailedrefusedmissinginvalidwarning
If easier, just take a screenshot of the bottom of the terminal after running those commands. That should be enough.
Looks like Discord ate the paste 😅
Can you resend either:
- a screenshot of the bottom of the terminal, or
- the last 30-40 lines from:
journalctl --user -u openclaw-gateway.service -n 60 --no-pager
That’s the part I need most.
Thanks, that helps.
Those log lines are not the real crash, the newest ones mostly say OpenClaw was still starting up. So I think the service may have been installed while your manual terminal-run was still active.
Try this exact sequence:
openclaw gateway restart
sleep 20
openclaw gateway status
Then check the result:
- If it says
Connectivity probe: ok, you’re good, close terminal and test the bot. - If it still says
connect ECONNREFUSED, then send just the last 20 lines from:
journalctl --user -u openclaw-gateway.service -n 20 --no-pager
The important bit now is the status after a clean restart.