Installation
Prerequisites
System Requirements
-
Operating System: Linux, Windows, macOS
-
Node.js: Version 18.x or higher (LTS recommended)
-
Memory: Minimum 512MB RAM (2GB+ recommended)
-
Storage: Minimum 1GB free space
-
Network: HTTP/HTTPS access for editor
Required Dependencies
bash
# Node.js and npm
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
# Build tools (Linux)
sudo apt-get install build-essential
# Python (for some native modules)
sudo apt-get install python3
Installation Methods
NPM Installation (Recommended)
bash
# Global installation
sudo npm install -g node-red@4.0.3
# Local installation
mkdir node-red-project
cd node-red-project
npm init -y
npm install node-red@4.0.3
Docker Installation
bash
# Pull official image
docker pull nodered/node-red:4.0.3
# Run container
docker run -it -p 1880:1880 -v node_red_data:/data --name mynodered nodered/node-red:4.0.3
Source Installation
bash
# Clone repository
git clone https://github.com/node-red/node-red.git
cd node-red
git checkout 4.0.3
# Install dependencies
npm install
# Build
npm run build
# Start
npm start
Post-Installation Verification
Basic Verification
bash
# Check version
node-red --version
# Check help
node-red --help
# Test start (development mode)
node-red --verbose
Service Installation (Linux)
bash
# Create systemd service
sudo nano /etc/systemd/system/node-red.service
Service file content:
ini
[Unit]
Description=Node-RED
After=syslog.target network.target
[Service]
ExecStart=/usr/bin/node-red --settings /etc/node-red/settings.js
Restart=on-failure
KillSignal=SIGINT
User=node-red
Group=node-red
WorkingDirectory=/home/node-red
Environment="NODE_OPTIONS=--max_old_space_size=2048"
[Install]
WantedBy=multi-user.target
Enable and start service:
bash
sudo systemctl daemon-reload
sudo systemctl enable node-red
sudo systemctl start node-red