Outcomewatch

How long does n8n keep execution history?

Self-hosted n8n deletes executions older than 336 hours (14 days) by default, set by EXECUTIONS_DATA_MAX_AGE, and also prunes when there are more than 10,000 (EXECUTIONS_DATA_PRUNE_MAX_COUNT). Raise those values to keep more, and keep saving successful runs, or you lose the history you need to debug and monitor.

Last updated · By Marc Vergara

This page belongs to the n8n workflow monitoring guide. Execution history is what every check reads, from your own debugging to tools that look for runs that succeed with 0 items.

The defaults on self-hosted n8n

Pruning is on, executions older than 336 hours are deleted, and pruning also starts above 10,000 executions.

n8n deletes from oldest to newest and keeps a safety buffer (EXECUTIONS_DATA_HARD_DELETE_BUFFER, 1 hour by default). The count limit isn't exact, so expect a little more than 10,000 at times.

How to keep more history

Raise EXECUTIONS_DATA_MAX_AGE (hours) and EXECUTIONS_DATA_PRUNE_MAX_COUNT, then restart n8n.

Watch the database size. Executions with full item data grow fast; if you only need to know what ran, saving less data per run is cheaper than keeping fewer runs.

Which executions to save

Keep saving successful production executions. Without them you can't tell a run that processed 0 items from one that never ran.

Each workflow has its own settings for saving successful, failed and manual executions, and the EXECUTIONS_DATA_SAVE_* variables set the defaults. Turning off success saving is a common way to save space that later makes silent failures invisible.

n8n Cloud

On n8n Cloud, retention depends on your plan. Check your plan's limits in the n8n pricing page before relying on old executions.

Execution data settings (self-hosted)
VariableWhat it doesDefault
EXECUTIONS_DATA_PRUNETurns pruning ontrue
EXECUTIONS_DATA_MAX_AGEAge in hours before deletion336 (14 days)
EXECUTIONS_DATA_PRUNE_MAX_COUNTExecutions kept before pruning by count10,000
EXECUTIONS_DATA_HARD_DELETE_BUFFERHours before soft-deleted data is removed1

FAQ

Why did my old n8n executions disappear?
Pruning deleted them: by default, executions older than 14 days, or the oldest ones once there are more than about 10,000.
How do I keep n8n executions for 30 days?
Set EXECUTIONS_DATA_MAX_AGE=720 (hours) and make sure EXECUTIONS_DATA_PRUNE_MAX_COUNT is high enough for your volume, then restart.
Should I stop saving successful executions to save space?
Not for client workflows. Without successful runs you can't see runs that processed 0 items, which is the most common silent failure.

Sources

Next step: run through the free checklist of 12 silent failures on one client account this week.

Related