Skip to content

SQLite

SQLite is the default storage backend for Console. It requires no setup: if DB_PROVIDER is unset (or set to sqlite), Console creates and manages an embedded, on-disk database automatically. This is the recommended backend for single-node deployments, development, and evaluation.

Default backend

When DB_PROVIDER is empty or sqlite, Console uses the embedded SQLite database and ignores DB_URL. No external database server is involved. See the Database overview for how DB_PROVIDER selects a backend, or run Postgres / MongoDB instead.

Where the database lives

Console stores the SQLite database as a single file under the OS user configuration directory:

<user-config-dir>/device-management-toolkit/console.db

The location of <user-config-dir> follows the platform convention (for example, %AppData% on Windows, ~/.config on Linux, and ~/Library/Application Support on macOS). The database opens in WAL (write-ahead logging) mode for better concurrent read/write behavior, and foreign-key enforcement is enabled on every connection.

Notes

  • No DB_URL. The connection string is ignored for SQLite — the embedded path above is always used. Set DB_URL only when switching to Postgres or MongoDB.
  • DB_POOL_MAX is honored by the SQL backends, but a file-based SQLite database is effectively single-writer; leaving the default is fine for most deployments.
  • Encryption at rest for sensitive fields. APP_ENCRYPTION_KEY is a 32-character key (auto-generated by Console when not supplied) used to encrypt sensitive data stored in the SQLite database. See Configuration for the full variable list.
  • Schema is created and upgraded automatically from the migrations bundled with Console (internal/app/migrations/ in the Console source repository) — the same migrations the Postgres backend uses.