[Unit]
Description=HiveRelay Observatory — fleet-wide topology + state poller
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
WorkingDirectory=/root/hiverelay-observatory
ExecStart=/usr/bin/node server.js
Restart=always
RestartSec=10
KillSignal=SIGTERM
TimeoutStopSec=10
Environment=NODE_ENV=production
Environment=OBSERVATORY_PORT=9200
Environment=OBSERVATORY_POLL_MS=10000
StandardOutput=append:/var/log/hiverelay-observatory.log
StandardError=append:/var/log/hiverelay-observatory.log
# Hardening
NoNewPrivileges=true
ProtectSystem=strict
ReadWritePaths=/var/log/hiverelay-observatory.log
[Install]
WantedBy=multi-user.target