How to Use n8n Locally for Free (Step-by-Step Guide)

n8n is a powerful open-source automation platform that lets you create workflows to connect apps, APIs, and even AI models like OpenAI or Claude. The best part? You can use it completely free on your local machine.

This guide will show you:

  • How to install n8n locally
  • How to set it up for the first time
  • How to run your first AI Agent workflow

Step 1: Install Node.js

To get started, make sure you have Node.js installed on your computer.

  • Download it from https://nodejs.org
  • Install the latest LTS version
  • Once installed, open your terminal and run:

If it shows a version (e.g., v18.17.0), you’re ready to continue.

Step 2: Create Your Project Folder

  • Create a folder anywhere on your computer. Example: n8n-local.
  • Open this folder in your code editor (like VS Code).
  • Open the terminal inside your editor or use your system terminal.

Step 3: Install n8n Globally

  • Now install n8n using the following npm command:
  • This will install n8n globally on your system so you can run it from anywhere.

Step 4: Start n8n

  • After installation, start n8n by running:

Step 5: Complete Initial Setup

You’ll now see a welcome form:

  • Enter your name, email, and password Click Next
  • Fill in additional details (company name, role, etc.) Click Get Started

n8n will now ask you to send a free license key to your email. Click the button, check your inbox, and confirm.

Step 6: Choose a Workflow Type

You’ll now see two options:

  • Start from Scratch
  • Test a Ready-to-Go AI Agent Example

You can choose the first option to build your own workflows (like birthday reminders, auto-email responders, etc.) But for this guide, let’s choose the second option to test an AI agent powered by OpenAI.

Step 7: Set Up OpenAI Agent

You’ll be redirected to an AI Agent template using OpenAI.

  • Click on “Create new OpenAI Chat Model credentials”
  • It will ask you for your OpenAI API Key

To get your OpenAI API key:

  • Copy the key and paste it into n8n

Note: OpenAI is not fully free — you may need to load $5 to get started. Alternatively, you can use your own local LLM model if needed.

Done! Start Chatting with Your Agent

Once connected, your OpenAI-powered chatbot workflow will be ready. You can:

  • Start chatting with the agent
  • See how the data moves across each step
  • Learn how AI and automation come together inside n8n

Summery

n8n is an amazing no-code/low-code platform for building automations, chatbots, reminders, data flows, and much more — right from your local machine. Start free, experiment with AI agents, and explore your creativity with automation!