How to Run n8n Locally for Free (Step-by-Step 2025)
How to Run n8n Locally for Free (Step-by-Step 2025)
If you’re asking “how to run n8n locally for free”, you’re in the right place. Running n8n on your own machine is the best way to develop workflows, test integrations, and learn the platform without paying for cloud hosting.
Prerequisites
Before we start, ensure you have:
- A computer (Windows, Mac, or Linux)
- Basic familiarity with terminal/command line
- Node.js installed (if using npm method) OR
- Docker Desktop installed (Recommended method)
Method 1: The Docker Way (Recommended)
Docker is the cleanest way to run n8n. It isolates the app and makes updates easy.
Step 1: Install Docker
Download and install Docker Desktop for your OS.
Step 2: Run the Command
Open your terminal (Command Prompt or PowerShell on Windows) and paste:
docker run -it --rm \
--name n8n \
-p 5678:5678 \
-v n8n_data:/home/node/.n8n \
docker.n8n.io/n8nio/n8n
Step 3: Access n8n
Open your browser and go to:
http://localhost:5678
You will see the n8n login setup screen. Create your admin account (it stays local) and you’re in!
Method 2: The npm Way (For Node.js Developers)
If you already have Node.js installed, this is instant.
Step 1: Install n8n
Run this global install command:
npm install n8n -g
Step 2: Start n8n
Simply type:
n8n
Step 3: Access
Navigate to http://localhost:5678.
Method 3: Desktop App (Easiest)
For absolute beginners, n8n offers a desktop application.
- Download the dmg/exe from the n8n website.
- Install it like any other program.
- Open it up!
Note: The desktop version has some limitations compared to the Docker version regarding server-side features.
Exposing n8n to the Internet (Tunneling)
Running locally means webhooks from external services (like Stripe or GitHub) can’t reach you. To fix this, use the tunnel parameter.
With Docker:
docker run -it --rm --name n8n -p 5678:5678 -e N8N_TUNNEL_SUBDOMAIN=mytunneledn8n n8nio/n8n start --tunnel
With npm:
n8n start --tunnel
This generates a temporary URL (e.g., https://random-text.hooks.n8n.cloud) that you can use for webhooks.
Troubleshooting Common Issues
Port Conflicts
If port 5678 is busy, change the mapping in Docker:
-p 8080:5678 (Access at localhost:8080).
Data Persistence
Always use volumes (-v) in Docker so you don’t lose your workflows when you restart the container.
Next Steps
Now that you simply know how to run n8n locally for free, what’s next?
- Build your first workflow.
- Connect your local AI models.
- Learn to manage your instance.
👉 Need to upgrade later? How to Update n8n Version 👉 Want to add AI powers? n8n OpenAI Integration Guide