Skip to content

Configuration Reference

All keys are shown with their defaults. Each option can be set in config.yaml or via the listed environment variable, which takes precedence.

KeyEnv varDefaultDescription
http.addrALTAVMS_HTTP_ADDR:3303Listen address and port
http.read_timeoutALTAVMS_HTTP_READ_TIMEOUT15sMax time to read a full request
http.write_timeoutALTAVMS_HTTP_WRITE_TIMEOUT30sMax time to write a response
http.idle_timeoutALTAVMS_HTTP_IDLE_TIMEOUT60sKeep-alive idle timeout
http.shutdown_graceALTAVMS_HTTP_SHUTDOWN_GRACE10sGrace period for in-flight requests on shutdown
http.pre_drain_delayALTAVMS_HTTP_PREDRAIN_DELAY5sDelay after /readyz starts failing before shutdown (for load balancers)
http.tls_enabledALTAVMS_HTTP_TLS_ENABLEDfalseSet true when fronted by TLS; enables HSTS in production
http.allowed_originsALTAVMS_ALLOWED_ORIGINS["http://localhost:3303"]CORS allow-list. Production rejects */empty
http.internal_addrALTAVMS_HTTP_INTERNAL_ADDR(empty)Separate listener for /healthz, /readyz, /metrics
KeyEnv varDefaultDescription
db.pathALTAVMS_DB_PATH./data/altavms.dbSQLite file path (parent dir must exist)
db.connect_timeoutALTAVMS_DB_CONNECT_TIMEOUT5sConnection open timeout
db.query_timeoutALTAVMS_DB_QUERY_TIMEOUT30sSingle-query timeout
KeyEnv varDefaultDescription
log.levelALTAVMS_LOG_LEVELinfodebug | info | warn | error
log.formatALTAVMS_LOG_FORMATjsonjson (production) | text (development)
KeyEnv varDefaultDescription
auth.jwt_secretALTAVMS_AUTH_JWT_SECRET(empty)JWT signing secret. Required in staging/production
crypto.encryption_keysALTAVMS_ENCRYPTION_KEY, _V2, _V3, …[]Base64 AES-256-GCM keys for encrypted DB fields. First key is active; older keys decrypt during rotation. Required in production

Generate a key with openssl rand -base64 32.

The first admin user is seeded on first start.

Env varDefaultDescription
ADMIN_BOOTSTRAP_EMAILadmin@localhost (dev)Initial admin email. Required in production
ADMIN_BOOTSTRAP_PASSWORDadmin (dev)Initial admin password. Required in production

Alta server connection details live in the database and are managed in the UI. These tune the shared client.

KeyDefaultDescription
alta.default_timeout10sPer-attempt timeout for CRUD calls
alta.long_timeout30sPer-attempt timeout for Preview/VOD calls
alta.breaker_threshold5Consecutive failures before the circuit breaker opens
alta.breaker_open_for30sHow long the breaker stays open
alta.bulkhead_capacity64Max concurrent in-flight Alta calls
alta.stream.hls_token_ttl5mTTL for HLS playlist tokens (≤ 1h)
alta.stream.webrtc_token_ttl2mTTL for WHEP bearer tokens (≤ 1h)
alta.stream.auth_modejwtjwt (production) | none (dev-only, logs a warning)
KeyEnv varDefaultDescription
workers.enabledALTAVMS_WORKERS_ENABLEDmotion,clips,screenshots,cleanupAllow-list from {motion, clips, screenshots, cleanup, health, webhooks, alerts, notifications}. true = all, false = none
workers.motion_intervalALTAVMS_WORKERS_MOTION_INTERVAL1sMotion reconcile interval per camera
workers.clips_output_pathCLIPS_OUTPUT_PATH/var/lib/altavms/clipsRoot for exported clip MP4s
workers.clips_ffmpeg_binaryCLIPS_FFMPEG_BINARYffmpegPath to the ffmpeg executable
workers.clips_worker_timeoutCLIPS_WORKER_TIMEOUT5mPer-clip ffmpeg deadline
workers.clips_worker_concurrencyCLIPS_WORKER_CONCURRENCY2Max concurrent ffmpeg subprocesses
workers.screenshots_output_pathSCREENSHOTS_OUTPUT_PATH/var/lib/altavms/screenshotsRoot for screenshot JPEGs
workers.drain_timeoutALTAVMS_WORKERS_DRAIN_TIMEOUT10sTotal budget to drain workers on shutdown
KeyEnv varDefaultDescription
metrics.enabledALTAVMS_METRICS_ENABLEDtrueExpose Prometheus metrics at /metrics
readiness.timeoutALTAVMS_READINESS_TIMEOUT5sOverall deadline for /readyz
readiness.check_workersALTAVMS_READINESS_CHECK_WORKERStrueInclude worker liveness in readiness
readiness.check_schemaALTAVMS_READINESS_CHECK_SCHEMAtrueInclude schema-version check
KeyEnv varDefaultDescription
security.csp_strict_modeALTAVMS_SECURITY_CSP_STRICTfalseOpt in to strict CSP in dev (always strict in production)
startup.check_schemaALTAVMS_STARTUP_CHECK_SCHEMAtrueVerify DB schema on boot
startup.check_environmentALTAVMS_STARTUP_CHECK_ENVIRONMENTtrueVerify environment on boot
startup.check_keyringALTAVMS_STARTUP_CHECK_KEYRINGtrueVerify encryption keyring on boot
startup.check_altaALTAVMS_STARTUP_CHECK_ALTAtrueVerify Alta reachability on boot. Set false to start before any Alta server is configured
startup.timeoutALTAVMS_STARTUP_TIMEOUT10sTotal budget for startup checks

Per-user token bucket, keyed on user ID. Public endpoints (/healthz, /readyz, /metrics, /auth/verify) are exempt.

KeyEnv varDefaultDescription
rate_limit.enabledALTAVMS_RATE_LIMIT_ENABLEDtrueEnable the limiter
rate_limit.read_per_minALTAVMS_RATE_LIMIT_READ_PER_MIN60Read requests per minute
rate_limit.write_per_minALTAVMS_RATE_LIMIT_WRITE_PER_MIN20Write requests per minute
rate_limit.burstALTAVMS_RATE_LIMIT_BURST0Burst allowance (0 = use per-minute budget)