Database
Warden supports two database backends: SQLite (default) and PostgreSQL.
SQLite (default)
Section titled “SQLite (default)”Zero configuration. Data is stored in a single file.
docker run -d -p 9090:9090 \ -v warden_data:/data \ ghcr.io/projecthelena/warden:latest| Variable | Default | Description |
|---|---|---|
DB_PATH | /data/warden.db | Path to the SQLite file. |
When to use: Single-instance deployments, low-to-medium traffic, simplicity.
PostgreSQL
Section titled “PostgreSQL”For larger deployments or when you need an external database.
docker run -d -p 9090:9090 \ -e DB_URL=postgres://user:password@db-host:5432/warden?sslmode=disable \ ghcr.io/projecthelena/warden:latest| Variable | Default | Description |
|---|---|---|
DB_TYPE | sqlite | Set to postgres (auto-detected if DB_URL starts with postgres). |
DB_URL | — | PostgreSQL connection string. |
When to use: High availability requirements, existing PostgreSQL infrastructure, large-scale monitoring.
Migrating from SQLite to PostgreSQL
Section titled “Migrating from SQLite to PostgreSQL”There is no built-in migration tool between backends. To migrate:
- Export your SQLite data
- Import into PostgreSQL
- Update environment variables to point to PostgreSQL
Moving an existing PostgreSQL installation
Section titled “Moving an existing PostgreSQL installation”Follow Move Warden to another PostgreSQL instance for the complete dump, restore, verification, rollback, and latency-relearning checklist.