π§ 1. INTRODUCTION: WHAT YOU ARE BUILDING
In this guide, you will learn how to install and run n8n across three environments:
- Windows PC (for learning)
- MacBook (for development)
- VPS server (for production)
This is not just installation. This is a complete real-world automation system setup used in production environments.
By the end of this guide, you will understand:
- How automation systems work
- How servers run 24/7 bots
- How to install software using commands
- How to fix common errors
- How to keep systems running permanently
π§ 2. VERY IMPORTANT CONCEPT: WHAT IS A COMMAND?
Before installing anything, you must understand this:
π A command is a text instruction you type into a computer.
Instead of clicking buttons, you write instructions.
Example:
node -v
This command means:
π βCheck if Node.js is installed and show its versionβ
π§ 3. WHERE DO YOU WRITE COMMANDS?
This is the most important beginner question.
You do NOT type commands in normal apps.
You use special tools:
π» WINDOWS
You use:
- Command Prompt (CMD)
- PowerShell
π MACBOOK
You use:
- Terminal
π VPS SERVER
You use:
- PuTTY (SSH connection tool)
Now we will explain each one step by step.
π» 4. WINDOWS FULL SETUP (BEGINNER TO ADVANCED)
4.1 WHAT IS CMD?
CMD stands for Command Prompt.
It is a black screen where you type commands.
4.2 HOW TO OPEN CMD
Follow steps:
- Press Windows key
- Type:
cmd
- Click Command Prompt
You will see:
C:\Users\YourName>
Now your system is ready.
4.3 WHAT IS POWERSHELL?
PowerShell is advanced CMD.
It is more powerful and modern.
4.4 HOW TO OPEN POWERSHELL
- Press Windows key
- Type:
powershell
- Open it
You will see:
PS C:\Users\YourName>
4.5 INSTALL NODE.JS (REQUIRED FOR N8N)
Go to:
Download LTS version and install.
4.6 CHECK NODE INSTALLATION
node -v
npm -v
If you see versions, it is installed.
4.7 INSTALL N8N ON WINDOWS
npm install -g n8n
This installs n8n globally.
4.8 RUN N8N
n8n
Open browser:
http://localhost:5678
π 5. MACBOOK FULL SETUP
5.1 WHAT IS TERMINAL?
Terminal is Mac command tool.
It is same as CMD but for Mac.
5.2 HOW TO OPEN TERMINAL
- Press:
Command + Space
- Type:
terminal
- Press Enter
You will see:
MacBook-Pro:~ user$
5.3 INSTALL HOMEBREW
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
5.4 INSTALL NODE.JS
brew install node
5.5 CHECK INSTALLATION
node -v
npm -v
5.6 INSTALL N8N
npm install -g n8n
5.7 RUN N8N
n8n
Open:
http://localhost:5678
π 6. VPS FULL SETUP (PRODUCTION SYSTEM)
6.1 WHAT IS VPS?
A VPS is a remote Linux computer that runs 24/7.
This is where real automation systems run.
6.2 HOW TO CONNECT VPS (PUTTY)
Steps:
- Install PuTTY
- Open PuTTY
- Enter IP address
- Click Open
6.3 LOGIN TO VPS
login as:
Type:
root
Enter password.
Now:
root@server:~#
6.4 UPDATE SERVER
apt update && apt upgrade -y
6.5 INSTALL NODE.JS
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
apt install -y nodejs
6.6 CHECK NODE
node -v
npm -v
6.7 INSTALL N8N
npm install -g n8n
6.8 RUN N8N
n8n
Open:
http://YOUR_VPS_IP:5678
β οΈ 7. PROBLEM: VPS CLOSE β N8N STOPS
Solution: PM2
PM2
7.1 INSTALL PM2
npm install -g pm2
7.2 START N8N
pm2 start n8n
7.3 CHECK STATUS
pm2 list
7.4 AUTO START
pm2 startup
pm2 save
πΎ 8. LOW RAM VPS EXPLANATION
If VPS has 1GB or 2GB RAM:
Problems:
- slow performance
- crashes during installation
- high CPU usage
FIX: SWAP MEMORY
fallocate -l 4G /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
Result:
- stable system
- reduced crashes
- slower but reliable performance
π§ 9. FINAL SYSTEM ARCHITECTURE
| System | Role |
|---|---|
| Windows | Learning |
| MacBook | Development |
| VPS | Production |
π 10. REAL-WORLD FLOW
- Build workflow on Windows
- Improve on MacBook
- Deploy on VPS
- Run 24/7 automation
π§ 11. FINAL CONCLUSION
You now understand:
- How to write commands
- How to open CMD, Terminal, PuTTY
- How to install Node.js
- How to install n8n
- How to run production systems
- How to fix low RAM issues
- How to keep system running using PM2