Skip to content

How It Works

Alta VMS is a control plane on top of Cesbo Alta. Alta ingests and serves the camera streams; Alta VMS manages cameras, users, recordings, and alerts, and proxies video to the browser.

The server is one Go binary with the Vue 3 web UI and the SQLite database engine embedded. The UI is baked in at compile time via //go:embed, so there is nothing else to install — no Node.js, no separate web server, no external database. State lives in a single SQLite file (WAL mode); schema migrations run automatically on startup.

Alta VMS talks to each Alta server over REST for camera CRUD and status, and brokers video for the browser:

sequenceDiagram
    participant B as Browser
    participant V as Alta VMS
    participant A as Cesbo Alta
    B->>V: Open camera
    V->>A: Negotiate stream (signed token)
    B-->>A: WHEP (WebRTC) — low latency
    Note over B,A: falls back to HLS if WebRTC fails
    A-->>B: Live video

Every outbound Alta call is wrapped with retries, a circuit breaker, and a bulkhead limiting concurrency. If an Alta server becomes unreachable, Alta VMS sheds load for that server only and keeps serving the rest — a degraded Alta never takes down the process.

A brief connectivity blip or a fast Alta restart is told apart from a sustained outage: Alta VMS corroborates a suspected failure over two consecutive checks — and, for a restart, against Alta’s reported instance ID and uptime — before taking cameras offline. Blips don’t flap cameras, genuine outages are caught within a few seconds, and a server that flaps repeatedly is reported as down once instead of as a storm of events.

Playback uses WHEP (WebRTC) first for low latency, falling back to HLS automatically. Stream access is authorized with short-lived HS256 JWTs signed per Alta server, so playlist and WebRTC requests can’t be replayed indefinitely.

Work that shouldn’t block requests runs in workers, each of which degrades independently: health_server (Alta server status and config-drift detection, on independent cadences), health_camera (camera status), alta_prober (fast Alta availability and restart probing), motion (motion events), clips (ffmpeg export), screenshots, alerts, notifications, io (camera IO triggers), reconcile (hourly cleanup of orphaned Alta-side resources), and cleanup (retention). The enabled set is configurable. Detection ingest is not a worker — recognition events arrive over an authenticated API endpoint. Alert and notification delivery is durable: pending deliveries are persisted and retried with backoff, and survive a restart.

The reconcile worker only ever deletes a resource it can prove Alta VMS created — an ownership record written at creation time, not a guess from the resource’s name — so two installations sharing one Alta server can never delete each other’s resources. See Connect an Alta Server for the operator-facing view.

  • Authentication with JWT sessions; passwords hashed with Argon2id.
  • Role-based access control — global admin plus per-group operator/viewer.
  • Encryption at rest (AES-256-GCM) for sensitive fields such as Alta credentials, with key rotation support.
  • Hardening — strict CSP and HSTS in production, per-user rate limiting, and a dedicated non-login system user when installed as a service.

The server exposes /healthz, /readyz, and Prometheus /metrics, emits structured JSON logs, and propagates an X-Request-ID across every request and outbound Alta call for end-to-end tracing.