n8n Environment Variables Explained: A Practical Guide
Environment variables control a significant part of how a self-hosted n8n instance behaves. The challenge is that the relevant settings are spread across different parts of the documentation, making it difficult to get a clear picture of which variables actually matter. Here’s a practical breakdown of the most useful n8n environment variables and what each one is typically used for. What Environment Variables Actually Do An environment variable is essentially a configuration setting passed to the n8n application when it starts. These variables can control everything from database connections and webhook URLs to execution data and security settings, without requiring you to modify the application code itself. For a self-hosted instance, environment variables are commonly defined in a .env file or directly in a Docker Compose configuration, depending on how you deploy n8n. Most Useful n8n Environment Variables N8N_HOST — Defines the hostname or dom...