n8n Docker & Docker Compose Setup
Install n8n with Docker and docker compose. Covers n8n docker, docker n8n, and n8n docker compose rising searches (+30% worldwide).
n8n docker, docker n8n, and n8n docker compose are core self-host queries — especially alongside docker trending worldwide (+20%).
Quick start with Docker
docker volume create n8n_data
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-e GENERIC_TIMEZONE="Asia/Kolkata" \
-e TZ="Asia/Kolkata" \
-e N8N_ENFORCE_SETTINGS_FILE_PERMISSIONS=true \
-e N8N_RUNNERS_ENABLED=true \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n Open http://localhost:5678, create your owner account, then import workflows from our library.
Docker Compose for production
services:
n8n:
image: docker.n8n.io/n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
- N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
- N8N_PORT=5678
- N8N_PROTOCOL=https
- NODE_ENV=production
- WEBHOOK_URL=https://${SUBDOMAIN}.${DOMAIN_NAME}/
- GENERIC_TIMEZONE=Asia/Kolkata
- TZ=Asia/Kolkata
volumes:
- n8n_data:/home/node/.n8n
volumes:
n8n_data: Put Caddy or Traefik in front for HTTPS. Set WEBHOOK_URL to your public URL so triggers work.
After install
- Import Lead Gen Apify or Chat Bot
- Back up volume
n8n_dataregularly - Read API guide for programmatic control
Frequently asked questions
- What is the official n8n Docker image?
- Use docker.n8n.io/n8nio/n8n — documented on docs.n8n.io/hosting.
- n8n docker compose vs docker run?
- docker run is fine for local dev. docker compose is better for production with reverse proxy and backups.