Docker Deployment in n8n
From the n8n cheat sheet ยท Self-Hosting ยท verified Jul 2026
Docker Deployment
Run n8n with Docker and Docker Compose
bash
# Quick Start (Docker)
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v ~/.n8n:/home/node/.n8n \
n8nio/n8n
# Access at http://localhost:5678๐ก Use PostgreSQL for production (not SQLite)
โก Mount ~/.n8n volume to persist data
๐ Set WEBHOOK_URL to your public domain
๐ On first launch n8n prompts you to create an owner account (user management) - the old N8N_BASIC_AUTH_* vars are deprecated/ignored in v2; put n8n behind HTTPS/a reverse proxy.