N8n where is data stored?
If you are asking n8n where is data stored, the short answer is that n8n keeps workflows, credentials, and execution records in a database, while files and binary data live on disk or cloud storage when configured.
n8n where is data stored: databases and records
Most core data for n8n lives in a database. This includes workflows, credentials, connected account details, and execution history.
By default, a simple SQLite database is used for single-user or testing setups. For production, many teams use PostgreSQL or another external database for reliability and scaling.
File storage and binary data
Uploaded files, binary attachments, and temporary execution files are stored on the filesystem by default. In container setups, that means a mounted Docker volume or bind mount must be used to persist files.
You can also configure cloud object storage such as S3 for those binaries. That keeps the database lean and makes files available across multiple n8n instances.
Docker and persistence
When running n8n with Docker, persistent storage is handled by volumes or bind mounts. The database file or the connection to an external database determines data durability.
Without a persistent volume, a container restart can lose local SQLite data and stored files. Using an external database removes that single-container risk.
Choosing between SQLite and PostgreSQL
- SQLite: easy to start, file-based, good for personal use and testing.
- PostgreSQL: better for production, handles concurrency and larger workloads.
Switching to PostgreSQL is a common step as use grows. It improves reliability and multi-user support.
Practical notes for beginners
- Keep credentials and workflow definitions in your database backups.
- Persist file storage with Docker volumes or cloud storage.
- Plan backups for both the database and any uploaded files.
Summary
n8n stores most data in a database (SQLite by default or PostgreSQL for production). Files and binaries are on disk or cloud storage. Use persistent volumes and backups to avoid data loss.