Learn how to deploy Node-RED on AWS with our step-by-step guide. It walks you through launching the Meetrix Node-RED AMI with CloudFormation, pointing your domain at it, logging in to the editor, building and securing your first HTTP endpoint, backing up your flows, and keeping the server healthy once it runs.

Node-RED is an open-source, low-code tool for wiring together devices, APIs and online services. You build a flow by dragging nodes onto a canvas in the browser and connecting them, then deploy it with one click. It ships with MQTT, HTTP, WebSocket, TCP and UDP nodes, so it fits IoT data pipelines, REST integrations and scheduled jobs equally well. If you are choosing a visual builder for AI workflows rather than device and API plumbing, our comparison of Flowise, Langflow and n8n covers that side. The Meetrix image runs Node-RED 5.0.9 on Node.js 24 in Docker, on Ubuntu 26.04, behind an Nginx reverse proxy with automatic Let's Encrypt SSL and the editor login turned on.

Prerequisites

Before you get started with the Node-RED AMI, ensure you have the following prerequisites:

  • Basic knowledge of AWS services, including EC2 instances and CloudFormation.
  • An active AWS account with appropriate permissions.
  • An EC2 key pair in the region you will deploy to.
  • A domain name. If it is hosted on Route 53, the SSL certificate is created automatically.
  • If you encounter a vCPU quota error when launching the stack, follow https://meetrix.io/blogs/increase-aws-vcpu-quota/ to increase your vCPU limit.

Launching the AMI

Step 1: Find and Select Node-RED AMI

  1. Log in to your AWS Management Console.
  2. Navigate to 'Node-RED' in AWS Marketplace.

Step 2: Initial Setup & Configuration

  1. Click the "Continue to Subscribe" button.
  2. After subscribing, accept the terms and click "Accept Terms".
  3. Wait a few minutes until processing completes, then click "Continue to Configuration".
  4. Select "CloudFormation script to deploy Node-RED" as the fulfillment option and choose your region. Click "Continue to Launch".
  5. From the "Choose Action" dropdown, select "Launch CloudFormation" and click "Launch".

Create CloudFormation Stack

Step 1: Create a stack

  1. Ensure the "Template is ready" option is selected under "Prepare template".
  2. Click "Next".

Step 2: Specify stack options

  1. Provide a unique "Stack name".
  2. Enter the "AdminEmail" used for SSL certificate generation.
  3. Enter an "AdminPassword". This is the password for the Node-RED editor's admin user. It must be 8 to 64 characters long and can use letters, digits and the characters !@#%^*_+=.,- only.
  4. Leave "AmiId" as filled in by AWS Marketplace.
  5. Enter a value for "DeploymentName".
  6. Provide a public domain for "DomainName", such as nodered.example.com. Node-RED will automatically try to set up SSL if the domain is hosted on Route 53. If unsuccessful, you must set up SSL manually.
  7. Choose an instance type "InstanceType" (Recommended: t3a.small).
  8. Select your preferred "KeyName".
  9. Set "SSHLocation" to 0.0.0.0/0, or restrict it to your own IP range.
  10. Keep "SubnetCidrBlock" as 10.0.0.0/24.
  11. Keep "VpcCidrBlock" as 10.0.0.0/16.
  12. Click "Next".

Step 3: Configure stack options

  1. Choose "Roll back all stack resources" and "Delete all newly created resources" under "Stack failure options".
  2. Click "Next".

Step 4: Review

Review and verify the parameters you've entered.

CloudFormation Parameters list for the Node-RED stack showing AdminEmail, AdminPassword, AmiId, DeploymentName, DomainName, InstanceType set to t3a.small, KeyName, SSHLocation and CIDR blocks
  1. Tick "I acknowledge that AWS CloudFormation might create IAM resources with custom names".
  2. Click "Submit".
CloudFormation capabilities notice for IAM Policy and Role resources with the acknowledgement checkbox ticked

Afterward, you'll be directed to the CloudFormation stacks page. Please wait about 5 minutes until the stack status shows CREATE_COMPLETE. The stack only completes once Node-RED is running, so when it does, the editor is ready to use.

The IAM role the stack creates only allows Route 53 changes for the SSL certificate and the signal that tells CloudFormation the server is ready.

Update DNS

