If you're looking to streamline your workflow with n8n but don’t want to rely on a remote server or pay for cloud hosting, you're in luck. You can install n8n locally on your Mac, Windows, or Linux machine in just a few simple steps. Local installation not only gives you full control over your automation workflows but also ensures data stays on your machine — ideal for privacy-conscious developers and automation enthusiasts.
This guide walks you through the process of running n8n locally without a server, using command-line tools and Node.js. Whether you’re just testing n8n workflows or building production-grade automations from your desktop, this tutorial is for you.
What is n8n?
n8n (short for "nodemation") is a powerful open-source workflow automation tool that lets you connect apps and services using a visual interface. Think of it as a less restricted alternative to Zapier or Make, with the flexibility of running it anywhere — including your own computer.
Running n8n locally is perfect for:
- Developers who want to test workflows offline
- Small teams avoiding cloud fees
- Privacy-first users
- Building and debugging before cloud deployment
Prerequisites to Install n8n Local
Before starting, make sure your machine meets these basic requirements:
- ✅ Node.js and npm installed (v16 or newer recommended)
- ✅ A terminal program (Terminal on macOS, Command Prompt or PowerShell on Windows, Terminal on Linux)
- ✅ Git (optional, but helpful for cloning and version control)
You don’t need Docker or external servers for the local setup in this tutorial.
Tip: If you don’t already have Node.js, download it from https://nodejs.org.
Installation Steps for macOS, Windows, and Linux
Step 1: Install Node.js and npm
If you haven’t yet installed Node.js:
- Go to https://nodejs.org
- Download the LTS version for your OS
- Run the installer and follow the prompts
- Verify installation by running in your terminal:
node -v
npm -v
You should see version numbers. That means you’re good to go.
Step 2: Install n8n Globally
Once Node.js is installed, the next step is installing n8n using npm:
npm install n8n -g
This will install n8n globally on your system, allowing you to run it from any directory via the terminal.
Pro Tip: If you’re on a system that requires admin rights (like Windows), you might need to run this with sudo
on macOS/Linux:
sudo npm install n8n -g
Step 3: Run n8n Locally
After installation, start n8n by simply typing:
n8n
After a few seconds, your terminal will show an output like:
Editor is now accessible via:
http://localhost:5678
Open this URL in your browser and you'll see the n8n workflow editor running locally on your machine.
Step 4: Keep n8n Running in the Background (Optional)
If you’d like to use n8n long-term but don’t want to keep the terminal open all the time, you can use tools like:
- PM2 (Process Manager for Node.js)
- Task Scheduler (Windows)
- launchd or Automator (macOS)
Example setup using PM2:
- Install PM2:
npm install pm2 -g
- Start n8n with PM2:
pm2 start n8n
- Save the process list and enable startup:
pm2 save
pm2 startup
This ensures n8n starts automatically after restarting your system.
Local Environment Configuration
To enhance your experience and secure your setup, consider adding configuration with environment variables.
Common .env
settings
Here’s a simple table with frequently used variables:
Variable | Purpose | Example |
---|---|---|
N8N_PORT |
Change default port | 5678 |
N8N_EDITOR_BASE_URL |
Set public URL for editor | http://localhost:5678 |
N8N_BASIC_AUTH_ACTIVE |
Enable login | true |
N8N_BASIC_AUTH_USER |
Username | admin |
N8N_BASIC_AUTH_PASSWORD |
Password | mypassword |
To use these:
- Create a
.env
file in your working directory - Fill it with your variables
- Run n8n from that directory
n8n
This ensures secure access and helps configure custom local ports or credentials.
Example Use Case: Local Webhook Testing
Let’s say you’re building an automation that triggers on a webhook from a form tool like Typeform or Google Forms.
With n8n running locally:
- Create a new workflow
- Add a Webhook node and configure it (e.g., as POST)
- Set it to listen on
/form-submission
- Activate the workflow
Now, your webhook URL will be:
http://localhost:5678/webhook/form-submission
You can test this using tools like Postman or with a curl command:
curl -X POST http://localhost:5678/webhook/form-submission -H "Content-Type: application/json" -d '{"name":"John Doe"}'
Your workflow should fire immediately, all while staying on your local machine.
Tips for a Smooth Local n8n Experience
- 🚀 Add aliases in your shell config to start n8n quickly
- 🛠️ Use
.env
files to manage multiple projects or separate environments - 🧪 Test webhook flows with ngrok if you need public exposure
- 🔐 Enable basic auth to prevent unauthorized access
When to Move From Local to Cloud
Local n8n works great for development, testing, or light usage. However, if your use case involves:
- High availability
- External integrations needing public URLs
- Team collaboration
… then consider moving to a Docker setup or hosting on a VPS. Tools like n8n.cloud offer managed hosting if you prefer not to self-host.
FAQ
What are the pros and cons of installing n8n locally?
Pros: Total control, no cloud costs, ideal for dev/test, better privacy
Cons: Manually maintained, limited to your machine’s uptime, not suitable for heavy traffic
Can I use n8n locally with a GUI?
Yes! The n8n web editor accessible via http://localhost:5678
is your GUI, running directly in your browser.
Do I need Docker to run n8n locally?
No. While Docker is another way to run n8n, it's not required. This guide uses a Node.js-based install method that’s lightweight and easy to manage.
How do I update my local n8n installation?
Just run:
npm install n8n -g
This updates n8n globally on your system. Restart the app afterward.
Is it safe to use n8n locally?
Yes—especially if you enable basic authentication. Always be mindful of security if connecting to public APIs or exposing to the internet (via port forwarding, for example).
With these steps, you now know how to install n8n local on your own system and begin building amazing automations from your desktop. Whether you're trying out your first workflow or building offline solutions, local installation gives you the freedom and control to innovate without limits.