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.