Skip to main content
The key server uses a database only for lease state (active leases, revocations). Content keys are never stored — they are derived on every request from the master key using HKDF.

SQLite (default)

SQLite is the default. The database file is stored at /data/blindcast.db inside the container.
Mount a Docker volume at /data to persist leases across container restarts. Without a volume, lease state is lost when the container stops.

When SQLite is fine

  • Development and testing
  • Single-instance deployments
  • Low-throughput key servers (< 100 concurrent viewers)

When to switch to Postgres

  • Multiple key server instances (SQLite doesn’t support concurrent writers from different processes)
  • High-throughput deployments (> 100 concurrent viewers)
  • You need lease data in your existing Postgres for querying or auditing

Postgres

Set DATABASE_URL to switch to Postgres:

Auto-migration

The key server automatically creates the required tables on startup. No manual migration step needed.

Lease table schema

If leases are not used

If you don’t use leases (no LEASE_TTL_MS set, no player lease option), the database is not accessed at runtime. Key derivation is purely in-memory with no I/O.