DEV Community

Cover image for How to Install & Run n8n Locally (Step-by-Step Guide)
Annie Fortunate
Annie Fortunate

Posted on

How to Install & Run n8n Locally (Step-by-Step Guide)

This guide will walk you through how to install and run n8n on your local machine using Node.js and optionally Docker.

πŸ“ Who is this for?

Beginners who want to explore automation

Developers testing locally before deploying

Non-technical folks curious about workflow tools

🧰 WHAT YOU'LL LEARN:

  1. What is n8n?

  2. Tools you need

  3. How to install n8n locally on:

πŸͺŸ Windows (PowerShell)

🍎 Mac (Terminal or Docker)

  1. How to launch n8n and start using it

  2. Common errors and how to fix them

BENEFITS OF SELF-HOSTING LOCALLY

  1. Full Data Control – Your data stays on your system.

  2. No Monthly Fees – Completely free to run.

  3. Offline Access – Use it without internet.

  4. Hands-On Learning – Boost your tech skills fast.

  5. Instant Testing – Changes reflect immediately.

  6. Customizable – Tweak it to fit your needs.

  7. Great for Portfolios – Show real-world setup skills.

🧠 1. WHAT IS N8N?

n8n (pronounced β€œn-eight-n”) is a free, open-source workflow automation tool. You can use it to connect apps, APIs, databases, and automate repetitive tasks all visually!

🧰 2. Tools You’ll Need (Both Platforms)

Tool Description

Node.js β€”-- Required to install and run n8n

npmβ€”- Comes with Node.js (used to install packages)

PowerShell (for Windows) or Terminal (forMac) β€”-- For running commands
Browser β€”-- To access your local n8n dashboard

πŸ’» 3. Installing n8n on Windows (PowerShell Method)

πŸ”Ή STEP 1: INSTALL NODE.JS

  1. Visit: https://nodejs.org

  2. Download the LTS (Long-Term Support) version for Windows.

  3. Install it (leave all settings default).

  4. To confirm installation: Open PowerShell and type:

node -v
npm -v

πŸ”Ή Step 2: Open PowerShell as Administrator

  1. Click Start.

  2. Search PowerShell.

  3. Right-click β†’ β€œRun as Administrator”.

Or press the windows πŸͺŸ button + x on your keyboard and it will take you straight to power shell administrator.

πŸ”Ή STEP 3: ALLOW SCRIPTS TO RUN

Type the following and press Enter:

Set-ExecutionPolicy RemoteSigned

When prompted, type:

Y

πŸ”Ή STEP 4: INSTALL N8N GLOBALLY

In the same PowerShell window, type:

npm install -g n8n

⏳ Wait for the installation to finish. It might take a few minutes.

πŸ”Ή STEP 5: RUN N8N

After installation, type:

n8n

You should see:

n8n ready on http://localhost:5678/

πŸ”Ή STEP 6: OPEN IN BROWSER

Open your browser and go to:

http://localhost:5678/

You're now inside n8n! πŸŽ‰

It will prompt you to signup which is a very straightforward process.

Anytime you want to login after this time, open power shell administrator by simply pressing the windows + x buttons together on your keyboard, on the power shell windows type n8n and viola, you are in.

COMMON ERRORS & FIXES

Error Fix

πŸ‘‰ sudo: command not found (Windows) Use PowerShell as Administrator, don't use sudo

πŸ‘‰ Running scripts is disabled Run: Set-ExecutionPolicy RemoteSigned

πŸ‘‰ n8n not recognized

FIX Close and reopen terminal, or run: npx n8n
πŸ‘‰ npm WARN deprecated Safe to ignore

πŸ‘‰ Nothing happens after running n8n Be patient β€” it may be installing. If it returns to the prompt, use: npx n8n.

If you’re curious to learn more, replicate my setup, or build something togetherreach out! I’m happy to share the original documentation, help troubleshoot, or even co-create with other automation enthusiasts.

πŸ‘©πŸ½β€πŸ’» Posted by Annie Fortunate
πŸ”— https://www.linkedin.com/in/annie-dan
βœ‰οΈ anniefortunate11@gmail.com

Top comments (2)

Collapse
 
akinriyike_akintunde profile image
Akinriyike Akintunde

Indeed, thanks for sharing!

Collapse
 
annie_fortunate_40e153456 profile image
Annie Fortunate

This is a very helpful guide for everyone working with or hoping to start working with n8n.