If you've been curious about workflow automation but found tools like Zapier or Make too expensive or too limited, n8n is worth a serious look.
n8n is an open-source workflow automation tool: you connect services visually by wiring "trigger" nodes to "action" nodes. When something happens in one app, n8n automatically does something in another. No coding required for most use cases.
The best part? You can self-host it. Run it on your own machine or server, pay nothing for the software, and have no limits on how many automations you run.
This guide walks through installing n8n on your local PC using Docker Desktop — step by step, with commands you can copy and paste directly.
What can you do with n8n?
Before diving into setup, here's a quick sense of what n8n can automate:
- When a new email arrives in Gmail with a specific label, add a row to Google Sheets
- When a form is submitted, send a Slack notification and create a Notion page
- Every morning at 9am, fetch today's weather and send it via LINE or Telegram
- When a GitHub PR is merged, mark the corresponding task as done in your project manager
- Connect to any REST API, even custom internal ones
n8n has 400+ pre-built integrations. Each one is a node you drag onto a canvas and configure with a form — no code needed for standard use cases.
Why self-host instead of using Make or Zapier?
Cloud tools charge per execution. If you run 10,000 automations per month, you're paying for that. With a self-hosted n8n instance on your local machine (or a cheap VPS), the software cost is zero and you own your data.
Prerequisites
Windows: verify virtualization is enabled
Docker requires CPU virtualization. Check if it's on:
- Press Ctrl + Shift + Esc to open Task Manager
- Click the Performance tab
- Select CPU
- Look for Virtualization: Enabled in the bottom right
If it says Disabled, you'll need to enable it in BIOS/UEFI. Reboot and press Delete or F2 (varies by manufacturer) during startup. Look for settings named "Virtualization Technology", "VT-x", or "SVM" and enable them.
Mac
Docker Desktop works on both Intel and Apple Silicon (M1/M2/M3) Macs. No extra configuration needed.
What you'll need
- Administrator/sudo access on your machine
- A stable internet connection (Docker will download a few hundred MB)
Step 1: Install Docker Desktop
n8n is distributed as a Docker image. Docker Desktop is the software that runs Docker containers on your machine.
Download Docker Desktop from docker.com/products/docker-desktop — choose the right version for your OS.
Installing on Windows
- Run the downloaded
.exeinstaller - When prompted, keep "Use WSL 2 instead of Hyper-V" checked (WSL 2 is preferred)
- Follow the on-screen prompts and click OK
- Restart your PC when asked
Installing on Mac
- Open the downloaded
.dmgfile - Drag Docker to the Applications folder
- Launch Docker from Applications
- Approve the permissions prompt with your password
Verify the installation
After Docker Desktop launches, the status bar at the bottom left should show "Engine running" with a green indicator.
Confirm in the terminal:
docker --version
You should see something like Docker version 27.x.x, build ...
Step 2: Create a data directory
By default, Docker containers lose their data when they're removed. To keep your n8n workflows, credentials, and settings safe, we'll map a local folder on your machine to n8n's data directory inside the container.
On Windows (PowerShell):
mkdir C:\n8n_data
On Mac / Linux:
mkdir -p ~/.n8n
You only need to do this once. All n8n data will be saved here, surviving container restarts and updates.
Step 3: Start n8n
Open a terminal and run the command for your OS.
Windows (PowerShell):
docker run -d `
--name n8n `
-p 5678:5678 `
--restart unless-stopped `
-v C:\n8n_data:/home/node/.n8n `
-e GENERIC_TIMEZONE="Asia/Tokyo" `
-e TZ="Asia/Tokyo" `
n8nio/n8n
Mac / Linux:
docker run -d \
--name n8n \
-p 5678:5678 \
--restart unless-stopped \
-v ~/.n8n:/home/node/.n8n \
-e GENERIC_TIMEZONE="Asia/Tokyo" \
-e TZ="Asia/Tokyo" \
n8nio/n8n
Change the timezone values if you're not in Tokyo (Asia/Tokyo → your timezone, e.g. America/New_York, Europe/London).
What each flag does:
| Flag | Purpose |
|---|---|
-d | Run in detached (background) mode |
--name n8n | Name the container "n8n" for easy reference |
-p 5678:5678 | Map port 5678 on your machine to n8n's port |
--restart unless-stopped | Auto-start n8n when your PC reboots |
-v ~/.n8n:/home/node/.n8n | Mount your local data folder into the container |
-e GENERIC_TIMEZONE | Set n8n's internal timezone |
The first run will download the n8n Docker image — this takes a few minutes depending on your connection speed. When the command completes and shows a long hex string (the container ID), n8n is running.
Verify it's up:
docker ps
You should see a row with the name "n8n" and status "Up".
Step 4: First launch and account setup
Open your browser and go to:
http://localhost:5678
You'll see n8n's initial setup screen. Fill in:
- Your email address
- A password
This creates a local account for your n8n instance. Click Get started and you'll land on the n8n dashboard.
Building your first workflow
Once you're in, here's how to create a simple test workflow to get familiar with n8n:
- Click + New workflow on the dashboard
- Click the + button on the canvas to add a node
- Search for and select Schedule Trigger (runs on a time interval)
- Configure the interval — for testing, set it to every minute
- Click the + after the Schedule trigger to add another node
- Search for Code and select it
- In the Code node, write:
return [{ json: { message: "n8n is working!", time: new Date().toISOString() } }];
- Click Execute node to test it — you should see the output immediately
- Click Save to save the workflow
- Toggle Active to on — n8n will now run this on your schedule
Congratulations — your first n8n workflow is running.
Essential container management commands
# Stop n8n
docker stop n8n
# Start n8n (after manually stopping it)
docker start n8n
# Restart n8n
docker restart n8n
# View logs
docker logs n8n
# Follow logs in real time
docker logs -f n8n
# Check n8n version
docker exec n8n n8n --version
Updating n8n
When a new version of n8n is released, update like this:
# Pull the latest image
docker pull n8nio/n8n
# Stop and remove the old container (your data is safe — it's in your local folder)
docker stop n8n
docker rm n8n
# Start a new container with the latest image (same command as Step 3)
docker run -d \
--name n8n \
-p 5678:5678 \
--restart unless-stopped \
-v ~/.n8n:/home/node/.n8n \
-e GENERIC_TIMEZONE="Asia/Tokyo" \
-e TZ="Asia/Tokyo" \
n8nio/n8n
Your workflows and credentials are stored in ~/.n8n (or C:\n8n_data on Windows), not in the container. Removing and re-creating the container doesn't touch your data.
Limitations of running locally
Running n8n on your laptop or desktop has one significant constraint: when your machine is off or asleep, n8n stops running.
This is fine for development and testing. But if you want automations to run while you're away from your desk — overnight tasks, scheduled reports, webhooks from external services — you'll need a server that's always on.
The practical next step is a VPS (Virtual Private Server). For around $5–10/month, you get a server that runs 24/7 in a data center. You'd run the exact same Docker commands on that server, and your n8n instance would be accessible from anywhere.
Popular options: DigitalOcean, Linode (Akamai), Vultr, or domestic providers like ConoHa VPS and Sakura VPS. A 1-core / 1GB RAM instance is enough to run n8n with typical automation loads.
A full guide on deploying n8n to a VPS is on the roadmap.
Wrapping up
Installing n8n locally with Docker comes down to four steps:
- Install Docker Desktop and verify it's running
- Create a local data folder (
~/.n8norC:\n8n_data) - Run the
docker runcommand to start n8n - Open
http://localhost:5678and complete initial setup
From there, the n8n canvas is waiting. Start with something small — automating a manual copy-paste task you do every week — and you'll quickly start seeing where else the time savings add up.
Once you've validated your automations locally and want them running 24/7, moving to a VPS is the natural next step.