bolt Valebyte VPS from $4/mo — NVMe, 60s deploy.

Get a VPS arrow_forward

Node-RED on VPS: Installation, Configuration, and Maintenance

calendar_month June 17, 2026 schedule 17 min read visibility 29 views
person
Valebyte Team
Node-RED on VPS: Installation, Configuration, and Maintenance

Installing Node-RED on a VPS involves deploying the platform via Docker or Docker Compose, configuring a reverse proxy for secure HTTPS access, and regular maintenance for stable automation operation, which provides flexibility and full control over your data flows.

Node-RED is a powerful visual programming tool that allows you to easily connect hardware devices, APIs, and online services. Its unique drag-and-drop environment makes automation development accessible even to those who are not professional programmers. Hosting Node-RED on your own Virtual Private Server (VPS) opens up new horizons for projects requiring stable operation, high performance, and full control over data and configuration. In this article, we will detail how to install Node-RED on a VPS, configure it for secure access, and maintain it effectively.

What is Node-RED and why is it ideal for a VPS?

Node-RED is a flow-based programming environment developed by IBM for the Internet of Things (IoT), but it quickly found application in a wide range of automation tasks. It allows you to create complex logical chains by connecting "nodes," each of which performs a specific function—from reading data from sensors to sending notifications or interacting with databases. The Node-RED interface is a browser-based editor where you can visually build your "flows" by dragging and connecting nodes.

Deploying Node-RED on a VPS (Virtual Private Server) offers several key advantages over local execution or using cloud solutions:

  • Full Control: You own the entire infrastructure, from the operating system to the application itself. This is critical for projects requiring specific settings, access to system resources, or integration with private networks.
  • 24/7 Reliability and Availability: Unlike a local server, which may be unavailable due to power outages or internet connection issues, a VPS operates around the clock in a data center with guaranteed availability.
  • Scalability: As your projects grow and the load on Node-RED increases, you can easily scale VPS resources (CPU, RAM, storage) without having to migrate the entire system.
  • Security: You control all aspects of security, including firewalls, SSH access, OS updates, and SSL certificates. This is especially important for self-hosting Home Assistant and other security-sensitive applications.
  • Cost-effectiveness: For many projects, a VPS offers an optimal price-performance ratio compared to expensive enterprise cloud platforms.
  • Data Persistence: All your flows, configurations, and data are stored on your VPS, not on third-party servers, eliminating dependence on external service providers.

What is Node-RED used for? Application examples

The range of Node-RED applications is vast due to its flexibility and extensive node library. Here are a few examples:

  • Smart Home Automation: Integrating various devices (sensors, relays, lights) and services (weather, schedules) to create complex scenarios.
  • Monitoring and Alerts: Collecting data from servers, network devices, web services, and sending notifications (email, Telegram, Slack) when thresholds are reached.
  • Data Parsing and Processing: Extracting information from web pages, processing JSON/XML data, converting formats.
  • Creating APIs and Web Services: Rapid prototyping and deployment of RESTful APIs, webhook handlers.
  • Enterprise System Integration: Connecting CRM, ERP, databases, and other applications to automate business processes.
  • IoT Device Management: Collecting telemetry, remote control, firmware updates.

Minimum system requirements for running Node-RED on a server

While Node-RED is quite lightweight and can run even on single-board computers like Raspberry Pi, for stable and productive operation on a VPS, especially considering the potential growth in the number of flows and integrations, it is important to choose the right configuration. Resource requirements depend on the complexity and number of your flows, the frequency of operations, the volume of data processed, and the number of additional nodes installed.

Basic Node-RED requirements

  • Operating System: Any modern Linux distribution (Ubuntu 20.04+, Debian 11+, CentOS 8+, AlmaLinux, Rocky Linux). Ubuntu Server LTS is recommended for better support and community.
  • Processor (CPU): 1 vCPU with a frequency of 2.0 GHz or higher. This will be sufficient for small projects and simple flows. If intensive data processing or many parallel flows are planned, consider 2 vCPUs.
  • Random Access Memory (RAM): Minimum 1 GB RAM. Node.js and Node-RED themselves consume about 100-200 MB, but additional nodes, data caching, and the OS require more. For more complex scenarios, 2 GB RAM is recommended.
  • Disk Space: Minimum 10 GB NVMe or SSD. The Node-RED and Docker installation itself will require several gigabytes. The rest is for the operating system, storing flows, logs, and any data Node-RED might save (e.g., SQLite databases, files). NVMe drives significantly speed up I/O operations, which positively affects overall performance.
  • Network Connection: Stable internet connection with a bandwidth of at least 100 Mbps. This is standard for most VPS.

