when i create new image of n8n i have problem with credentials to connect to database with error message: Credentials could not be decrypted. The likely reason is that a different “encryptionKey” was used to encrypt the data.
How can I fix this problem to keep credentials?
What is the error message (if any)?
Problem loading credential
Credentials could not be decrypted. The likely reason is that a different “encryptionKey” was used to encrypt the data.
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.)
That error normally means the encryption key has been replaced in the config file or it was changed in an environment variable, Normally though if the key has been replaced the database would be lost as well. Are you using the default database or did you configure n8n to use Postgres / MySQL instead?
How did you confirm the key is identical? I suspect what has happened is the volume with the original key was not set but if you have the key handy you can set the encryption key environment variable and that should solve the issue.
I think my problem is the permission change reported in the migration guide, in the docker section.
But the present command:
docker run --rm -it --user root -v ~/.n8n:/home/node/.n8n --entrypoint chown n8nio/base:16 -R node:node /home/node/.n8n
doesn’t seem to have effect because the location of the container is different since I’m using caprover. Could this be the problem?
You would need to change the path so the ~/.n8n: would need to be changed to match whatever your environment is using.In theory though it shouldn’t remove anything but it will show a permission error and will fail to start.
You may also need to make sure Caprover is using /home/node/ as the working directory instead of /root or /data