i am running self hosted n8n on unraid and suddenly today,
some of my existing workflow is facing this error. It happens on nextcloud node, google sheet node and seatable node. I tried renewing my seatable api , and it is showing the same error
The error message actually describes exactly what the problem is. The “encryptionKey” must have changed. To be more exact, did you either not persist the ~/.n8n folder or the file ~/.n8n/config (in which the key is stored) got deleted.
In case you did set the encryptionKey via the environment variable N8N_ENCRYPTION_KEY, then the value of that variable must have changed.
There is sadly no way of getting the data back without the original key (after all, is exactly that the reason for having it). What you have to do, is to make sure that in the future the encryptionKey does get persistent and does not change again. Then delete all existing credentials and recreate them again.
Sorry, there is sadly nothing else that can be done.
Not sure how you run n8n but I advice you follow our Server Setup Guide to make sure that n8n is setup correctly.
Hi, I have the same problem with credentials / encryption. I am running the self-hosted-starter-kit - I would like to set persistence but do not know how - I also cannot run ‘n8n’ from the CLI so I can not do the command suggested to backup. And I do not have a ~/.n8n folder/file.
Linux Mint Wilma Stable. cloned the GIT self-host today (Jan 19th)
Si vous utilisez le starter kit auto-hébergé (ou toute autre configuration docker compose), il n’y a
pas de ~/.n8n sur l’hôte — c’est pourquoi vous ne pouvez pas le trouver. Il se trouve à l’intérieur du
conteneur, sur un volume nommé, et l’interface CLI n’est pas non plus sur votre hôte. Les deux sont
accessibles via compose :
Ce fichier contient la clé de chiffrement (encryptionKey) que n8n a générée au premier démarrage. Enregistrez-la
quelque part en sécurité maintenant, avant d’en avoir besoin.
Pour ne plus dépendre de ce fichier, définissez la clé explicitement dans votre .env :
N8N_ENCRYPTION_KEY=
Important : définissez-la à la valeur déjà présente dans ce fichier config, pas une nouvelle chaîne
aléatoire. Une nouvelle clé ne pourra pas déchiffrer les identifiants qui ont été chiffrés avec l’ancienne —
c’est exactement l’erreur dans ce fil de discussion.
Pour la commande d’export, elle s’exécute aussi via compose :
(le nom du service peut différer de « n8n » selon votre fichier compose)
Une chose à savoir : faire une sauvegarde de la base de données seule n’est pas suffisant. Les
identifiants qu’elle contient sont chiffrés, donc une export sans la clé restaure des workflows
qui ne peuvent s’authentifier nulle part. Conservez les deux, et tenez-les séparés.