diff --git a/docs/advanced-ai/langchain/langsmith.md b/docs/advanced-ai/langchain/langsmith.md index a5f7231f2..04230056e 100644 --- a/docs/advanced-ai/langchain/langsmith.md +++ b/docs/advanced-ai/langchain/langsmith.md @@ -23,7 +23,7 @@ Self-hosted n8n only. | LANGCHAIN_TRACING_V2 | `true` | | LANGCHAIN_API_KEY | Set this to your API key | - Set the variables so that they're available globally in the environment where you host your n8n instance. You can do this in the same way as the rest of your general configuration. These aren't n8n environment variables, so don't try to set them using the [n8n configuration file](/hosting/configuration/configuration-methods.md#set-environment-variables-using-a-file). + Set the variables so that they're available globally in the environment where you host your n8n instance. You can do this in the same way as the rest of your general configuration. 1. Restart n8n. diff --git a/docs/hosting/configuration/configuration-methods.md b/docs/hosting/configuration/configuration-methods.md index 6d9f68ab2..400d32919 100644 --- a/docs/hosting/configuration/configuration-methods.md +++ b/docs/hosting/configuration/configuration-methods.md @@ -44,61 +44,8 @@ docker run -it --rm \ docker.n8n.io/n8nio/n8n ``` -## Set environment variables using a file -You can also configure n8n using a configuration file. - -Only define the values that need to be different from the default in your configuration file. You can use multiple files. For example, you can have a file with generic base settings, and files with specific values for different environments. - -### npm - -Set the path to the JSON configuration file using the environment variable `N8N_CONFIG_FILES`: - -```shell -# Bash - Single file -export N8N_CONFIG_FILES=//my-config.json -# Bash - Multiple files are comma-separated -export N8N_CONFIG_FILES=//my-config.json,//production.json - -# PowerShell - Single file, persist for current user -# Note that setting scope (Process, User, Machine) has no effect on Unix systems -[Environment]::SetEnvironmentVariable('N8N_CONFIG_FILES', '\config.json', 'User') -``` - -Example file: - -```json -{ - "executions": { - "saveDataOnSuccess": "none" - }, - "generic": { - "timezone": "Europe/Berlin" - }, - "nodes": { - "exclude": "[\"n8n-nodes-base.executeCommand\",\"n8n-nodes-base.writeBinaryFile\"]" - } -} -``` - -/// note | Formatting as JSON -You can't always work out the correct JSON from the [Environment variables reference](/hosting/configuration/environment-variables/index.md). For example, to set `N8N_METRICS` to `true`, you need to do: - -```json -{ - "endpoints": { - "metrics": { - "enable": true - } - } -} -``` - -Refer to the [Schema file in the source code](https://github.com/n8n-io/n8n/blob/master/packages/cli/src/config/schema.ts) for full details of the expected settings. -/// - - -### Docker +## Docker Compose file In Docker, you can set your environment variables in the `n8n: environment:` element of your `docker-compose.yaml` file. @@ -110,7 +57,7 @@ n8n: - N8N_TEMPLATES_ENABLED=false ``` -### Keeping sensitive data in separate files +## Keeping sensitive data in separate files You can append `_FILE` to individual environment variables to provide their configuration in a separate file, enabling you to avoid passing sensitive details using environment variables. n8n loads the data from the file with the given name, making it possible to load data from [Docker-Secrets](https://docs.docker.com/engine/swarm/secrets/) and [Kubernetes-Secrets](https://kubernetes.io/docs/concepts/configuration/secret/). diff --git a/docs/hosting/configuration/environment-variables/deployment.md b/docs/hosting/configuration/environment-variables/deployment.md index b7bb53f1c..0c9e085b5 100644 --- a/docs/hosting/configuration/environment-variables/deployment.md +++ b/docs/hosting/configuration/environment-variables/deployment.md @@ -30,7 +30,7 @@ To learn more about proxy environment variables, check the [environment variable | `ALL_PROXY` | String | - | A URL to proxy both unencrypted and encrypted HTTP requests through. When set, n8n uses this value when more specific variables (`HTTP_PROXY` or `HTTPS_PROXY`) aren't present. | | `NO_PROXY` | String | - | A comma-separated list of hostnames or URLs that should bypass the proxy. When using `HTTP_PROXY`, `HTTPS_PROXY`, or `ALL_PROXY`, n8n will connect directly to the URLs or hostnames defined here instead of using the proxy. | | `N8N_EDITOR_BASE_URL` | String | - | Public URL where users can access the editor. Also used for emails sent from n8n and the redirect URL for SAML based authentication. | -| `N8N_CONFIG_FILES` | String | - | Use to provide the path to any JSON [configuration file](/hosting/configuration/configuration-methods.md). | +| `N8N_CONFIG_FILES` (deprecated) | String | - | Use to provide the path to a JSON configuration file. This option is deprecated and will be removed in a future version. Use `.env` files or `*_FILE` environment variables instead. | | `N8N_DISABLE_UI` | Boolean | `false` | Set to `true` to disable the UI. | | `N8N_PREVIEW_MODE` | Boolean | `false` | Set to `true` to run in preview mode. | | `N8N_TEMPLATES_ENABLED` | Boolean | `false` | Enables [workflow templates](/glossary.md#template-n8n) (true) or disable (false). |