How to Install n8n Locally on Windows
Install n8n locally on Windows using Docker or npm. Learn system requirements, step-by-step setup, common errors, and when to move to production hosting.
- n8n runs locally on Windows via Docker (recommended, 5-minute setup) or npm (deprecated from v3.0)
- System requirements: Windows 10/11, 2 GB RAM minimum, Docker Desktop or Node.js 20.19+
- Common errors include port conflicts, PATH issues, missing WSL 2, and database locks--all have documented fixes
- Local installation is free with Community Edition; no license fees, unlimited workflows
- Move to managed hosting when workflows run business-critical automations that need 24/7 uptime
n8n runs locally on Windows via Docker or Node.js. Docker is the recommended method for Windows users because it requires fewer dependencies and avoids path configuration headaches. This tutorial covers both methods, starting with Docker, and walks you through system requirements, installation steps, common Windows errors, and when to graduate to managed hosting.
System Requirements
Your Windows machine needs:
- Windows 10 or 11 (both support Docker and npm equally)
- At least 2 GB of free RAM (4 GB recommended for smooth operation)
- 500 MB of disk space for n8n itself
- Administrator access (required to install Docker Desktop or Node.js)
- A modern terminal: Command Prompt, PowerShell, or Windows Terminal (all work)
If you are using Docker, Docker Desktop must be installed. Docker Desktop runs about 300 MB of memory overhead, but isolation is worth it.
If you are using Node.js, you need Node.js version 20.19 or later. Versions 18.x work but are falling out of support; n8n officially targets 20.19 to 24.x. Check your version: open Command Prompt and run node --version.
For full system requirements--including PostgreSQL or MongoDB if you plan to run n8n in production--see Opsily's complete n8n requirements guide. That page covers database choices, SSL setup, and scaling needs.
Why Run n8n Locally
Running n8n on your Windows machine gives you:
Development and testing. Build workflows without deploying them to the cloud. Test integrations, debug node errors, and experiment without worrying about cost.
Full data privacy. Your workflows and databases never leave your machine. No cloud storage fees, no API call logs sent elsewhere, no SaaS vendor seeing your business logic.
No usage limits. n8n Cloud has plan limits on API calls and concurrent executions. Locally, you set the limits. Run as many workflows as your hardware supports.
Zero licensing costs during evaluation. Test n8n's full feature set before committing budget. The Community Edition is free; no credit card needed.
The downside: you own the uptime, backups, and security. For production use, most teams move to managed hosting within weeks. But for development, local is unbeatable.
Method 1: Docker (Recommended for Windows)
Docker is the fastest, cleanest path on Windows. You get a sandboxed n8n environment that you can throw away and rebuild in seconds.
Step 1: Install Docker Desktop
Go to https://www.docker.com/products/docker-desktop and download Docker Desktop for Windows. Run the installer and follow the prompts. Restart your computer when it finishes. Open Command Prompt or Windows Terminal and run:
docker --version
If you see a version number (e.g., "Docker version 27.0"), Docker is ready.
Step 2: Create a Volume and Pull the n8n Image
Docker volumes persist data between container restarts. Create one:
docker volume create n8n_data
Pull the official n8n image:
docker pull n8nio/n8n:latest
This downloads about 500 MB. It takes 2-5 minutes depending on your internet speed.
Step 3: Run the n8n Container
Use this command to start n8n:
docker run -d --name n8n -p 5678:5678 -v n8n_data:/home/node/.n8n -e TZ=America/New_York n8nio/n8n:latest
Breakdown of what this does:
-d: Run in the background (detached mode).--name n8n: Give the container a human-readable name.-p 5678:5678: Map port 5678 on your machine to port 5678 in the container.-v n8n_data:/home/node/.n8n: Mount your Docker volume so workflows are saved.-e TZ=America/New_York: Set the timezone (change this to match your timezone).n8nio/n8n:latest: The official n8n image.
Step 4: Access n8n
Open your browser to localhost:5678. You will see the n8n login page. On first load, create a local admin account (email + password). You now have a fully running n8n instance.
Why Docker Wins on Windows
Docker eliminates the most common Windows installation headaches: PATH issues, Node.js version conflicts, and admin permission errors. Updates are simple: run docker pull n8nio/n8n:latest and restart the container.
Troubleshooting: Docker Won't Start
If Docker fails with "WSL 2 not installed," Windows Subsystem for Linux is required. Go to Settings > Apps > Optional Features and enable "Windows Subsystem for Linux." Restart your computer. Then re-run Docker Desktop. WSL 2 is lightweight and transparent; it runs in the background.
Method 2: Node.js/npm (Quick Start)
npm is the classic path, but it's being phased out. n8n 3.0 and later no longer support npm installation; version 2.x still does. If you are running 2.x or want a quick test before committing to Docker, npm works fine.
Step 1: Install Node.js
Download the LTS version (20.x or later) from https://nodejs.org. Run the installer. When prompted to "Add Node to PATH," leave that box checked. Restart your computer.
Verify Node.js is installed:
node --version
npm --version
Both should show version numbers.
Step 2: Install n8n Globally
Open Command Prompt and run:
npm install -g n8n
This installs n8n as a global command. Installation takes 2-3 minutes. When it finishes, you will see no errors; a long list of dependencies is normal.
Step 3: Run n8n
Start n8n with one command:
n8n
You will see output showing n8n is starting. Watch for the line: "Editor is available at localhost:5678". n8n is now running.
Important: The Command Prompt must stay open. If you close the terminal, n8n stops. For always-on operation, use pm2 (below).
Step 4: Access n8n
Open localhost:5678 in your browser. Create a local admin account. You have a working n8n instance.
Running n8n in the Background with pm2
To keep n8n running after you close the terminal, use pm2. This is essential if you are using npm; pm2 manages the process and restarts it on reboot.
npm install -g pm2
pm2 start n8n
pm2 startup
pm2 save
Now n8n restarts automatically when your computer reboots. Check status anytime:
pm2 status
Stop n8n:
pm2 stop n8n
Note: Docker handles background running natively with the -d flag, which is another reason why Docker is preferred for production setups.
Verify Installation & First Steps
Once n8n is running (via either method), verify it loaded correctly.
Check the Web Interface
Open localhost:5678 in Chrome, Firefox, or Edge. You should see the n8n login screen. If the page won't load, check that Docker is running (if Docker) or the Command Prompt is still open (if npm), and that port 5678 is not in use.
Create Your Admin Account
On first access, n8n asks you to set up an admin user. Enter an email and password. This account is local to your machine and is not synced to n8n Cloud.
Tour the Interface
Click "New" to open the workflow editor. You will see:
- Node library on the left (triggers, transformations, integrations)
- Canvas in the middle (drag-and-drop nodes)
- Inspector on the right (configure nodes)
Create a simple test: Webhook trigger > HTTP Request > Save. Click "Execute" to verify the workflow runs.
Backup Your Workflows
Workflows are stored in C:\Users\[Your Name]\.n8n. Back up this folder regularly. You can also export workflows as JSON files from the UI.
Common Windows Installation Issues
These are the errors most Windows users hit:
Port 5678 Already in Use
Error: "Error: listen EADDRINUSE :::5678"
Another application is using port 5678. Find the process and kill it, or run n8n on a different port.
Find the process:
netstat -ano | findstr :5678
Kill it (replace 1234 with the PID from above):
taskkill /PID 1234 /F
Or, run n8n on port 3000:
docker run -p 3000:5678 n8nio/n8n:latest
(Docker) or N8N_PORT=3000 n8n (npm).
Command Not Found: n8n
Error: "n8n: command not found" (npm method)
Node.js was installed but npm is not in your PATH. Reinstall Node.js and make sure "Add to PATH" is checked. Restart your computer.
Docker Daemon Not Running
Error: "Cannot connect to Docker daemon"
Docker Desktop is installed but not running. Open Docker Desktop from the Start menu. Wait 30 seconds for it to boot. Try again.
WSL 2 Not Installed
Error: "Docker Desktop requires WSL 2"
Enable WSL 2: Settings > Apps > Optional Features > enable "Windows Subsystem for Linux." Restart your computer.
n8n Database Locked
Error: "database is locked"
A previous n8n process did not shut down cleanly. Delete the SQLite database:
rm %USERPROFILE%\.n8n\database.sqlite
Restart n8n. A new database is created on first run.
Running n8n in the Background
For production use or always-on development, n8n must survive computer restarts.
Docker
Docker runs with the -d flag by default in the example above, which detaches it to the background. It auto-restarts when Docker starts. No extra configuration needed.
Node.js / npm with pm2
pm2 is a process manager that keeps n8n running and restarts it on reboot:
npm install -g pm2
pm2 start n8n
pm2 startup
pm2 save
Check status anytime:
pm2 status
pm2 logs n8n
Production Requirements
For production (running workflows 24/7), you need more than a local machine:
- Dedicated database (PostgreSQL or MongoDB, not SQLite)
- SSL certificate for HTTPS
- Backups and disaster recovery
- Uptime monitoring
- Load balancing if you scale to multiple workers
Most teams move to managed n8n hosting at this point. It handles all of the above.
When to Move to Managed Hosting
Your local installation is for development and testing. At some point, you will ask: "Should we move this to production?"
Local setup has costs:
- You manage uptime (if your computer crashes, your workflows stop)
- You manage backups (losing your data folder means losing all workflows)
- You manage security (SSL, user access control, audit logs)
- Your workflows are only as fast as your hardware
- You manage updates (n8n releases new versions; you must update manually)
Managed hosting eliminates all of this.
When your n8n workflows run business-critical automations--syncing customer data, generating invoices, coordinating shipments--downtime is expensive. A managed provider handles infrastructure, monitoring, and disaster recovery.
Opsily's managed n8n hosting runs your workflows on dedicated servers with automatic backups, SSL, and 99.9% uptime. You define workflows locally, then deploy them. No DevOps required.
Frequently Asked Questions
Is it possible to run n8n locally?
Yes. n8n is designed to run locally on Windows, Mac, or Linux. You can use Docker (recommended) or npm (for n8n 2.x only). Local installation is free and perfect for testing before moving to production.
Is n8n free if hosted locally?
Yes. n8n Community Edition is fully free, even if you run it on your own machine. There are no license fees, no user seat charges, and no time limits. You can run unlimited workflows. If you use n8n Cloud or Opsily's managed hosting, those charge monthly, but local installation is always free.
How do I install n8n offline on Windows?
If you have no internet access after pulling the Docker image, Docker will use the cached image on your machine. For npm, download the n8n package on an internet-connected machine using npm pack n8n, move the .tgz file to your offline machine, and install it locally with npm install./n8n-X.X.X.tgz. Neither approach is common, so contact n8n support if you have enterprise air-gapped requirements.
Can I self-host n8n?
Yes. n8n is open-source (AGPLv3 license) and can be self-hosted on any Linux or Windows machine you own or rent. Docker is the easiest path; you can also run it with npm or deploy to Kubernetes. Self-hosting gives you full data privacy and no usage limits.
Can I use n8n for personal use?
Yes. n8n is free to use for personal workflows. The Community Edition has no seat limits and no restrictions on automation. Commercial use is also free; the AGPLv3 license does not forbid business automation.
Can I run n8n on an older Windows 10 machine?
Yes. Windows 10 (build 2004 or later) supports Docker with WSL 2. Older builds can use npm instead, though npm is deprecated as of n8n 3.0. If you are on n8n 2.x, npm works fine. Upgrade Node.js to version 20.x for best compatibility.
The Bottom Line
Running n8n locally on Windows is straightforward: Docker is the easiest path (start in under 5 minutes), and npm works for testing if you are already familiar with Node.js. Local setup is perfect for building and testing workflows before they go live.
But local is not production. Your computer will eventually need updates, restart for patches, or fail. When your automations matter to your business, managed hosting removes that risk. You write workflows; Opsily handles uptime, backups, and scaling.
Start local to learn n8n. Move to managed hosting when you go live. Explore Opsily's managed n8n hosting.