n8n · infra · fg-0349

n8n says 'Credentials could not be decrypted' after a restore, upgrade or new container

Credentials could not be decrypted. The likely reason is that a different 'encryptionKey' was used to encrypt the data.

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

Cause

On first start n8n generates a random key and stores it in the ~/.n8n folder, and every credential in the database is encrypted with it. A fresh volume, a restore without that folder, or a worker without the same key cannot decrypt them.

Fix

Set N8N_ENCRYPTION_KEY explicitly to the original key on the main instance and on every worker and webhook processor, and back it up together with the database.

Apply

# copy the key from the original instance settings in ~/.n8n, then pin it everywhere
N8N_ENCRYPTION_KEY=original-key-value   # same on main, every worker and every webhook processor

Affects: Self-hosted n8n 1.x and 2.x; the explicit error surfaced from 1.74.0, Needs first setup labelling from 1.79.0

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp