Configure relational databases for metadata and state storage in Cognee
.env
→ choose providers → handle pruning.Environment Variables
.env
file:DB_PROVIDER
— The database provider (sqlite, postgres)DB_NAME
— Database nameDB_HOST
— Database host (Postgres only)DB_PORT
— Database port (Postgres only)DB_USERNAME
— Database username (Postgres only)DB_PASSWORD
— Database password (Postgres only)SQLite (Default)
SYSTEM_ROOT_DIRECTORY
in your .env
file.Postgres
Migration Configuration
Backend Access Control
Common Issues
DB_HOST:DB_PORT
and credentials are correct:host.docker.internal
for host-to-container access on macOS/Windows.SQLite Concurrency: SQLite has limited write concurrency; prefer Postgres for heavy multi-user workloads.