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)
Se você estiver usando o starter kit auto-hospedado (ou qualquer configuração de docker compose), não há ~/.n8n no host — é por isso que você não consegue encontrá-lo. Ele fica dentro do container, em um volume nomeado, e a CLI também não está no seu host. Ambos são acessíveis através do compose:
Esse arquivo contém a encryptionKey que o n8n gerou no primeiro início. Guarde-a em um local seguro agora, antes de precisar dela.
Para parar de depender desse arquivo, defina a chave explicitamente no seu .env:
N8N_ENCRYPTION_KEY=
Importante: defina-a com o valor já presente nesse arquivo de config, não com uma nova string aleatória. Uma chave nova não descriptografará credenciais que foram criptografadas com a antiga — esse é exatamente o erro nesta thread.
E para o comando de export, ele também é executado através do compose:
(o nome do serviço pode diferir de “n8n” dependendo do seu arquivo compose)
Uma coisa que vale a pena saber: fazer backup do banco de dados não é suficiente por si só. As credenciais nele estão criptografadas, então um dump sem a chave restaura workflows que não conseguem se autenticar em lugar nenhum. Mantenha ambos, e mantenha-os separados.