Upgrade
Upgrade Planning
Pre-Upgrade Checklist
bash
# 1. Backup current installation
cp -r ~/.node-red ~/.node-red.backup
# 2. Document current configuration
node-red --version
npm list -g --depth=0
# 3. Test flows in development environment
# 4. Review breaking changes in release notes
# 5. Plan maintenance window
Compatibility Assessment
bash
# Check Node.js compatibility
node --version
# Check installed node compatibility
npm outdated -g
# Review custom node compatibility
npm list | grep "node-red-contrib"
Upgrade Procedures
Minor Version Upgrade (4.0.3 → 4.0.4)
bash
# Stop Node-RED service
sudo systemctl stop node-red
# Update Node-RED
npm update -g node-red
# Verify installation
node-red --version
# Start service
sudo systemctl start node-red
# Verify functionality
curl http://localhost:1880/
Major Version Upgrade (3.x → 4.x)
bash
# 1. Complete backup
tar -czf node-red-backup.tar.gz ~/.node-red
# 2. Stop services
sudo systemctl stop node-red
# 3. Update Node.js if required
# 4. Install new version
npm install -g node-red@4.0.3
# 5. Migrate configuration
# Review settings.js for deprecated options
# Update custom nodes if necessary
# 6. Start and test
sudo systemctl start node-red
Post-Upgrade Verification
Functional Testing
bash
# Test basic functionality
1. Access web interface
2. Load existing flows
3. Test node connections
4. Verify integrations
5. Check logging
# Performance testing
1. Monitor memory usage
2. Check response times
3. Verify flow execution
4. Test under load
Rollback Procedures
bash
# If upgrade fails, rollback:
1. Stop Node-RED service
2. Restore backup
3. Reinstall previous version
4. Start service
5. Verify functionality
# Rollback script
#!/bin/bash
sudo systemctl stop node-red
rm -rf ~/.node-red
tar -xzf node-red-backup.tar.gz -C ~/
npm install -g node-red@3.1.0
sudo systemctl start node-red