The Recovery Service is Nova’s resilience layer. It is designed to stay alive when all other Nova services are down, providing backup/restore, factory reset, service management, and environment configuration capabilities.
The Recovery Service intentionally has minimal dependencies. It connects directly to PostgreSQL (for backups) and the Docker socket (for container management). It does not depend on Redis, the Orchestrator, or any other Nova service — this ensures it remains operational even during a complete system failure.
Backups are full PostgreSQL dumps stored in the configured backup directory (mounted as a Docker volume at /backups, mapped to ./backups/ on the host).
Docker SDK — uses the Docker SDK for Python to interact with containers via the Docker socket, enabling container inspection, restart, and status checks
Whitelist enforcement — environment variable reads and writes are restricted to a whitelist of known Nova configuration keys; arbitrary env vars cannot be accessed
Secret masking — when reading env vars, sensitive values (API keys, secrets) are masked in the response
Auth — all mutating endpoints require the X-Admin-Secret header; read-only endpoints (service list, backup list) are open
Compose profiles — the service manages Docker Compose profiles for optional services like Cloudflare Tunnel and Tailscale, enabling the Remote Access page in the Dashboard to start/stop these services