From 8ad6f045868a42c69e008778747d48dd7f6ce39d Mon Sep 17 00:00:00 2001 From: Kyle Date: Thu, 13 Nov 2025 11:35:03 -0500 Subject: [PATCH] add documentation around credential override persistence (#3829) Co-authored-by: Kyle Rego Co-authored-by: Kartik Balasubramanian <22399046+HumanistSerif@users.noreply.github.com> --- docs/embed/configuration.md | 10 ++++++++++ .../configuration/environment-variables/credentials.md | 1 + .../configuration/environment-variables/index.md | 2 ++ 3 files changed, 13 insertions(+) diff --git a/docs/embed/configuration.md b/docs/embed/configuration.md index 889acfa19..4695b46f8 100644 --- a/docs/embed/configuration.md +++ b/docs/embed/configuration.md @@ -78,6 +78,16 @@ In case `CREDENTIALS_OVERWRITE_ENDPOINT_AUTH_TOKEN` is set to `secure-token`, th curl -H "Content-Type: application/json" -H "Authorization: Bearer secure-token" --data @oauth-credentials.json http://localhost:5678/send-credentials ``` +#### Persistence + +To store credential overwrites in the database and propagate them automatically to all workers in multi-instance/queue mode, enable: + +```sh +export CREDENTIALS_OVERWRITE_PERSISTENCE=true +``` + +When enabled, n8n stores the encrypted overwrites in the `settings` table and broadcasts a `reload-overwrite-credentials` event so that workers reload the latest values. When disabled, overwrites remain in memory on the process that loaded them and aren't propagated to workers or preserved across restarts. + ## Environment variables n8n has many [environment variables](/hosting/configuration/environment-variables/index.md) you can configure. Here are the most relevant environment variables for your hosted solution: diff --git a/docs/hosting/configuration/environment-variables/credentials.md b/docs/hosting/configuration/environment-variables/credentials.md index 24fa40c17..539274a7e 100644 --- a/docs/hosting/configuration/environment-variables/credentials.md +++ b/docs/hosting/configuration/environment-variables/credentials.md @@ -19,4 +19,5 @@ Enable credential overwrites using the following environment variables. Refer to | :------- | :---- | :------- | :---------- | | `CREDENTIALS_OVERWRITE_DATA`
/`_FILE` | * | - | Overwrites for credentials. | | `CREDENTIALS_OVERWRITE_ENDPOINT` | String | - | The API endpoint to fetch credentials. | +| `CREDENTIALS_OVERWRITE_PERSISTENCE` | Boolean | `false` | Enable database persistence for credential overwrites. Required for multiinstance or queue mode to propagate overwrites to workers through a publish/subscribe approach. | | `CREDENTIALS_DEFAULT_NAME` | String | `My credentials` | The default name for credentials. | diff --git a/docs/hosting/configuration/environment-variables/index.md b/docs/hosting/configuration/environment-variables/index.md index 362015139..fe41df934 100644 --- a/docs/hosting/configuration/environment-variables/index.md +++ b/docs/hosting/configuration/environment-variables/index.md @@ -13,6 +13,8 @@ hide: This section lists the environment variables that you can use to change n8n's configuration settings when self-hosting n8n. +For the complete and most up-to-date list of all environment variables, see the full reference in the n8n docs repository: [Full environment variables index](https://github.com/n8n-io/n8n-docs/tree/main/docs/hosting/configuration/environment-variables). + /// note | File-based configuration You can provide a [configuration file](/hosting/configuration/configuration-methods.md) for n8n. You can also append `_FILE` to certain variables to provide their configuration in a separate file. ///