Recommendations for choosing a VPS configuration for Node-RED

For most users starting with Node-RED on a server, a balanced plan will be optimal. Valebyte.com offers various plans suitable for any task.

Usage Scenario CPU RAM Disk (NVMe/SSD) Estimated Cost (USD/month)
Light (Few simple flows, Home Assistant integrations, infrequent requests) 1 vCPU (2.0+ GHz) 1 GB 20 GB $5 - $10
Medium (Dozens of flows, data processing, API gateway, moderate load) 2 vCPU (2.5+ GHz) 2 GB 40 GB $10 - $20
Advanced/High Load (Hundreds of flows, intensive processing, databases, many users) 4 vCPU (3.0+ GHz) 4 GB+ 80 GB+ $20 - $40+

Choosing a VPS with NVMe disks will significantly improve Node-RED's responsiveness, especially when working with files or databases like SQLite, which are often used in flows. It's also worth noting that using Docker adds a small overhead, but it's negligible compared to the benefits of containerization.

Looking for a reliable server for your projects?

VPS from $10/month and dedicated servers from $9/month with NVMe, DDoS protection, and 24/7 support.

View offers →

Step-by-step Node-RED installation on VPS via Docker Compose

Using Docker and Docker Compose is the recommended way to install Node-RED on a VPS. It provides isolation, ease of deployment, updates, and dependency management. We will use Docker Compose to set up Node-RED with persistent data storage.

VPS Preparation

Before starting the installation, make sure your VPS is updated and has Docker and Docker Compose installed. Connect to the VPS via SSH.

sudo apt update && sudo apt upgrade -y

Docker Installation:

sudo apt install -y ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Add the current user to the docker group to avoid using sudo with every Docker command:

sudo usermod -aG docker $USER
newgrp docker

Check Docker installation:

docker run hello-world

Creating a Docker Compose file for Node-RED

Create a directory for Node-RED and navigate into it:

mkdir ~/node-red
cd ~/node-red

Create the docker-compose.yml file:

nano docker-compose.yml

Insert the following content:

version: '3.8'

services:
  node-red:
    image: nodered/node-red:latest
    container_name: node-red
    restart: unless-stopped
    ports:
      - "1880:1880" # Node-RED internal port
    volumes:
      - ./data:/data # Persistent storage for flows and settings
    environment:
      - TZ=Europe/Moscow # Set your timezone
      - NODE_RED_ENABLE_PROJECTS=true # Enable project management (optional)
      - NODE_RED_USERNAME=admin # Username for login (recommended to change)
      - NODE_RED_PASSWORD=your_secure_password # Password for login (MUST CHANGE!)
    networks:
      - node-red-net

networks:
  node-red-net:
    driver: bridge

Explanation of the docker-compose.yml file:

  • image: nodered/node-red:latest: Uses the official Node-RED image.
  • container_name: node-red: Assigns an easily recognizable name to the container.
  • restart: unless-stopped: The container will automatically restart on failure or VPS reboot.
  • ports: - "1880:1880": Maps container port 1880 to host port 1880. This means Node-RED will be accessible at http://YOUR_VPS_IP:1880.
  • volumes: - ./data:/data: This is a critically important line. It mounts the local directory ./data (inside ~/node-red) to the /data directory inside the container. All your flows, settings, and installed nodes will be stored in this local directory, ensuring their preservation even if the container is deleted or updated.
  • environment:: Here you can set environment variables.
    • TZ=Europe/Moscow: Set your timezone.
    • NODE_RED_ENABLE_PROJECTS=true: Enables the project management feature in Node-RED, which is convenient for versioning and collaboration.
    • NODE_RED_USERNAME and NODE_RED_PASSWORD: Set the credentials for accessing the Node-RED editor. Be sure to change your_secure_password to a strong password! For more advanced authentication, external mechanisms or HASH passwords can be used.
  • networks:: Defines the internal Docker network for the container.

Starting Node-RED

Save the file (Ctrl+X, Y, Enter) and start the container:

docker compose up -d

The -d flag runs the container in detached mode (in the background). You can check the container status:

docker compose ps

Or view the logs:

docker compose logs -f node-red

