1.3 KiB
1.3 KiB
Managing archied with Systemd User Services
This runbook describes how to manage archied as a background user service on Linux servers.
1. Unit File (~/.config/systemd/user/archied.service)
Create the systemd user service file at ~/.config/systemd/user/archied.service:
[Unit]
Description=Archie Core Orchestrator Daemon
After=network.target
[Service]
Type=simple
ExecStart=%h/.local/bin/archied -config %h/.config/archie/config.toml
EnvironmentFile=-%h/.config/archie/env
Restart=on-failure
RestartSec=5s
[Install]
WantedBy=default.target
2. Enabling User Linger (loginctl)
By default, systemd terminates user services when you log out of SSH. Enabling linger allows your archied service to run continuously 24/7 across reboots and logouts:
loginctl enable-linger "$USER"
Verify linger status:
loginctl show-user "$USER" | grep Linger
# Output: Linger=yes
3. Service Commands
Reload systemd daemon files:
systemctl --user daemon-reload
Enable and start the service immediately:
systemctl --user enable --now archied
Check service status:
systemctl --user status archied
Tail live daemon logs:
journalctl --user -u archied -f
Restart or stop the service:
systemctl --user restart archied
systemctl --user stop archied