N8N loses external services credentials after update

I have a self-hosted version of N8N, and every time I update, all my credentials for external services like Google, Supabase, etc. are lost, and I have to re-enter the information, including modules installed from the community.

Is there a way to prevent this from happening?

(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: Version 1.101.1
  • **Database (default: SQLite):**postgresdb
  • n8n EXECUTIONS_PROCESS setting (default: own, main): I believe it is default because I did not change this option
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker / portainer
  • Operating system: Ubuntu 24.04.2 LTS

Below are my editor settings

version: “3.8”
services:
n8n:
image: n8nio/n8n:latest
restart: always
labels:
- traefik.enable=true
- traefik.http.routers.n8n.rule=Host(${SUBDOMAIN}.${DOMAIN_NAME})
- traefik.http.routers.n8n.tls=true
- traefik.http.routers.n8n.entrypoints=web,websecure
- traefik.http.routers.n8n.tls.certresolver=leresolver
- traefik.http.middlewares.n8n.headers.SSLRedirect=true
- traefik.http.middlewares.n8n.headers.STSSeconds=315360000
- traefik.http.middlewares.n8n.headers.browserXSSFilter=true
- traefik.http.middlewares.n8n.headers.contentTypeNosniff=true
- traefik.http.middlewares.n8n.headers.forceSTSHeader=true
- traefik.http.middlewares.n8n.headers.SSLHost=${DOMAIN_NAME}
- traefik.http.middlewares.n8n.headers.STSIncludeSubdomains=true
- traefik.http.middlewares.n8n.headers.STSPreload=true
- traefik.http.routers.n8n.middlewares=n8n@docker
environment:
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_PROTOCOL=https
- NODE_ENV=production
- WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}
- GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
- DB_TYPE=postgresdb
- DB_POSTGRESDB_HOST=postgres
- DB_POSTGRESDB_DATABASE=
- DB_POSTGRESDB_USER=
- DB_POSTGRESDB_PASSWORD=
volumes:
- ${DATA_FOLDER}/.n8n:/root/.n8n
- /root/n8n-local-files:/files
depends_on:
- postgres

postgres:
image: postgres:13
restart: always
environment:
POSTGRES_USER:
POSTGRES_PASSWORD:
POSTGRES_DB:
volumes:
- n8n_postgres_data:/var/lib/postgresql/data

volumes:
n8n_postgres_data:
networks:
default:
name: n8n
external: true

this is the part I would be looking into. what is this value? why is it changed from the default destination location of:

/home/node/.n8n

Take a look at the following doc:

Folder where data should be saved
DATA_FOLDER=/root/n8n/

Do you have a different / custom N8N_USER_FOLDER set for that or something?

I have other applications installed on the same server, including Typebot.

And I was told this script was for installation in cases where there’s more than one service on the same server.

I just got the same problem.

In the logs it’s displayed:

error:1C800064:Provider routines::bad decrypt
n8n-1 | Credentials could not be decrypted. The likely reason is that a different “encryptionKey” was used to encrypt the data.
n8n-1 | Error: Credentials could not be decrypted. The likely reason is that a different “encryptionKey” was used to encrypt the data.
n8n-1 | 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-1 | at CredentialsService.decrypt (/usr/local/lib/node_modules/n8n/src/credentials/credentials.service.ts:369:32)
n8n-1 | at CredentialsController.testCredentials (/usr/local/lib/node_modules/n8n/src/credentials/credentials.controller.ts:150:49)
n8n-1 | at processTicksAndRejections (node:internal/process/task_queues:105:5)
n8n-1 | at handler (/usr/local/lib/node_modules/n8n/src/controller.registry.ts:78:12)
n8n-1 | at /usr/local/lib/node_modules/n8n/src/response-helper.ts:157:17

I think you might want to try /home/node/.n8n instead, given this is the value used in the documentation

1 Like

This doesn’t look like the same problem, actually. Were

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