Self-hosted-ai-starter-kit n8n bad decrypt error

Fresh install of the self-hosted-ai-starter-kit using the instructions on github (GitHub - n8n-io/self-hosted-ai-starter-kit: The Self-hosted AI Starter Kit is an open-source template that quickly sets up a local AI environment. Curated by n8n, it provides essential tools for creating secure, self-hosted AI workflows.):
git clone GitHub - n8n-io/self-hosted-ai-starter-kit: The Self-hosted AI Starter Kit is an open-source template that quickly sets up a local AI environment. Curated by n8n, it provides essential tools for creating secure, self-hosted AI workflows.
cd self-hosted-ai-starter-kit
cp .env.example .env # you should update secrets and passwords inside
docker compose --profile gpu-nvidia up

I made sure to set the N8N_ENCRYPTION_KEY to the same value in the .env and docker-compose.yml files. This is the error message I receive:

n8n | Credentials could not be decrypted. The likely reason is that a different “encryptionKey” was used to encrypt the data.
n8n | Error: Credentials could not be decrypted. The likely reason is that a different “encryptionKey” was used to encrypt the data.
n8n | at Credentials.getData (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@[email protected][email protected][email protected][email protected]_/node_modules/n8n-core/src/credentials.ts:57:10)
n8n | at CredentialsService.decrypt (/usr/local/lib/node_modules/n8n/src/credentials/credentials.service.ts:369:32)
n8n | at /usr/local/lib/node_modules/n8n/src/credentials/credentials.service.ts:156:65
n8n | at Array.map ()
n8n | at CredentialsService.getMany (/usr/local/lib/node_modules/n8n/src/credentials/credentials.service.ts:155:31)
n8n | at processTicksAndRejections (node:internal/process/task_queues:105:5)
n8n | at CredentialsController.getMany (/usr/local/lib/node_modules/n8n/src/credentials/credentials.controller.ts:71:23)
n8n | at handler (/usr/local/lib/node_modules/n8n/src/controller.registry.ts:78:12)
n8n | at /usr/local/lib/node_modules/n8n/src/response-helper.ts:157:17
n8n |
n8n | error:1C800064:Provider routines::bad decrypt

Any guidance would be appreciated.

What do you mean, when you mention that you sed the N8N_ENCRIPTION_KEY same values in .env and docker-compose.yml files?
It needs to be set only in .env file.
In docker-compose.yml it just references that value from .env file.

That was my understanding, but when I didn’t set it there was a different value used when run. After I set it in the docker-compose.yml they are the same. I used “printenv | grep N8N_ENCRYPTION_KEY” check the value when the docker was running.

Found the answer here: N8n Qdrant Node "API key" & "Quadrant URL" fields are not auto-populating in the self-hosted-ai-starter-kit Docker example - #5 by nmvega

Do not change anything in the .env file even though it tells you to do so.

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