# Spectra as a systemd user service (spec ยง22.3): agents reconnect to it as # they start, so it should outlive any one terminal. # # cp packaging/spectra.service ~/.config/systemd/user/ # (on another machine: make install-server HOST=user@host) # systemctl --user daemon-reload && systemctl --user enable --now spectra # journalctl --user -u spectra -f [Unit] Description=Spectra, the control plane for AI coding agents After=default.target network-online.target # Until `spectra init` (or `spectra init --owner KEYID` on a server) makes # a Spectra, the enabled service waits instead of failing in a loop. ConditionPathExists=%h/.local/share/spectra/spectra.db [Service] ExecStart=%h/.local/bin/spectra serve Restart=on-failure RestartSec=2 # SIGTERM writes a checkpoint and stops within five seconds. KillSignal=SIGTERM TimeoutStopSec=15 Environment=SPECTRA_LOG=info [Install] WantedBy=default.target