Error: Credentials could not be decrypted and proxy connection refused when starting n8n with PostgreSQL and Azure OIDC

Describe the problem/error/question

I am unable to start n8n successfully. I get repeated errors about credentials decryption and proxy connection refused. I am using PostgreSQL as the database and Azure OIDC for authentication. I have set the N8N_ENCRYPTION_KEY in my .env file, but still see the error. Additionally, n8n tries to connect to a proxy at ::1:3128 and fails.

What is the error message (if any)?

error:1C800064:Provider routines::bad decrypt
Credentials could not be decrypted. The likely reason is that a different “encryptionKey” was used to encrypt the data.
connect ECONNREFUSED ::1:3128
Error while fetching community nodes: connect ECONNREFUSED ::1:3128

Information on your n8n setup

  • n8n version: 1.110.0
  • Database (default: SQLite): PostgreSQL
  • Running n8n via (Docker, npm, n8n cloud, desktop app): pnpm
  • Operating system: Windows

This is a common encryption key mismatch issue. Based on the [community.n8n.io](ERROR:Credentials could not be decrypted. The likely reason is that a different "encryptionKey" was used to encrypt the data) discussions, your credentials were encrypted with a different key than what’s currently set.

Here are the steps to resolve this:

• **Stop n8n completely** and ensure your `N8N_ENCRYPTION_KEY` environment variable is properly set before starting

• **If you have a backup** of your original encryption key, use that instead

• **If the key is lost**, you’ll need to delete and recreate all your credentials after n8n starts

• **For the proxy error**, set `HTTP_PROXY=“”` and `HTTPS_PROXY=“”` in your environment variables to disable proxy attempts

The [github.com](Credentials could not be decrypted. · Issue #12949 · n8n-io/n8n · GitHub) issue shows this often happens after updates when the encryption key changes. Make sure to set the encryption key as an environment variable before starting n8n, not after.