Step 1: Copy IP Address

Copy the public IP labeled "PublicIp" in the "Outputs" tab.

Node-RED CloudFormation stack Outputs tab listing DashboardUrl, DashboardUrlIp and PublicIp

Step 2: Update DNS

  1. Go to AWS Route 53 and navigate to "Hosted Zones".
  2. Click Create record.
  3. Add a record name matching the DomainName you entered, keep the record type as A, and paste the copied PublicIp into the value textbox.
  4. Click "Create records".
Route 53 Quick create record form with an A record for the Node-RED subdomain

Access Node-RED

Access Node-RED using the "DashboardUrl" in the Outputs tab. Until DNS and SSL are in place you can use "DashboardUrlIp" instead, which serves the editor over plain HTTP.

Note

If you receive a "502 Bad Gateway" error, wait approximately 5 minutes and refresh the page. Node-RED may still be starting.

On the login screen, enter the username admin and the AdminPassword you set in the stack parameters, then click "Login".

Node-RED login page served from the Node-RED domain with Username and Password fields

After logging in you land in the Node-RED editor. The first time, Node-RED opens a short tour of what is new in this version: step through it with "Next" or close it. The explorer on the left lists your flows, subflows and configuration nodes, with the palette of nodes below it. The canvas in the middle is where you build flows, the sidebar on the right shows node information and debug messages, and the "Deploy" button in the top-right corner puts your changes live.

Node-RED editor after first login showing the explorer sidebar tour, the node palette, an empty Flow 1 canvas and the Deploy button

Admin account

The admin user has full permissions. Anyone who can log in to the editor can run their own code on the server through function nodes, so keep the password private. To add more users or give someone read-only access, edit the adminAuth block in /opt/nodered/data/settings.js, then restart Node-RED.

Build Your First Flow

A quick way to see Node-RED working end to end is an HTTP endpoint that answers with JSON.

  1. In the palette, find the network category and drag an http in node onto the canvas. Double-click it, set Method to GET and URL to /hello, and click "Done".
  2. From the function category, drag a function node onto the canvas. Double-click it, paste the code below into the On Message tab, and click "Done".
  3. From the network category, drag an http response node onto the canvas.
  4. Wire the nodes in order: http in to function, and function to http response.
  5. Click "Deploy".
msg.payload = { message: "Hello from Node-RED", time: new Date().toISOString() };
return msg;

Call the endpoint from your own machine, replacing the domain with yours:

curl https://<your Node-RED domain>/hello

A JSON reply with the message and the current time means the flow is live. Add a debug node to any output to watch the messages that pass through it in the debug sidebar.

Install extra nodes

Open the main menu (the three lines in the top-right corner), choose "Manage palette" and open the "Install" tab to search for community nodes, such as database clients, dashboards or cloud service integrations. The Node-RED flow library lists what is available. Installed nodes are saved in /opt/nodered/data, so they survive restarts. Some community nodes use a lot of memory; if the server slows down after installing them, move to a larger instance type.

Protect Your HTTP Endpoints

The admin login protects the editor, but endpoints you build with http in nodes are public by default. Anyone who knows the URL of /hello above can call it. To require a username and password for every http in endpoint, set httpNodeAuth in settings.js. The official guide to securing Node-RED describes all the options.

Step 1: Create a password hash

Log in to the server over SSH (see Check Server Logs below), then generate a bcrypt hash of the password you want the endpoints to use:

cd /opt/nodered
sudo docker compose exec -T nodered node -e 'console.log(require("/usr/src/node-red/node_modules/bcryptjs").hashSync(process.argv[1], 10))' 'ENDPOINT-PASSWORD'

Step 2: Turn on httpNodeAuth

Open settings.js, find the commented-out httpNodeAuth line, remove the two slashes in front of it, and set your own user name and the hash from Step 1:

sudo nano /opt/nodered/data/settings.js
httpNodeAuth: {user:"api", pass:"<the hash from Step 1>"},

Step 3: Restart and test

cd /opt/nodered
sudo docker compose restart

curl -u api:ENDPOINT-PASSWORD https://<your Node-RED domain>/hello

The same request without -u now returns 401 Unauthorized.

Change the Admin Password

The admin password is stored as a bcrypt hash in /opt/nodered/.env. To change it, generate a new hash and restart the container:

