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