Now Node-RED should be accessible at http://YOUR_VPS_IP:1880. Enter the login and password you set.

rocket_launch Quick pick

Need a dedicated server?

Compare prices from top providers. Configure and order in minutes.

Browse dedicated servers arrow_forward

Configuring Secure Access: Reverse Proxy (Nginx/Caddy) and HTTPS for Node-RED

Accessing Node-RED via HTTP over an IP address and port 1880 is insecure and inconvenient. To ensure security, use a domain name, and obtain an SSL certificate, we will set up a reverse proxy with Nginx or Caddy and HTTPS using Let's Encrypt.

It is assumed that you have a domain name (e.g., node-red.yourdomain.com) that points to your VPS's IP address.

Option 1: Nginx with Let's Encrypt (Certbot)

Install Nginx and Certbot:

sudo apt install -y nginx certbot python3-certbot-nginx

Create Nginx configuration:

Create a configuration file for your domain:

sudo nano /etc/nginx/sites-available/node-red.conf

Insert the following content, replacing node-red.yourdomain.com with your actual domain:

server {
    listen 80;
    server_name node-red.yourdomain.com;

    location / {
        proxy_pass http://localhost:1880; # Proxy to Node-RED port
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_cache_bypass $http_upgrade;
    }
}

Create a symbolic link to sites-enabled:

sudo ln -s /etc/nginx/sites-available/node-red.conf /etc/nginx/sites-enabled/

Check Nginx syntax and restart it:

sudo nginx -t
sudo systemctl restart nginx

Obtain an SSL certificate with Certbot:

Now use Certbot to automatically obtain and configure an SSL certificate:

sudo certbot --nginx -d node-red.yourdomain.com

Follow Certbot's instructions. It will automatically modify the Nginx configuration, adding HTTPS and redirecting from HTTP to HTTPS. After this, your Node-RED will be accessible at https://node-red.yourdomain.com.

Option 2: Caddy with automatic HTTPS

Caddy is a modern web server that automatically manages Let's Encrypt SSL certificates. This makes it very simple to set up.

Install Caddy:

sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update
sudo apt install -y caddy

Create Caddyfile:

Create or edit the /etc/caddy/Caddyfile file:

sudo nano /etc/caddy/Caddyfile

Remove all existing content and insert the following, replacing node-red.yourdomain.com with your domain:

node-red.yourdomain.com {
    reverse_proxy localhost:1880
    
    # Optional: enable basic HTTP authentication
    # basicauth {
    #     username your_secure_username
    #     password your_secure_password_for_caddy
    # }
}

Save the file and restart Caddy:

sudo systemctl reload caddy

Caddy will automatically obtain an SSL certificate and configure HTTPS. Your Node-RED will be accessible at https://node-red.yourdomain.com.

Note that Caddy may take up to 30 seconds to obtain the first certificate. If problems arise, check Caddy logs: sudo journalctl -u caddy --no-pager.

Node-RED Maintenance: Backup and Updates

Regular maintenance of Node-RED on a VPS is critically important to ensure the stability, security, and integrity of your projects. This includes data backup and timely updates.

Node-RED Data Backup

Thanks to our use of Docker Compose with a persistent volume (./data:/data), all important Node-RED data (flows, settings, installed nodes) are stored in the ~/node-red/data directory on your VPS. Backing up simply involves copying this directory.

Manual Backup

To create a manual backup, simply stop the Node-RED container, copy the data directory, and then start the container again:

cd ~/node-red
docker compose stop node-red
tar -czvf node-red_backup_$(date +%Y%m%d_%H%M%S).tar.gz data/
docker compose start node-red
  • docker compose stop node-red: Stops the Node-RED container to ensure data integrity during copying.
  • tar -czvf ... data/: Creates a compressed archive of the data directory.
  • docker compose start node-red: Starts the Node-RED container.

The resulting .tar.gz archive is recommended to be stored not only on the VPS but also uploaded to remote storage (S3, Google Drive, local computer). For automation and reliability, tools such as Restic for VPS backup can be considered.

Automated Backup using Cron and a Script

You can create a simple script and configure it to run via Cron.

Create the backup_node_red.sh script in the ~/node-red/ directory:

nano ~/node-red/backup_node_red.sh

Insert the content:

#!/bin/bash

