comparison
n8n SQLite vs Postgres: When to Switch for Production and Queue Mode
SQLite is the default for self-hosted n8n, while Postgres is the better fit for queue mode, scaling, and production deployments with heavier execution load.
Independent third-party notes. n8n is a trademark of its owner and is referenced only for compatibility and troubleshooting context.
Quick Answer
SQLite is the default for self-hosted n8n, while Postgres is the better fit for queue mode, scaling, and production deployments with heavier execution load.
Problem Pattern
The user is trying to decide whether the default SQLite database is still enough or whether Postgres is needed before scaling.
Key Facts
- SQLite
- Default database for self-hosted n8n when no database is configured.
- SQLite file
- The default SQLite database file is stored under ~/.n8n/database.sqlite.
- Postgres
- Configured with DB_TYPE=postgresdb and related environment variables.
- Queue mode
- n8n does not recommend SQLite for queue mode.
Recommended Steps
- Use SQLite for small tests, prototypes, and simple single-instance setups.
- Use Postgres when the instance is production-critical, high-volume, or queue-mode based.
- Plan migration and backups before moving an existing SQLite instance.
- Document which database holds the source of truth for workflows, credentials, and executions.
Verification
- The selected database matches the deployment scale.
- Backups include the active database, not only the n8n container volume.
Warnings
- Do not treat the SQLite file as disposable; it stores important n8n data.
- Avoid queue mode on SQLite.