n8n errors / Config

Mismatching encryption keys. The encryption key in the settings file does not match the N8N_ENCRYPTION_KEY env var.

platform: n8n / category: Config

Cause

n8n auto-generated a random encryption key on first startup and stored it in ~/.n8n/config, but a different N8N_ENCRYPTION_KEY was later set in the environment.

Fix

Retrieve the original key from the container (docker exec -it <c> cat /home/node/.n8n/config) and set that exact value as N8N_ENCRYPTION_KEY in compose. To start fresh instead, remove containers and the data volume, then set the desired key before n8n first writes config. Never change the key after credentials are saved.

Source thread →

Part of the Automation Error Index — n8n errors: browse all.

Hitting an automation error we have not covered?

AutomateLab builds and debugs n8n, Make, and agent workflows as fixed-scope projects. If something is broken in production, tell us what you are seeing.

Describe the problem