Views: 90
Learn how to set up n8n locally and build your first automation workflows. Complete beginner’s guide with hands-on examples and code to setting Up Your n8n Development Environment.
What You’ll Accomplish Today
By the end of this episode, you will have:
- A fully functional n8n instance running on your local machine
- Your development environment configured with VS Code
- Created and tested your first automation workflow
- Understanding of n8n’s core architecture and data flow
- A GitHub repository to track your learning journey
Time Required: 2-3 hours
Difficulty: Beginner
Prerequisites: Basic computer skills, willingness to learn
Part 1: Install Required Software (30 minutes)
Step 1: Install Node.js
n8n requires Node.js to run. We need version 18 or higher.
For Windows:
- Visit https://nodejs.org/
- Download the LTS (Long Term Support) version
- Run the installer and follow the prompts
- Check “Automatically install necessary tools” option
For Mac:
# Using Homebrew (recommended)
brew install node
# Or download from nodejs.org
For Linux (Ubuntu/Debian):
# Update package list
sudo apt update
# Install Node.js 20.x
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt-get install -y nodejs
# Verify installation
node --version
npm --version
Verify Installation: Open your terminal/command prompt and run:
node --version
# Should show v18.x.x or higher
npm --version
# Should show 9.x.x or higher
Step 2: Install VS Code
Visual Studio Code will be your primary code editor.
- Download from https://code.visualstudio.com/
- Install for your operating system
- Open VS Code
Essential Extensions to Install:
Open VS Code and press Ctrl+Shift+X (Windows/Linux) or Cmd+Shift+X (Mac) to open Extensions.
Install these extensions:
- JavaScript (ES6) code snippets – by charalampos karypidis
- REST Client – by Huachao Mao (for testing APIs)
- Path Intellisense – by Christian Kohler
- GitLens – by GitKraken (for Git integration)
- Prettier – Code formatter
Step 3: Install Git
Git will help you version control your workflows and code.
For Windows:
- Download from https://git-scm.com/
- Install with default options
For Mac:
brew install git
For Linux:
sudo apt install git
Configure Git:
git config --global user.name "Your Name"
git config --global user.email "your.email@example.com"
Part 2: Install n8n Locally (15 minutes)
Install n8n Globally
Open your terminal and run:
npm install n8n -g
This installs n8n globally on your system. The -g flag means you can run n8n from anywhere.
Installation might take 3-5 minutes. You’ll see a progress bar.
Start n8n
Once installed, start n8n with:
n8n start
You should see output like:
n8n ready on 0.0.0.0, port 5678
Version: 1.x.x
Editor is now accessible via:
http://localhost:5678/
🎉 Success! Your n8n instance is running!
Access n8n Interface
- Open your web browser
- Go to: http://localhost:5678
- You’ll see the n8n welcome screen
- Create your account (stored locally):
- Email: use any email (doesn’t need to be real for localhost)
- First Name & Last Name
- Password: choose a secure password
Important: Keep this terminal window open while working with n8n. When you close it, n8n stops.
Part 3: Create Your Project Structure (15 minutes)
Set Up Your Learning Directory
Create a organized folder structure for your n8n journey:
For Windows (Command Prompt):
cd %USERPROFILE%\Documents
mkdir n8n-learning
cd n8n-learning
mkdir workflows
mkdir custom-nodes
mkdir scripts
mkdir notes
For Mac/Linux:
cd ~
mkdir -p n8n-learning/{workflows,custom-nodes,scripts,notes}
cd n8n-learning
Initialize Git Repository
git init
Create .gitignore File
Create a file named .gitignore in your n8n-learning folder:
# Node modules
node_modules/
# Environment variables
.env
.env.local
# Credentials (NEVER commit these)
*credentials*.json
# OS files
.DS_Store
Thumbs.db
# Logs
*.log
logs/
# IDE files
.vscode/
.idea/
Create Your First README
Create a README.md file:
# My n8n Learning Journey
## Series: Zero to Automation Pro
This repository tracks my progress from n8n beginner to professional automation developer.
### Goals
- Master n8n automation workflows
- Build custom nodes from scratch
- Deploy production-ready automation systems
- Become a professional automation developer
### Progress
- [x] Episode 1: Environment Setup & First Workflow
- [ ] Episode 2: ...
### Projects
(Will be updated as I progress)
---
Started: [Today's Date]
Commit Your Initial Setup
git add .
git commit -m "Initial setup: n8n learning journey begins"
Next Episode:
In next episode, we will learn the n8n core concepts with a hello world workflow example.
Need Help? If you’re stuck on anything:
- Share your specific error message
- Tell me which step you’re on
- Describe what you expected vs. what happened
I’m here to help you succeed! 🚀