BACKUP_DIR="/home/$USER/node-red/backups" # Directory for storing backups
DATA_DIR="/home/$USER/node-red/data"    # Directory with Node-RED data
CONTAINER_NAME="node-red"              # Node-RED container name
TIMESTAMP=$(date +%Y%m%d_%H%M%S)
BACKUP_FILE="$BACKUP_DIR/node-red_backup_$TIMESTAMP.tar.gz"

mkdir -p $BACKUP_DIR

echo "Stopping Node-RED container..."
docker compose -f /home/$USER/node-red/docker-compose.yml stop $CONTAINER_NAME

echo "Creating backup of Node-RED data..."
tar -czf "$BACKUP_FILE" -C "$DATA_DIR" .

echo "Starting Node-RED container..."
docker compose -f /home/$USER/node-red/docker-compose.yml start $CONTAINER_NAME

echo "Backup created: $BACKUP_FILE"

# Optional: Delete old backups (e.g., older than 7 days)
find $BACKUP_DIR -name "node-red_backup_*.tar.gz" -mtime +7 -delete
echo "Old backups cleaned up."

Make the script executable:

chmod +x ~/node-red/backup_node_red.sh

Configure Cron for daily execution (e.g., at 3:00 AM):

crontab -e

Add the line to the end of the file (replace $USER with your username):

0 3 * * * /home/$USER/node-red/backup_node_red.sh >> /home/$USER/node-red/backup.log 2>&1

Now backups will be created automatically.

Updating Node-RED and Docker Image

Updating Node-RED to the latest version in Docker Compose is very simple:

cd ~/node-red
docker compose pull node-red # Downloads the latest image version
docker compose up -d         # Recreates the container with the new image, preserving data

This command will first download the new Node-RED image, then recreate the container using this new image, but it will preserve all your data as it is stored in the persistent volume ./data.

Updating the Operating System and Docker

Remember to regularly update your operating system and Docker itself:

sudo apt update && sudo apt upgrade -y

This will ensure the security and stability of the entire system.

Which VPS configuration to choose for Node-RED under real load?

Choosing the optimal VPS configuration for Node-RED depends on the nature and intensity of your tasks. Underestimating requirements can lead to slow performance, delays, and failures, while overpaying for excessive resources can lead to unnecessary expenses. Let's consider typical scenarios and their corresponding recommendations.

Usage Scenarios and VPS Recommendations

1. Light Scenario (Testing, personal automation, a few simple flows)

  • Examples: Smart home management with a dozen devices, fetching RSS feeds, sending weather notifications, simple API integrations.
  • Load: Low CPU activity, minimal disk operations.
  • Recommended VPS Config:
    • CPU: 1 vCPU (2.0+ GHz)
    • RAM: 1 GB
    • Disk: 20-30 GB NVMe/SSD
    • Network: 100 Mbps
    • Estimated Cost: $5 - $10 per month.
  • Comment: This configuration is perfect for most home users and developers who need a stable platform for experiments and non-critical tasks. For example, for hosting Miniflux or FreshRSS along with Node-RED.

2. Medium Scenario (Dozens of flows, data processing, API gateways, web scraping)

  • Examples: Collecting data from dozens of sources, JSON/XML processing, creating custom APIs for mobile applications, integrating with databases, more complex logical chains.
  • Load: Moderate CPU activity, periodic peaks, frequent disk operations.
  • Recommended VPS Config:
    • CPU: 2 vCPU (2.5+ GHz)
    • RAM: 2 GB
    • Disk: 40-60 GB NVMe/SSD
    • Network: 200-500 Mbps
    • Estimated Cost: $10 - $20 per month.
  • Comment: This level is suitable for small businesses, startups, or advanced users who actively use Node-RED for business processes or more demanding projects.

3. Advanced Scenario (Hundreds of flows, high-load APIs, big data processing, multi-user systems)

  • Examples: Centralized automation platform for an enterprise, data collection and analysis from hundreds of IoT devices, high-load APIs, integration with corporate ERP/CRM systems, using Node-RED as a backend for web applications.
  • Load: High CPU activity, intensive disk operations, large amount of RAM for caching and data processing.
  • Recommended VPS Config:
    • CPU: 4+ vCPU (3.0+ GHz)
    • RAM: 4 GB+
    • Disk: 80 GB+ NVMe/SSD
    • Network: 500 Mbps - 1 Gbps
    • Estimated Cost: $20 - $40+ per month.
  • Comment: For such tasks, NVMe disk performance and sufficient RAM are critically important. It might be worth considering a dedicated server for maximum stability and performance.

