Automation, checked 2026-09-07
n8n: Docker configuration reference
Self-hosted workflow automation with a visual editor, hundreds of integrations and an AI agent node.
At a glance
Ports
Ports| Port | What listens | Source |
|---|
5678 | HTTP listener for the editor, the REST API and webhooks. Route the proxy here. | source for port 5678 |
Environment variables
Environment variables| Variable | Required | What it does | Example | Source |
|---|
N8N_HOST | No | Host name n8n runs on. Combined with N8N_PROTOCOL and N8N_PORT to build the webhook URL internally. | n8n.example.com | source for N8N_HOST |
N8N_WEBHOOK_URL | No | Public URL n8n advertises for webhooks. Required behind a reverse proxy, since the internal host:port combination is wrong there. Replaces the deprecated WEBHOOK_URL from n8n 2.35.0. | https://n8n.example.com/ | source for N8N_WEBHOOK_URL |
N8N_PROXY_HOPS | No | Number of reverse proxies in front of n8n. Set to 1 behind a single proxy so client IPs and protocol are read correctly. | 1 | source for N8N_PROXY_HOPS |
N8N_ENCRYPTION_KEY | No | Key used to encrypt stored credentials. n8n generates a random one on first launch if unset; set it explicitly so a redeploy does not lose access to existing credentials. | openssl rand -hex 32 | source for N8N_ENCRYPTION_KEY |
N8N_PUSH_BACKEND | No | How the backend pushes live changes to the editor UI: websocket or sse. Defaults to websocket, which the proxy must be configured to upgrade. | websocket | source for N8N_PUSH_BACKEND |
Volumes that must persist
Volumes| Path | What is in it | Source |
|---|
/home/node/.n8n | Where n8n saves its SQLite database file and encryption key when not using an external database. Losing this loses every workflow and credential. | source for /home/node/.n8n |
Behind a reverse proxy
- Route the domain to container port 5678 and pass websocket upgrades: the editor UI pushes live execution state over a websocket by default. source for this reverse-proxy note
- Set N8N_WEBHOOK_URL and N8N_PROXY_HOPS=1 behind a reverse proxy, otherwise n8n builds webhook URLs from its internal host and port 5678 rather than the public domain. source for this reverse-proxy note
- n8n only runs over HTTPS in the documented reverse proxy setup; plain HTTP access is not supported for the editor. source for this reverse-proxy note
Release timeline
If it is not coming up
Read from the upstream documentation, repository and container registry by Keita Emsden on 2026-09-07. Every row links the page it came from. Upstream changes without telling anyone, so check the source link before you rely on a value.
Other app references
All app references