Can n8n run on windows?
Yes. You can run n8n on Windows using Docker, Node.js, or WSL. This guide shows short, clear steps and working commands to get n8n running on a Windows machine. The first method uses Docker and docker-compose. The second uses WSL with Node.js and npm.
Can n8n run on Windows — What You Need
Choose one platform. For Docker you need Docker Desktop for Windows. For Node.js use WSL (recommended) or native Node on Windows. You need a terminal and a folder for n8n data.
How to Install n8n on Windows with Docker
Follow these steps to run n8n in Docker. Each step has a short command you can copy and run.
Step 1: Install Docker Desktop
Download and install Docker Desktop. Enable WSL2 integration if prompted. Restart Windows when the installer asks.
Step 2: Run n8n with a simple docker run
Open PowerShell or a terminal. Run the docker command to start n8n quickly.
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v %USERPROFILE%/.n8n:/home/node/.n8n \
n8nio/n8n
This exposes n8n on http://localhost:5678. Stop the container with CTRL+C or docker stop.
Step 3: Use docker-compose for persistence
Create a docker-compose.yml file. Then run it to keep data and use environment variables.
version: '3.7'
services:
n8n:
image: n8nio/n8n:latest
ports:
- "5678:5678"
volumes:
- ./n8n:/home/node/.n8n
environment:
- TZ=UTC
- N8N_BASIC_AUTH_ACTIVE=true
- N8N_BASIC_AUTH_USER=admin
- N8N_BASIC_AUTH_PASSWORD=changeme
docker-compose up -d
How to Install n8n on Windows using WSL and Node.js
WSL gives a Linux environment on Windows. Use it to run Node and n8n reliably.
Step 1: Install WSL and open Ubuntu
Run this in PowerShell as admin to install WSL and Ubuntu.
wsl --install -d Ubuntu
wsl
Step 2: Install Node.js and n8n inside WSL
Run these commands inside the Ubuntu terminal to install Node 18 and n8n.
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs build-essential
sudo npm install -g n8n
n8n start --tunnel
The –tunnel flag opens n8n to the web for quick testing. For production, use a reverse proxy or Docker.
Step-by-step logic summary
1. Decide Docker or WSL. 2. Install required platform. 3. Start n8n with docker run or n8n start. 4. Secure with auth and HTTPS. 5. Persist data with volumes or a database.
Update
To update Docker image, pull and restart:
docker pull n8nio/n8n:latest
docker-compose up -d
To update npm install:
sudo npm install -g n8n@latest
Security
Do basic hardening before public use. Use basic auth and HTTPS. Store data in volumes or an external database. Limit exposed ports. Rotate passwords and use strong secrets.
# Example env for basic auth in docker-compose
N8N_BASIC_AUTH_ACTIVE=true
N8N_BASIC_AUTH_USER=admin
N8N_BASIC_AUTH_PASSWORD=your-strong-password
Use a reverse proxy like nginx, Caddy, or Traefik to get TLS certificates and better access control.
Done
You now have n8n running on Windows with Docker or WSL. Choose Docker for container ease. Choose WSL for native Linux tooling. Both methods let you start automations fast.