cd /opt/nodered
HASH=$(sudo docker compose exec -T nodered node -e 'console.log(require("/usr/src/node-red/node_modules/bcryptjs").hashSync(process.argv[1], 10))' 'NEW-PASSWORD')
sudo sed -i "s;^NODE_RED_ADMIN_HASH=.*;NODE_RED_ADMIN_HASH='$HASH';" .env
sudo docker compose up -d

Replace NEW-PASSWORD with your new password, and avoid single quotes in it.

Back Up Your Flows

Everything Node-RED stores lives in /opt/nodered/data: settings.js, flows.json, flows_cred.json and the installed nodes. Back it up together with /opt/nodered/.env, because the credentials in flows_cred.json can only be decrypted with the NODE_RED_CREDENTIAL_SECRET in that file. Each deployment generates its own secret on first boot.

cd ~
sudo tar -czf nodered-backup-$(date +%F).tar.gz -C /opt/nodered data .env

Copy the archive off the server from your own machine:

scp -i <your key name> ubuntu@<Public IP address>:~/nodered-backup-*.tar.gz .

Exporting flows from the editor (Ctrl+E) gives you the flow JSON but leaves out credentials, so keep the server backup as well.

Generate SSL Manually

Node-RED will automatically try to set up SSL when a Route 53-hosted domain is provided. If it fails, the stack still completes and Node-RED stays on HTTP. Follow these steps to generate SSL manually.

Step 1: Copy IP Address

  1. Follow the Update DNS steps above, if not already done.
  2. Copy the Public IP indicated as "PublicIp" in the "Outputs" tab.

Step 2: Log in to the server

  1. Open the terminal and go to the directory where your private key is located.
  2. Run the following command, replacing the key name and IP address.
  3. Type "yes" and press Enter to confirm.
ssh -i <your key name> ubuntu@<Public IP address>
Terminal connecting to the Node-RED server over SSH and confirming the host fingerprint

Step 3: Generate SSL

Once your domain's A record points to the server, run the following command and follow the prompts:

sudo bash /root/certificate_generate_standalone.sh

Check Server Logs

Step 1: Log in to the server

ssh -i <your key name> ubuntu@<Public IP address>
Terminal connecting to the Node-RED server over SSH with a private key

Step 2: Check the logs

Node-RED runs in a Docker container named nodered. Check that it is running, then follow its logs:

sudo docker ps

sudo docker logs --tail 100 -f nodered

The log shows Node-RED starting each flow, errors from nodes that fail, and anything your function nodes write with node.warn or node.error. Press Ctrl+C to stop following it.

Shutting Down Node-RED

  1. In CloudFormation, click the link labeled "Instance" in the "Resources" tab to open the EC2 instance.
  2. Stop the Node-RED instance from the Instance state dropdown. You can restart it later as needed.
CloudFormation Resources tab with the EC2 Instance physical ID link EC2 Instance state dropdown with the Stop instance option

Note

While the instance is stopped, your flows stop too: HTTP endpoints do not answer, scheduled inject nodes do not fire, and MQTT subscriptions are disconnected. Node-RED starts them again automatically when the instance starts.

Remove Node-RED

Back up your flows first, then delete the CloudFormation stack from the AWS Management Console under "CloudFormation Stacks" by clicking "Delete". Deleting the stack removes the instance and everything in /opt/nodered/data. Remove the Route 53 record you created as well.

Upgrades

When a new version is available in AWS Marketplace, back up your flows, launch a new stack with the new version, and restore the backup into it. Copy the archive to the new server with scp, then run:

mkdir ~/restore && tar -xzf ~/nodered-backup-<date>.tar.gz -C ~/restore
cd /opt/nodered
sudo docker compose down
sudo rm -rf data && sudo cp -a ~/restore/data ./data && sudo chown -R 1000:1000 data
sudo sed -i "s;^NODE_RED_CREDENTIAL_SECRET=.*;$(grep '^NODE_RED_CREDENTIAL_SECRET=' ~/restore/.env);" .env
sudo docker compose up -d

This restores your flows, credentials and installed nodes, and carries the old credential secret over so the credentials still decrypt. The admin password stays the one you set on the new stack. Once you've checked the new server, remove the old stack and point your DNS record at the new PublicIp.

