From 1f7dbb6a48a47305866b26244017b79346a61782 Mon Sep 17 00:00:00 2001 From: Azade Date: Thu, 8 Jan 2026 11:20:05 +0000 Subject: [PATCH 1/3] fix(daemon): align systemd unit with documentation Align generated systemd service file with docs: https://docs.clawd.bot/gateway#supervision-systemd-user-unit Adds: - After=network-online.target - Wants=network-online.target - RestartSec=5 --- src/daemon/systemd.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/daemon/systemd.ts b/src/daemon/systemd.ts index c0a8b495b..2b659ec77 100644 --- a/src/daemon/systemd.ts +++ b/src/daemon/systemd.ts @@ -141,10 +141,13 @@ function buildSystemdUnit({ return [ "[Unit]", "Description=Clawdbot Gateway", + "After=network-online.target", + "Wants=network-online.target", "", "[Service]", `ExecStart=${execStart}`, "Restart=always", + "RestartSec=5", workingDirLine, ...envLines, "", From 3a8d8bc6a48e2d726352e12774ba75440779b2ce Mon Sep 17 00:00:00 2001 From: Azade Date: Thu, 8 Jan 2026 11:20:05 +0000 Subject: [PATCH 2/3] fix(daemon): align systemd unit with documentation Align generated systemd service file with docs: https://docs.clawd.bot/gateway#supervision-systemd-user-unit Adds: - After=network-online.target - Wants=network-online.target - RestartSec=5 --- src/daemon/systemd.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/daemon/systemd.ts b/src/daemon/systemd.ts index c0a8b495b..2b659ec77 100644 --- a/src/daemon/systemd.ts +++ b/src/daemon/systemd.ts @@ -141,10 +141,13 @@ function buildSystemdUnit({ return [ "[Unit]", "Description=Clawdbot Gateway", + "After=network-online.target", + "Wants=network-online.target", "", "[Service]", `ExecStart=${execStart}`, "Restart=always", + "RestartSec=5", workingDirLine, ...envLines, "", From 9632ebed7b81b7ea258b1aa0542c8b0ad8d016fd Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 8 Jan 2026 21:16:06 +0100 Subject: [PATCH 3/3] docs: note systemd unit alignment (#479) - thanks @azade-c --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cf3c15bc..1c87f3113 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Unreleased +- Daemon: align generated systemd unit with docs for network-online + restart delay. (#479) — thanks @azade-c - Outbound: default Telegram account selection for config-only tokens; remove heartbeat-specific accountId handling. (follow-up #516) — thanks @YuriNachos - Heartbeat: resolve Telegram account IDs from config-only tokens; cron tool accepts canonical `jobId` and legacy `id` for job actions. (#516) — thanks @YuriNachos - Discord: stop provider when gateway reconnects are exhausted and surface errors. (#514) — thanks @joshp123