This guide explains how to set up n8n using Docker.
-
Download & Install Docker Desktop
-
Create a project folder via terminal:
mkdir n8n-docker cd n8n-docker
Open VS Code in that directory.
Create a docker-compose.yml file in the same folder and add the following content:
version: "3.1"
services:
n8n:
image: docker.n8n.io/n8nio/n8n
restart: always
ports:
- "5678:5678"
environment:
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=secure123
- N8N_HOST=localhost
- N8N_PORT=5678
- N8N_PROTOCOL=http
- N8N_USER_MANAGEMENT_DISABLED=true # β
This disables user setup screen
volumes:
- ./n8n_data:/home/node/.n8n
docker compose up -d β Access n8n After the container is up and running, open your browser and visit:
/localhost:5678/ You will be prompted for Basic Auth:
Username: admin
Password: secure123