Workflow execution history limited to a couple of days

Describe the problem/error/question

I noticed, that workflow history has been kept a couple of days only. Is there a way to configure this and extend the timespan?

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.62.6
  • Database (default: SQLite): Postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu, self-hosted

Yes, it is a env variable you can set. there is a couple of options. :slight_smile:
By default it is set to 2 weeks I think.

What is that env variable name? Below is my .env file (redacted)

# The top level domain to serve from
DOMAIN_NAME=example.com

# The subdomain to serve from
SUBDOMAIN=n8n

# DOMAIN_NAME and SUBDOMAIN combined decide where n8n will be reachable from
# above example would result in: https://n8n.example.com

# Optional timezone to set which gets used by Cron-Node by default
# If not set New York time will be used
GENERIC_TIMEZONE=Europe/Berlin

# The email address to use for the SSL certificate creation
#[email protected]

POSTGRES_USER=user
POSTGRES_PASSWORD=password
POSTGRES_DB=n8n

POSTGRES_NON_ROOT_USER=user-root
POSTGRES_NON_ROOT_PASSWORD=anotherpassword

I don’t see anything related to history
Thanks!

You will need to check the docs :wink:
Just search on google for n8n env variables.

By default n8n keeps the last 10k executions or the executions for the last 2 weeks.

1 Like

I found EXECUTIONS_DATA_MAX_AGE and set it to 336, which is supposed to result in 14 days. Nevertheless, I still see no more than two days of execution history.
Any ideas how to extend the period?
Thanks!

Have you restarted the n8n after setting the ENV value?

Yes, I did
docker-compose down
docker-compose up -d

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.