Install n8n on Windows with Docker (Step-by-Step)

1) Install Docker Desktop (once)

Download and install Docker Desktop for Windows.
During install, keep WSL 2 enabled if prompted.
After install, open Docker Desktop and ensure it says Running.
In PowerShell run:

docker –version
d…


This content originally appeared on DEV Community and was authored by SWAPNIL AHMMED SHISHIR

1) Install Docker Desktop (once)

  1. Download and install Docker Desktop for Windows.
  2. During install, keep WSL 2 enabled if prompted.
  3. After install, open Docker Desktop and ensure it says Running.
  4. In PowerShell run:
   docker --version
   docker compose version

You should see version numbers.

Tip: If Docker says virtualization is disabled, enable it from BIOS and ensure Windows Subsystem for Linux + Virtual Machine Platform are turned on in Windows Features.

2) Quick test run (optional)

This runs n8n temporarily (data won’t persist). Good to verify everything works.

docker run --name n8n-test --rm -p 5678:5678 n8nio/n8n:latest

Open http://localhost:5678 — if it loads, you’re good. Press Ctrl+C to stop.

3) Persistent setup with Docker Compose (recommended)

This makes your data persist and lets you start/stop easily.

A) Create a project folder

mkdir $HOME\n8n
cd $HOME\n8n

B) Create a .env file (settings)

Create a file named .env in this folder with these lines (edit as you like):

# n8n basic settings
GENERIC_TIMEZONE=Asia/Dhaka
N8N_HOST=localhost
N8N_PORT=5678
WEBHOOK_URL=http://localhost:5678/

# Optional: protect your local n8n with basic auth
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=admin
N8N_BASIC_AUTH_PASSWORD=ChangeThisStrongPassword123!

C) Create docker-compose.yml

Create a file named docker-compose.yml in the same folder:

services:
  n8n:
    image: n8nio/n8n:latest
    container_name: n8n
    ports:
      - "${N8N_PORT:-5678}:5678"
    environment:
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
      - N8N_HOST=${N8N_HOST}
      - WEBHOOK_URL=${WEBHOOK_URL}
      - N8N_BASIC_AUTH_ACTIVE=${N8N_BASIC_AUTH_ACTIVE}
      - N8N_BASIC_AUTH_USER=${N8N_BASIC_AUTH_USER}
      - N8N_BASIC_AUTH_PASSWORD=${N8N_BASIC_AUTH_PASSWORD}
    volumes:
      - n8n_data:/home/node/.n8n
    restart: unless-stopped

volumes:
  n8n_data:

Notes
• Using a named volume (n8n_data) is the easiest on Windows—no path issues.
• Change the password/user in .env to something strong.

D) Start n8n

From the same folder:

docker compose up -d

Open: http://localhost:5678 🎉

E) View logs / stop / restart

docker compose logs -f
docker compose stop
docker compose start
docker compose down     # stops and removes the container (keeps volume/data)

F) Update n8n later

docker compose pull
docker compose up -d

Common fixes

  • Port already in use (5678): Change N8N_PORT in .env (e.g., 5680) and run docker compose up -d again.
  • Can’t access in browser: Ensure Docker Desktop is running; check logs with docker compose logs -f.
  • Reset admin auth: Edit .env values and restart: docker compose up -d.


This content originally appeared on DEV Community and was authored by SWAPNIL AHMMED SHISHIR


Print Share Comment Cite Upload Translate Updates
APA

SWAPNIL AHMMED SHISHIR | Sciencx (2025-08-28T18:51:32+00:00) Install n8n on Windows with Docker (Step-by-Step). Retrieved from https://www.scien.cx/2025/08/28/install-n8n-on-windows-with-docker-step-by-step/

MLA
" » Install n8n on Windows with Docker (Step-by-Step)." SWAPNIL AHMMED SHISHIR | Sciencx - Thursday August 28, 2025, https://www.scien.cx/2025/08/28/install-n8n-on-windows-with-docker-step-by-step/
HARVARD
SWAPNIL AHMMED SHISHIR | Sciencx Thursday August 28, 2025 » Install n8n on Windows with Docker (Step-by-Step)., viewed ,<https://www.scien.cx/2025/08/28/install-n8n-on-windows-with-docker-step-by-step/>
VANCOUVER
SWAPNIL AHMMED SHISHIR | Sciencx - » Install n8n on Windows with Docker (Step-by-Step). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2025/08/28/install-n8n-on-windows-with-docker-step-by-step/
CHICAGO
" » Install n8n on Windows with Docker (Step-by-Step)." SWAPNIL AHMMED SHISHIR | Sciencx - Accessed . https://www.scien.cx/2025/08/28/install-n8n-on-windows-with-docker-step-by-step/
IEEE
" » Install n8n on Windows with Docker (Step-by-Step)." SWAPNIL AHMMED SHISHIR | Sciencx [Online]. Available: https://www.scien.cx/2025/08/28/install-n8n-on-windows-with-docker-step-by-step/. [Accessed: ]
rf:citation
» Install n8n on Windows with Docker (Step-by-Step) | SWAPNIL AHMMED SHISHIR | Sciencx | https://www.scien.cx/2025/08/28/install-n8n-on-windows-with-docker-step-by-step/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.