Core Configuration
Instance Settings
Encryption key for securing credentials in the database.
Path to n8n’s data folder containing database, settings, and custom extensions.
Hostname or domain where n8n is accessible.
Port for the n8n web server.
Protocol (http or https) used to access n8n.
Full URL where webhooks can reach n8n. Defaults to
{N8N_PROTOCOL}://{N8N_HOST}/.Timezone
Default timezone for n8n workflows (used by Schedule node).
System timezone for the container/process.
Database Configuration
Database Type
Database type:
sqlite or postgresdb.PostgreSQL is required for:
- Queue mode (scaling)
- Multi-main setup
- Production deployments
SQLite Configuration
SQLite database filename (relative to
N8N_USER_FOLDER).SQLite connection pool size (minimum 1).
Run VACUUM on startup to optimize database. Warning: Increases startup time.
PostgreSQL Configuration
PostgreSQL server hostname.
PostgreSQL server port.
PostgreSQL database name.
PostgreSQL username.
PostgreSQL password.
Can also use
DB_POSTGRESDB_PASSWORD_FILE to read from a file (Docker secrets).PostgreSQL schema name.
PostgreSQL connection pool size.
Connection timeout in milliseconds.
Query execution timeout in milliseconds. Set to 0 to disable.
PostgreSQL SSL
Enable SSL/TLS for PostgreSQL connections.
Path to SSL certificate authority file.
Path to SSL client certificate.
Path to SSL client key.
Reject unauthorized SSL connections.
Database Logging
Enable database query logging.
Logging level:
query, error, schema, warn, info, log, or all.Log only queries exceeding this time (ms). Set to 0 to disable.
Queue Mode Configuration
Execution Mode
Execution mode:
regular (in-process) or queue (worker-based).Queue mode requires PostgreSQL and Redis.
Redis Configuration
Redis server hostname.
Redis server port.
Redis database number.
Redis username (Redis 6.0+).
Redis password.
Max cumulative timeout (ms) for Redis connection retries before exit.
Prefix for Bull queue keys in Redis.
Redis TLS
Enable TLS for Redis connections.
DNS resolution strategy:
LOOKUP (use DNS) or NONE (pass hostnames directly).Use
NONE for AWS ElastiCache with TLS to avoid certificate errors.Redis Cluster
Comma-separated list of Redis cluster nodes as
host:port pairs.Worker Settings
Enable health check endpoints for workers.
Port for worker health check server.
Lease duration (ms) for a worker processing a job.
How often (ms) a worker must renew its lease.
How often (ms) to check for stalled jobs. Set to 0 to disable.
Execution Settings
Workflow execution timeout in seconds.
-1 for unlimited.Maximum allowed execution timeout in seconds.
Max concurrent production executions.
-1 for unlimited.Execution Data Pruning
Enable automatic deletion of old execution data.
Age in hours before executions are eligible for soft deletion.
Maximum number of executions to keep.
0 for unlimited.Hours buffer before hard-deleting executions.
Task Runner Configuration
Task runner mode:
internal (child process) or external (separate process).Port for task runner broker.
IP address for task runner broker to listen on.
Authentication token for task runners.
URI for runners to connect to broker (runner-side config).
Max concurrent tasks per runner.
Task execution timeout in seconds.
Maximum payload size in bytes (default 1GB).
Security Configuration
Directories that ReadWriteFile and ReadBinaryFiles nodes can access. Separate with
;.Block access to n8n’s internal directories.
JSON array of node types to exclude for security.
JSON array of node types to include. Empty means all (except excluded).
Multi-Main Setup
Enable multi-main setup for high availability (requires Enterprise license).
Leader key TTL in seconds.
Leader check interval in seconds.
Monitoring & Metrics
Enable Prometheus metrics endpoint at
/metrics.Prefix for Prometheus metric names.
Include Node.js and system metrics.
Include workflow ID label on metrics (increases cardinality).
User Management
JWT secret for session tokens. Auto-generated if not set.
JWT session duration in hours (default 7 days).
Email Configuration
Email sending mode:
smtp or empty to disable.SMTP server hostname.
SMTP server port.
SMTP username.
SMTP password.
Use SSL for SMTP.
Sender name and email.
Public API
Disable the Public API.
Path segment for Public API.
Endpoints
Path segment for webhook endpoints.
Path segment for REST API.
Health check endpoint path.
Disable the web UI (API-only mode).
Configuration Examples
- Development
- Production Single Instance
- Queue Mode
- With External Runners
Environment Variable Files
For Docker secrets and Kubernetes:When using
_FILE variants, n8n reads the value from the specified file path instead of the environment variable directly.Next Steps
Docker Deployment
See these configurations in Docker Compose examples
Scaling
Learn about queue mode and scaling strategies