OXYGENHUB
◆ main spectra / packaging / spectra.service
914 B · last changed Run the daemon on Earth: make install-server, a unit that waits for a Spectra (#25) 1 day ago source blame history raw
1
# Spectra as a systemd user service (spec §22.3): agents reconnect to it as
2
# they start, so it should outlive any one terminal.
3
#
4
#   cp packaging/spectra.service ~/.config/systemd/user/
5
#   (on another machine: make install-server HOST=user@host)
6
#   systemctl --user daemon-reload && systemctl --user enable --now spectra
7
#   journalctl --user -u spectra -f
8
[Unit]
9
Description=Spectra, the control plane for AI coding agents
10
After=default.target network-online.target
11
# Until `spectra init` (or `spectra init --owner KEYID` on a server) makes
12
# a Spectra, the enabled service waits instead of failing in a loop.
13
ConditionPathExists=%h/.local/share/spectra/spectra.db
14
15
[Service]
16
ExecStart=%h/.local/bin/spectra serve
17
Restart=on-failure
18
RestartSec=2
19
# SIGTERM writes a checkpoint and stops within five seconds.
20
KillSignal=SIGTERM
21
TimeoutStopSec=15
22
Environment=SPECTRA_LOG=info
23
24
[Install]
25
WantedBy=default.target