Linux Autopilot

Database

PostgreSQL is the persistent source of truth and the initial task queue.

Tables

  • users -- accounts (admin/operator), includes date_format and time_format preferences.
  • sessions -- user sessions.
  • servers -- managed servers, includes metadata JSONB (CPU, RAM, swap, disk, uptime, kernel errors, monitored services, service statuses).
  • agent_enrollments -- one-time enrollment tokens.
  • agent_heartbeats -- heartbeat history with metrics.
  • conversations, messages -- chat history.
  • tasks, task_steps, tool_executions -- task lifecycle and results.
  • approvals -- approval requests for controlled actions.
  • audit_events -- audit trail.

Rules

  • UUID primary keys for business entities.
  • Foreign keys with explicit ON DELETE behaviour; never cascade-delete audit history.
  • Index foreign keys and status/time lookups.
  • Transactions for task creation, approval, claim and completion.
  • Row-level locking (FOR UPDATE SKIP LOCKED) when claiming tasks.
  • No secrets in JSONB, logs or model context.