diff --git a/deploy/fleetd.service b/deploy/fleetd.service index 38e42ef..92f2de5 100644 --- a/deploy/fleetd.service +++ b/deploy/fleetd.service @@ -12,8 +12,16 @@ # # edit WorkingDirectory / ExecStart below for your host's paths and java location # systemctl --user daemon-reload # systemctl --user enable --now herdr fleetd +# loginctl enable-linger $USER # REQUIRED -- see below # journalctl --user -u fleetd -f # +# `loginctl enable-linger` is not optional and is easy to miss, because leaving it out looks like +# success: `systemctl --user enable` reports "enabled" and both units run for as long as you stay +# logged in. A user manager without lingering starts at your first login and stops at your last +# logout, so the fleet simply does not come back after a reboot -- which is the whole reason to +# use systemd here rather than the setsid scripts these units replaced. Check it with +# `loginctl show-user $USER -p Linger`; the answer must be `Linger=yes`. +# # Secrets (AI_GATEWAY_TOKEN, WORKER_GITEA_TOKEN, LAVINMQ_URI, COORD_AMQP_URI, ...) are not set # here and need no systemd drop-in: ExecStart runs a login shell, so they come from wherever your # login shell already sources them (this host: ~/.fleet/secrets.sh via ~/.zprofile). If a token is