For a minor release you can also update the existing server in place. Back up first, check the Node-RED release notes for breaking changes, then set the new version and pull the image:

cd /opt/nodered
sudo sed -i "s;^NODE_RED_VERSION=.*;NODE_RED_VERSION=<new version>;" .env
sudo docker compose pull
sudo docker compose up -d

Troubleshoot

If you face vCPU quota limits, request an increase: How to increase AWS quota.

CloudFormation event showing CREATE_FAILED with a VcpuLimitExceeded error

If you face insufficient capacity errors while creating the stack, try another region or time.

CloudFormation event showing CREATE_FAILED with an InsufficientInstanceCapacity error

If the editor shows a 502 Bad Gateway error, Nginx is running but Node-RED is not answering. Right after launch, wait a few minutes and retry. Otherwise check the container with sudo docker ps and read its logs as shown above.

502 Bad Gateway error page served by nginx

If a flow or a community node crashes Node-RED as it starts, start it in safe mode, which opens the editor without running any flows, so you can fix or delete the broken node:

cd /opt/nodered
echo "NODE_RED_ENABLE_SAFE_MODE=true" | sudo tee -a .env
sudo docker compose up -d

After you fix the flow and click "Deploy", delete that line from .env and run sudo docker compose up -d again.

If the logs warn that credentials could not be decrypted, flows_cred.json was restored without its matching NODE_RED_CREDENTIAL_SECRET. Copy the secret from the .env file of the server the backup came from, as shown in Upgrades, or enter the credentials in the affected nodes again.

Check whether the instance storage is full. Log into the server and run:

df -h
df -h output showing usage of the root filesystem

If the root volume is between 90-100%, resize the EBS volume, then reboot and restart the service.

Conclusion

The Meetrix Node-RED Deployment Guide helps you run a low-code automation server in your AWS environment, with your flows and credentials on infrastructure you control. Whether you're an IoT engineer, a DevOps engineer, or a system integrator, this guide provides step-by-step instructions for a secure setup. See the Node-RED store page for what the Meetrix image includes. Node-RED often sits in the middle of other tools: our Grafana developer guide sets up dashboards for the sensor data your flows collect, the changedetection.io developer guide can send a webhook to an http in endpoint when a page changes, and the Flowise developer guide runs AI chatflows that a Node-RED flow can call over HTTP.

Technical Support

Reach out to Meetrix Support (aws@meetrix.io) for assistance with Node-RED issues.

Frequently Asked Questions

What is Node-RED?

Node-RED is an open-source, low-code tool for flow-based programming. You build flows in a browser editor by dragging nodes onto a canvas and wiring them together, then deploy them with one click. It is widely used for IoT data pipelines, MQTT messaging, REST API integrations, home and industrial automation, and event-driven workflows.

What are the login details for Node-RED?

Log in with the username admin and the AdminPassword you set in the CloudFormation stack parameters. The admin user has full permissions in the editor, so store the password securely.

Which instance type is recommended?

t3a.small (2 vCPU, 2 GB memory) is enough for typical integration and automation flows. Move to t3a.medium or larger for heavy message throughput, many dashboards, or memory-hungry community nodes.

Are my HTTP endpoints protected by the editor login?

No. The admin login protects the editor and its admin API, but endpoints you create with http in nodes are public by default. To require a username and password for them, set httpNodeAuth in /opt/nodered/data/settings.js, as described in this guide.

Where are my flows stored, and how do I back them up?

Flows, credentials, settings and installed nodes live in /opt/nodered/data on the instance. Back that folder up together with /opt/nodered/.env, because flows_cred.json can only be decrypted with the NODE_RED_CREDENTIAL_SECRET stored in that file.

How do I upgrade Node-RED?

When a new version is available in AWS Marketplace, back up your data, launch a new stack and restore the backup into it. You can also bump NODE_RED_VERSION in /opt/nodered/.env and pull the new Docker image on the existing server. Back up first either way.

How do I get technical support?

Reach out to Meetrix Support at aws@meetrix.io for assistance with Node-RED issues.

Ready to Deploy Your Own Node-RED?

Get started in minutes with our pre-configured AMI and run your IoT, API and automation flows on infrastructure you own.

Deploy Node-RED from AWS Marketplace