# Error decrypting credentials

**URL:** <https://community.n8n.io/t/error-decrypting-credentials/146095>\
**Category:** Questions\
**Created:** [July 8, 2025, 7:37pm UTC](https://community.n8n.io/t/error-decrypting-credentials/146095 "2025-07-08T19:37:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![scapotondo](https://avatars.discourse-cdn.com/v4/letter/s/a87d85/32.png) [@scapotondo](https://community.n8n.io/u/scapotondo)\
**Post date:** [July 8, 2025, 7:37pm UTC](https://community.n8n.io/t/error-decrypting-credentials/146095/1 "2025-07-08T19:37:34Z")

</div>

## Describe the problem/error/question

I’m using a self hosted n8n with official docker image n8nio/n8n:1.102.0, and using postgres:16 as database with docker compose. We have three environments: local, dev and prod and our intention is to promote based on some scripts we’ve created.

Our process -comments are welcomed- is local development → local export credentials & workflows → dev import for credentials & workflows → prod import for credentials & workflows. But aparently, a cred was previously created and I can’t export them. I end up seeing this error message

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

```

I’ve already deleted credentials from the UI, but is isn’t enough. I may share the script if it is useful for you guys.

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

```auto
(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.102.0
- **Database (default: SQLite):** postgress
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app):** docker
- **Operating system:** it’s running on docker containers

---

<div class="post-metadata">

**Author:** ![jabbson](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jabbson/32/87328_2.png) [@jabbson](https://community.n8n.io/u/jabbson)\
**Post date:** [July 8, 2025, 7:40pm UTC](https://community.n8n.io/t/error-decrypting-credentials/146095/2 "2025-07-08T19:40:41Z")

</div>

Please see this document:

> **[Set a custom encryption key | n8n Docs](https://docs.n8n.io/hosting/configuration/configuration-examples/encryption-key/)**
>
> Set a custom encryption key for n8n to securely encrypt credentials.

Basically each environment has a key that it uses to encrypt/decrypt credentials. If the key is not specified, it generates one for you at the start. In order to re-use credentials in the different environment, the key must be the same.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [October 6, 2025, 7:41pm UTC](https://community.n8n.io/t/error-decrypting-credentials/146095/3 "2025-10-06T19:41:38Z")

</div>

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