add documentation around credential override persistence (#3829)

Co-authored-by: Kyle Rego <kylerego@Kyles-MacBook-Pro-2.local>
Co-authored-by: Kartik Balasubramanian <22399046+HumanistSerif@users.noreply.github.com>
This commit is contained in:
Kyle 2025-11-13 11:35:03 -05:00 committed by GitHub
parent d905c758e4
commit 8ad6f04586
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 13 additions and 0 deletions

View File

@ -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:

View File

@ -19,4 +19,5 @@ Enable credential overwrites using the following environment variables. Refer to
| :------- | :---- | :------- | :---------- |
| `CREDENTIALS_OVERWRITE_DATA`<br>/`_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. |

View File

@ -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.
///