Credential overwrites doesn't work using environment variables

Hello,

I deployed N8N in a Kubernetes cluster and everything is working fine. Then I needed to overwrites credential so I began to use the rest API method and it worked perfectly fine. However I couldn’t automate it with a startup command in my k8s deployment because it makes the container crash. So I tried to use the environment variable method.

In the documentation, it is said to format the variable at this format: CREDENTIALS_OVERWRITE_ENDPOINT={ CREDENTIAL_NAME: { PARAMETER: VALUE }}

I tried a few different syntax as shown on the screenshot below but none of them worked.

Am I missing something in the configuration to make this work ?

N8N Version: 0.140.0

Hey @Madriax

I managed to make it work but I had to use a different environment variable. You should not use CREDENTIALS_OVERWRITE_ENDPOINT but rather CREDENTIALS_OVERWRITE_DATA

An example of what I did and worked:
export CREDENTIALS_OVERWRITE_DATA='{ "githubOAuth2Api": { "clientId": 123, "clientSecret": 456 } }'

I had to use the quotes exactly like this otherwise n8n failed to start at times because of the invalid JSON format.

I hope this helps!

3 Likes

@krynble Thank you it works !

2 Likes