How to Install n8n on macOS and Windows (Complete Step-by-Step Guide – 2025)

How to Install n8n on macOS and Windows (Complete Step-by-Step Guide – 2025)

If you’re looking for a powerful automation tool like Zapier but want full control, n8n is the perfect choice. It’s open-source, flexible, and lets you build complex automations visually.

In this guide, you’ll learn how to install n8n on both Mac and Windows, step-by-step, without errors. After installation, you will be able to access n8n at:

http://localhost:5678

Let’s begin.


What We Will Cover

This guide includes:

  • Installing n8n on macOS
  • Installing n8n on Windows
  • Installing Node.js (correct versions)
  • Fixing npm permission issues
  • Running n8n locally
  • Common errors and solutions

🖥️ INSTALLATION ON macOS (MacBook Air/Pro, Intel or M1/M2/M3)


Step 1: Install Homebrew (Mac Package Manager)

Open Terminal and run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Enter your password → Press ENTER → wait for installation.


Step 2: Add Homebrew to Your Path

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"

Check:

brew -v

If Homebrew shows a version, you’re good.


Step 3: Install Node.js (SUPPORTED versions)

n8n supports:

  • Node 18.17+
  • Node 20
  • Node 22 (recommended)

Install Node 22 on Mac:

brew install node@22

Add it to PATH:

echo 'export PATH="/opt/homebrew/opt/node@22/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Verify:

node -v

You should see v22.x.x.


Step 4: Fix npm Permission Issues (Important for Mac)

Create global directory:

mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'

Add to PATH:

echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

Step 5: Install n8n Globally

npm install -g n8n

Warnings are normal — ignore them unless they are red npm ERR! messages.


Step 6: Run n8n

n8n

Then open:

http://localhost:5678


🪟 INSTALLATION ON WINDOWS


Step 1: Install Node.js (LTS Version)

Download the LTS version (Node 18, 20, or 22) from:

👉 https://nodejs.org/

Choose Windows Installer (.msi) → Install with default settings.

Verify installation:

Open Command Prompt or PowerShell, then run:

node -v
npm -v

Step 2: Install n8n Globally

In PowerShell or CMD:

npm install -g n8n

If your system gives permission errors:

Use:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Then try again.


Step 3: Run n8n on Windows

Start n8n:

n8n

Now open your browser:

http://localhost:5678

n8n is now running locally.


🚀 OPTIONAL — Run n8n in Background (Both macOS & Windows)

Install PM2 (Process Manager):

npm install -g pm2

Start n8n:

pm2 start n8n

View logs:

pm2 logs n8n

Stop:

pm2 stop n8n

⚠️ COMMON ERRORS & FIXES


Error: “Your Node.js version 25.x is not supported”

Cause: You installed Node 25 which n8n does NOT support.

Fix (Mac):

brew uninstall node
brew install node@22

Fix (Windows):

  • Uninstall Node from Control Panel
  • Install Node 20 or Node 22 from nodejs.org

Error: npm ERR! EACCES (Permission denied)

macOS Fix:

mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

Windows Fix:

Run terminal as Administrator
OR set execution policy:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

n8n: Command not found

macOS:

Add to PATH:

echo 'export PATH=$HOME/.npm-global/bin:$PATH' >> ~/.zshrc
source ~/.zshrc

Windows:

Restart Command Prompt or PowerShell.


🎉 Final Result

After completing the steps, n8n will be running locally on:

http://localhost:5678

You can now start building:

  • Workflows
  • Integrations
  • Automations
  • API triggers
  • Background tasks

📝 Conclusion

Installing n8n on both macOS and Windows is simple once you use the correct Node version and adjust npm permissions. This complete step-by-step guide ensures you avoid common errors and get n8n running smoothly.

Whether you’re automating business processes, connecting apps, or building workflow automations, n8n gives you the power and flexibility to do it all — and now it’s running perfectly on your system.

 

Previous Article

The Rise of No-Code Platforms in 2025: How Technology Is Changing Business

Next Article

How to Create a Professional Website Using Replit AI — No Coding Needed

Write a Comment

Leave a Comment

Your email address will not be published. Required fields are marked *

Subscribe to our Newsletter

Subscribe to our email newsletter to get the latest posts delivered right to your email.
Pure inspiration, zero spam ✨