> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables.md).

# Use environment variables

An overview of configuration environment variables for self-hosted n8n.

This section lists the environment variables that you can use to change n8n's configuration settings when self-hosting n8n.

{% hint style="info" %}
**File-based configuration**

You can provide a [configuration file](/deploy/host-n8n/configure-n8n/basic-configuration.md) for n8n. You can also append `_FILE` to certain variables to provide their configuration in a separate file.
{% endhint %}

## In this section

* [Ask n8n AI](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/ai-assistant.md): variables for n8n's built-in AI help assistant.
* [Binary data](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/binary-data.md): variables for storing and handling binary data.
* [Credentials](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/credentials.md): variables for credential overwrites and encryption.
* [Database](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/database.md): variables for database connection and configuration.
* [Deployment](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/deployment.md): variables for instance identity, encryption, and the public API.
* [Endpoints](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/endpoints.md): variables for customizing n8n's REST and webhook endpoint paths.
* [Executions](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/executions.md): variables for execution timeouts, data pruning, and process modes.
* [Expression engine](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/expression-engine.md): variables for controlling expression evaluation.
* [External data storage](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/external-data-storage.md): variables for storing data outside the n8n database.
* [External hooks](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/external-hooks.md): variables for the external hooks file location.
* [External secrets](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/external-secrets.md): variables for external secrets vaults.
* [Insights](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/insights.md): variables for the Insights usage tracking feature.
* [Logs](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/logs.md): variables for logging level, format, and destinations.
* [License](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/license.md): variables for activating and managing your n8n license.
* [Nodes](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/nodes.md): variables for excluding or including specific nodes.
* [OpenTelemetry](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/opentelemetry.md): variables for exporting execution traces.
* [Queue mode](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/queue-mode.md): variables for running n8n across multiple worker processes.
* [Scheduler](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/scheduler.md): variables for the durable scheduler.
* [Security](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/security.md): variables for hardening a self-hosted instance.
* [Source control](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/source-control.md): variables for Git-based source control.
* [SSO](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/sso.md): variables for single sign-on.
* [SSRF protection](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/ssrf-protection.md): variables for restricting outbound requests from workflow nodes.
* [Task runners](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/task-runners.md): variables for configuring external Code node execution.
* [Timezone and localization](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/timezone-and-localization.md): variables for setting your instance's timezone and locale.
* [User management and 2FA](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/user-management-and-2fa.md): variables for user management and two-factor authentication.
* [Workflows](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/workflows.md): variables for workflow defaults and templates.
* [Workflow history](/deploy/host-n8n/configure-n8n/basic-configuration/use-environment-variables/workflow-history.md): variables for workflow version history.

## Related resources

* [Basic configuration](/deploy/host-n8n/configure-n8n/basic-configuration.md)
* [Configuration examples](/deploy/host-n8n/configure-n8n/basic-configuration/configuration-examples.md)
