Skip to content
masterclass Buddy

n8n · Environment Variable

DB_TYPE

DB_TYPE selects n8n's database engine. Self-hosted n8n uses SQLite by default and can use PostgreSQL when configured with environment variables.

Last updated

Syntax

DB_TYPE=sqlite|postgresdb

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • DB_POSTGRESDB_SCHEMA
  • DB_POSTGRESDB_SSL_CA
  • DB_POSTGRESDB_SSL_CERT
  • DB_POSTGRESDB_SSL_KEY
  • DB_POSTGRESDB_SSL_REJECT_UNAUTHORIZED
  • DB_PING_TIMEOUT_MS
  • DB_PING_MAX_FAILURES_BEFORE_RECOVERY
  • DB_RECOVERY_BACKOFF_MIN_MS

Source: Database | Deploy | n8n Docs. Checked 2026-11-03.