Resource Monitoring and Scaling

After deploying Node-RED on a VPS, be sure to set up resource monitoring. Tools such as Netdata on VPS, Prometheus, or Grafana will help you track CPU load, RAM usage, disk operations, and network traffic. This will allow you to understand when resources become a bottleneck and it's time to scale your VPS.

Signs that you need more resources:

  • Slow response of the Node-RED web interface.
  • Delays in flow execution.
  • High CPU load (consistently above 80-90%).
  • Insufficient RAM (active SWAP usage).
  • Errors related to resource scarcity.

Start with a minimally sufficient configuration and scale it as your needs grow. Most VPS providers, including Valebyte.com, allow you to easily change your plan without reinstalling the system.

rocket_launch Quick pick

Need a dedicated server?

Compare prices from top providers. Configure and order in minutes.

Browse dedicated servers arrow_forward

Advanced Features and Node-RED Best Practices

After the basic installation and configuration of Node-RED on your VPS, you can consider additional steps to improve functionality, security, and ease of use.

User and Security Management

In the docker-compose.yml file, we set basic login and password. For more advanced security, you can:

  1. Use Hashed Passwords: Node-RED allows the use of hashed passwords. You can generate a hash by running Node-RED locally with node-red --generate-security-config or by using a special node in a flow. Then replace NODE_RED_PASSWORD with NODE_RED_PASSWORD_HASH in docker-compose.yml.
  2. Configure Multi-user Access: If Node-RED will be used by multiple teams or users, more complex authentication can be configured, for example, using external providers or additional nodes.
  3. Restrict Access by IP: Using firewall rules (UFW) on your VPS, you can allow access to port 443 (for HTTPS) only from specific IP addresses, if required.
  4. Enable HTTPS for API: If you are creating APIs with Node-RED, HTTPS will already work through the reverse proxy we configured. Make sure all internal calls are also secured.

Installing Additional Nodes

The Node-RED node library is vast and constantly growing. You can install new nodes directly from the editor's web interface (Menu -> Manage palette -> Install) or manually via the container's command line:

docker exec -it node-red bash
npm install node-red-contrib-telegrambot # Example of installing a Telegram node
exit
docker compose restart node-red

Installation via the web interface is usually preferred.

Logging and Debugging

For debugging Node-RED flows, use the debug node. It allows you to output messages to the editor's debug panel. For system logging, you can view the container logs:

docker compose logs -f node-red

This will help identify problems with Node-RED startup or errors not directly related to flow logic.

Project Management and Versioning

If you enabled NODE_RED_ENABLE_PROJECTS=true in docker-compose.yml, you can use Node-RED's built-in project management system. This allows you to link your flows to a Git repository, providing versioning, collaboration, and easy deployment of changes. This is especially useful for large projects and teamwork.

Optimizing Node-RED Performance

  • Efficient Node Usage: Avoid unnecessary operations. Group logic, use switch and function nodes for more compact and faster flows.
  • Asynchronous Operations: For long-running operations (e.g., requests to external APIs), use asynchronous approaches to avoid blocking Node-RED's main execution thread.
  • Caching: Use nodes for data caching if you frequently request the same data to reduce the load on external services and speed up flows.
  • Context Usage: Store data that is frequently used in flows in context (flow context or global context) to avoid repetitive calculations or requests.

Integration with other services on VPS

Your VPS can become a central point for many self-hosted applications. Node-RED integrates perfectly with other services. For example, you can use it for:

  • Managing files hosted via Filebrowser on VPS.
  • Automating data synchronization with Syncthing on VPS.
  • Sending notifications based on data from your Wiki.js.

The flexibility of a VPS allows you to create complex automation ecosystems where Node-RED acts as a connecting link.

Conclusion

Installing Node-RED on a VPS via Docker Compose provides a powerful, flexible, and scalable platform for automating any task, from smart homes to enterprise integrations. By following this guide, you will be able to deploy Node-RED, configure secure HTTPS access, and ensure its stable operation through regular backups and updates. Choosing the right VPS configuration on Valebyte.com will allow you to effectively use Node-RED under any load, guaranteeing the performance and reliability of your automation system.

Ready to choose a server?

VPS and dedicated servers in 72+ countries with instant activation and full root access.

Start now →
support_agent
Valebyte Support
Usually replies within minutes
Hi there!
Send us a message and we'll reply as soon as possible.