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

Describe the problem/error/question

Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.
Error: Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.
    at Credentials.getData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/credentials.ts:57:10)
    at CredentialsService.decrypt (/usr/local/lib/node_modules/n8n/src/credentials/credentials.service.ts:369:32)
    at /usr/local/lib/node_modules/n8n/src/credentials/credentials.service.ts:156:65
    at Array.map (<anonymous>)
    at CredentialsService.getMany (/usr/local/lib/node_modules/n8n/src/credentials/credentials.service.ts:155:31)
    at CredentialsController.getMany (/usr/local/lib/node_modules/n8n/src/credentials/credentials.controller.ts:66:23)
    at handler (/usr/local/lib/node_modules/n8n/src/controller.registry.ts:74:12)
    at /usr/local/lib/node_modules/n8n/src/response-helper.ts:157:17

error:03000064:digital envelope routines::bad decrypt
Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.
Error: Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.
    at Credentials.getData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/credentials.ts:57:10)
    at CredentialsService.decrypt (/usr/local/lib/node_modules/n8n/src/credentials/credentials.service.ts:369:32)
    at CredentialsController.testCredentials (/usr/local/lib/node_modules/n8n/src/credentials/credentials.controller.ts:145:49)
    at handler (/usr/local/lib/node_modules/n8n/src/controller.registry.ts:74:12)
    at /usr/local/lib/node_modules/n8n/src/response-helper.ts:157:17

error:03000064:digital envelope routines::bad decrypt
The connection timed out, consider setting the 'Retry on Fail' option in the node settings

What is the error message (if any)?

Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.
Error: Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.
    at Credentials.getData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/credentials.ts:57:10)
    at CredentialsService.decrypt (/usr/local/lib/node_modules/n8n/src/credentials/credentials.service.ts:369:32)
    at /usr/local/lib/node_modules/n8n/src/credentials/credentials.service.ts:156:65
    at Array.map (<anonymous>)
    at CredentialsService.getMany (/usr/local/lib/node_modules/n8n/src/credentials/credentials.service.ts:155:31)
    at CredentialsController.getMany (/usr/local/lib/node_modules/n8n/src/credentials/credentials.controller.ts:66:23)
    at handler (/usr/local/lib/node_modules/n8n/src/controller.registry.ts:74:12)
    at /usr/local/lib/node_modules/n8n/src/response-helper.ts:157:17

error:03000064:digital envelope routines::bad decrypt
Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.
Error: Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data.
    at Credentials.getData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected]_/node_modules/n8n-core/src/credentials.ts:57:10)
    at CredentialsService.decrypt (/usr/local/lib/node_modules/n8n/src/credentials/credentials.service.ts:369:32)
    at CredentialsController.testCredentials (/usr/local/lib/node_modules/n8n/src/credentials/credentials.controller.ts:145:49)
    at handler (/usr/local/lib/node_modules/n8n/src/controller.registry.ts:74:12)
    at /usr/local/lib/node_modules/n8n/src/response-helper.ts:157:17

error:03000064:digital envelope routines::bad decrypt
The connection timed out, consider setting the 'Retry on Fail' option in the node settings

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.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:1.97.1
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):docker
  • Operating system:

My understanding you would usually get this error after importing encrypted credentials from another instance of n8n, which has a different encryption key configured

see Set a custom encryption key | n8n Docs

this key is used to decrypt the credentials when they are required and if the key doesn’t match - it can’t be decrypted.

So… have you transferred any credentials, @yiluxiangbei? If so you need to make sure to also transfer the key.

Just create credentials on website. It can’t save. there is ~/.n8n/config file.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.