Credentials could not be decrypted with Postgres

Hi,

We keep running into this error — ERROR: Credentials could not be decrypted. The reason is that probably a different "encryptionKey" got used to encrypt the data than now to decrypt it. with Postgres credentials.

It happened when we updated from v0.55.1 to v0.76.0 it broke all of the nodes that were using Postgres credentials. By breaking I mean that every time we tried running it we would get this error — ERROR: Credentials could not be decrypted. The reason is that probably a different "encryptionKey" got used to encrypt the data than now to decrypt it.

We fixed by changing the Credentials on everything single Postgres node.

Do you know why this is happening? Could this be caused by some sort of set up mistake on our end?

Welcome to the community @edescobar!

The version upgrade should not cause that problem. The error message actually communicates that n8n could not decrypt the credentials that it is supposed to use with postres. That happens if the encryption key changed. As that key either gets saved in the .n8n folder of your user or gets set via an environment variable do I expect that one of both changed.

One reason could for example be that you run n8n in docker and you do persist that folder. So it would on each startup create a new folder with a new key and so accessing them would not be possible anymore.