Testing Workflows: Pin Data, Mock Data, Debug Mode
Pin Data, Mock Data, and Debug Mode in n8n: how to test workflows with fixed test data instead of live against production systems.
Binary data in memory or in the database slows n8n down. Filesystem and S3 mode solve the problem, with the right variables.
When an n8n workflow processes PDFs, images, or other files, n8n has to temporarily store this binary data somewhere before passing it on to the next node. Without explicit configuration, this data ends up in memory or, depending on the operating mode, in the database itself, which quickly leads to memory problems and a bloated database with larger files or many parallel executions. The official n8n documentation on Handling binary data at scale therefore recommends switching production instances to filesystem mode or, with self-hosted enterprise licenses, to external S3 storage. As of: July 2026.
By default, n8n keeps binary data in memory, which according to the documentation can lead to crashes with large files. If an instance runs in queue mode with multiple workers, n8n does not support filesystem mode, and the binary data must instead be stored in database mode. The problem: a relational database is designed for many small, structured rows, not for large binary blobs. As the stored files grow, the database grows noticeably along with them, which slows down backups, replication, and normal queries. This is exactly where switching to filesystem or S3 storage comes in.
For self-hosted n8n instances outside of queue mode, filesystem mode is the simplest solution. It can be activated via the environment variable N8N_DEFAULT_BINARY_DATA_MODE with the value filesystem, causing n8n to write binary data to disk instead of memory. The storage location can be customized via N8N_BINARY_DATA_STORAGE_PATH, and by default it is located under N8N_USER_FOLDER/binaryData. In addition, N8N_AVAILABLE_BINARY_DATA_MODES defines which modes are available at all, as a comma-separated list with filesystem as the default value. Details on all variables are listed in the n8n documentation on environment variables for binary data. Important for operators: if the instance runs in queue mode, this approach cannot be used according to the documentation, leaving only database mode or S3.
Anyone running n8n at a larger scale or relying on multiple worker instances can store binary data in an S3-compatible object store. According to the n8n documentation on external storage, this mode is only available on self-hosted enterprise plans and requires a valid enterprise license key, without which the instance will not even start in S3 mode. Configuration is done via several variables.
The mode is activated via N8N_AVAILABLE_BINARY_DATA_MODES=filesystem,s3 together with N8N_DEFAULT_BINARY_DATA_MODE=s3, followed by a restart of the instance. Binary data then ends up structured under workflows/{workflowId}/executions/{executionId}/binary_data/{binaryFileId} in the bucket.
Before switching, you should set up the bucket along with the IAM policy for the necessary S3 actions and set a lifecycle rule that automatically deletes old binary data, because according to the documentation n8n does not take over this cleanup automatically. Another point that is easily overlooked: pruning of binary data only ever affects the currently active mode. If you switch from database mode to filesystem or S3 mode, older binary data remains in the previous storage location and must be cleaned up separately. Anyone running an n8n instance in production with growing data volume should plan this switch early rather than only reacting once the database becomes noticeably slower. NordFlux supports n8n setup, including a storage configuration that matches the actual data volume.
Filesystem mode writes binary data to the local disk of the n8n server and is suitable for individual instances that do not run in queue mode. S3 mode outsources the data to an external object store and is intended for distributed setups with multiple workers, but requires a self-hosted enterprise license.
Yes. According to the n8n documentation, the instance will not start in S3 mode without a valid enterprise license key. For smaller setups not running in queue mode, the free filesystem mode is usually sufficient.
No. n8n does not support filesystem mode in combination with queue mode. Operators with multiple workers must instead use either database mode or, with the appropriate license, S3 mode.
They are not automatically migrated or deleted. Pruning always only works on the currently configured mode, so old files in the previous storage location remain and must be cleaned up manually.
Founder of NordFlux. Spent four years automating processes at enterprise scale at Dräger, and now brings that depth to the mid-market — pragmatic and with full data sovereignty.
Certifications
Pin Data, Mock Data, and Debug Mode in n8n: how to test workflows with fixed test data instead of live against production systems.
n8n keeps binary data in RAM: 100 PDFs can crash the server. Here's how Filesystem or S3 mode helps prevent memory explosion.
Why the n8n database grows through executions and how EXECUTIONS_DATA_PRUNE, retention period, and limits automatically limit the amount of data.
Moving to filesystem or S3 storage relieves the database, but raises new questions about backups, retention and access control. With NordFlux managed n8n hosting, binary data mode is configured correctly from day one, including pruning and a backup strategy. We are happy to take a look at where your instance stands today.