Welcome to the Meetrix Node-RED developer guide for Google Cloud Platform! It walks you through launching the Meetrix Node-RED image from GCP Marketplace, 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 GCP image runs Node-RED 5.0.9 on Node.js 24 in Docker, on Ubuntu 26.04, behind an Nginx reverse proxy with automated Let's Encrypt SSL and the editor login turned on. For what the image includes, see the Node-RED store page. If you run on AWS instead, the same product is covered in our Node-RED on AWS developer guide.
Prerequisites
Before you begin, make sure you have the following:
- Basic Google Cloud Platform knowledge, including Compute Engine.
- An active Google account with a GCP project and billing enabled.
- A domain name you can manage DNS records for.
Launch Node-RED from GCP Marketplace
Step 1: Find the Product
- Log in to your Google account.
- Go directly to the product page: Node-RED Low-Code Automation for IoT, APIs and Workflows on GCP Marketplace
- You can also browse all Meetrix products at the Meetrix Solutions Page.
- You will see the following product listing page. Click Launch.
Step 2: Accept the Agreement
- Select your GCP project from the project selector at the top.
- Tick the terms and agreements checkbox.
- Click AGREE.
Free Trial
This product includes a 5-day free trial with up to USD 50.00 in licence fee credits. To activate it, tick I accept the solution trial Terms and Conditions at the bottom of the deployment form before you click Deploy.
Trial note
Configure Your Node-RED Deployment on GCP
You will see the deployment configuration form. Fill in the fields across the following sections:
General
- Deployment name: A unique name for this deployment. The VM is named after it, with
-vmadded. - Deployment Service Account: Use an existing account that has the
roles/config.agent,roles/compute.adminandroles/iam.serviceAccountUserroles, or choose New account to have one created with them. - Zone: Select the GCP zone closest to your users or devices.
- Machine type: The default
e2-small(2 shared vCPUs, 2 GB RAM) is plenty for typical integration and automation flows. Choosee2-mediumor larger for heavy message throughput, many dashboards, or memory-hungry community nodes.
GCP shows an estimated monthly cost, made up of the Meetrix licence fee and the infrastructure fee for your machine type and disk, before you deploy.
Boot Disk
- Boot disk type: The default
Balanced Persistent Diskis recommended. - Boot disk size: The default and minimum is 20 GB, which is enough for Node-RED, its flows and a good number of community nodes.
Networking
- Network / Subnetwork: Leave as
defaultunless you have a custom VPC. - External IP: Leave as
Ephemeral, or choose a reserved static IP if you want the address, and your DNS record, to survive a stop and start of the VM. - Allow SSH (TCP port 22) from the Internet: Enabled by default. Restrict the Source IP ranges for SSH traffic field to your own IP range if you want to limit SSH access.
The deployment also opens ports 80 and 443 to the VM for the Node-RED editor and your HTTP endpoints. Node-RED itself listens on port 1880 on the VM's localhost only, so everything reaches it through Nginx. Leave Allow full access to all of Google Cloud Platform APIs on the VM unticked; Node-RED does not need it.
Application Settings
- Domain name: The domain for your Node-RED server (e.g.
nodered.yourdomain.com). Point your DNS A record to the VM's external IP after deploying. - Admin email: Used for SSL certificate registration via Let's Encrypt.
- Admin password: The password for the Node-RED editor's admin user. It must be 8 to 64 characters long and can contain only letters, digits and the characters
!@#%^*_+=.,-. Store it securely.
Tick the trial checkbox if you want the free trial, click Deploy, and wait a few minutes for the deployment to complete. Allow a few more minutes after that for the first boot, while the VM generates its own credential secret, sets your admin password and starts Node-RED.
Point DNS to Your Node-RED Server
Step 1: Get the External IP
- Once deployment is complete, click the VM instance resource name in the deployment details.
- Copy the External IP from the Network interfaces section.
Step 2: Create a DNS A Record
- Go to your DNS provider.
- Add an A record pointing your Node-RED domain (e.g.
nodered.yourdomain.com) to the copied external IP. - Wait for DNS propagation before proceeding (typically a few minutes to 1 hour).
DNS must propagate first
Access Node-RED
The deployment outputs list site_url, the VM's IP over plain HTTP, which works straight away. Once DNS has propagated and SSL has been issued, open your domain instead.
On the login screen, enter the username admin and the admin password you set in the Application Settings, then click Login.
502 Bad Gateway Error?
After logging in you land in the Node-RED editor. The explorer on the left lists your flows, subflows and global 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.
Admin account
Generate an SSL Certificate
Node-RED tries to issue SSL on first boot for the domain name you provided during deployment. If that failed, for example because DNS had not propagated yet, the editor stays on HTTP until you generate the certificate manually.
Step 1: SSH into the Server
- Go to the VM instance page in the GCP console.
- Click SSH to open a browser-based terminal and authorize access.
If you prefer your own terminal, you can connect with the gcloud CLI instead, replacing the deployment name and zone:
gcloud compute ssh <deployment-name>-vm --zone=<zone> Step 2: Run the Certificate Script
Once your domain's A record points to the server, run the pre-configured certificate script:
sudo bash /root/certificate_generate_standalone.sh This script runs certbot using the domain name and admin email you provided during deployment. When it completes, open https:// followed by your domain and log in.
Build Your First Flow
A quick way to see Node-RED working end to end is an HTTP endpoint that answers with JSON.
- 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.
- 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.
- From the network category, drag an http response node onto the canvas.
- Wire the nodes in order: http in to function, and function to http response.
- Click Deploy.
msg.payload = { message: "Hello from Node-RED on GCP", 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 machine 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
SSH into the server as shown above, 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
Node-RED has no database. Everything it 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 VM from your own machine, replacing the date, deployment name and zone. To keep it in Cloud Storage as well, upload it to a bucket you own:
gcloud compute scp <deployment-name>-vm:~/nodered-backup-<date>.tar.gz . --zone=<zone>
gcloud storage cp nodered-backup-<date>.tar.gz gs://<your-bucket>/nodered-backups/ The archive holds your credential secret and every credential your flows use, so keep the bucket private. Exporting flows from the editor (Ctrl+E) gives you the flow JSON but leaves out credentials, so keep the server backup as well.
Check Node-RED Server Logs
SSH into the server as shown above. 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.
The stack lives in /opt/nodered: docker-compose.yml defines the container, and .env holds the Node-RED version, the credential secret and the admin password hash. The first-boot setup runs as a Compute Engine startup script. If you cannot log in or SSL did not issue, check its output:
sudo journalctl -u google-startup-scripts.service | grep -i -E "node-red|ssl" A healthy first boot ends with Node-RED first boot done. A line saying SSL was skipped means the certificate needs the manual step above.
Manage Your Node-RED Deployment on GCP
Shut Down the VM
To stop the VM without deleting it, go to Compute Engine → VM Instances in the GCP console, select your instance, and click Stop. You can restart it later by clicking Start/Resume, and Node-RED starts again on its own.
Note
Delete the Deployment
Back up your flows first, then fully remove the deployment to stop all billing:
- Go to Solution deployments in the GCP console.
- Find your Node-RED deployment.
- Click Delete to remove the VM, its disk and the firewall rules the deployment created.
Deleting the disk also deletes everything in /opt/nodered/data. Remove the DNS record you created as well.
Upgrades
When there is an upgrade, we update the product with a newer version. You can check the product version in GCP Marketplace. If a newer version is available, back up your flows, deploy the product again with the newer version, and restore the backup into it. Copy the archive to the new VM from your own machine:
gcloud compute scp nodered-backup-<date>.tar.gz <new-deployment-name>-vm:~/ --zone=<zone> Then SSH into the new VM and 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 deployment. Once you've checked the new server, point your DNS record at its external IP and delete the old deployment.
For a minor release you can also update the existing VM 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 Node-RED on GCP
502 Bad Gateway
If the editor shows a 502 Bad Gateway error, Nginx is running but Node-RED is not answering. Right after deployment, wait a few minutes and retry. Otherwise check the container with sudo docker ps and read its logs as shown above.
Cannot Log In as Admin
Check that you are using the username admin and the password from the deployment form. If the startup script output contains could not hash the Node-RED admin password, the first boot did not set it; set a new password with the commands in Change the Admin Password.
SSL Did Not Issue
Confirm your DNS A record points at the VM's current external IP and has propagated, then re-run the certificate script from Generate an SSL Certificate.
A Flow Crashes Node-RED on Start
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.
Credentials Could Not Be Decrypted
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.
Storage Full Error
Community nodes and Docker images grow over time. SSH into the server and run:
df -h If the root volume is between 90-100%, resize the boot disk from the Compute Engine console, then reboot the instance.
Conclusion
You now have Node-RED running in your own GCP project, with SSL on your own domain, the editor behind a login, endpoints you can protect, and flows you can back up and restore with their credentials intact. Node-RED often sits in the middle of other tools: the Supabase on GCP developer guide sets up a Postgres database and REST API your flows can write sensor data and events to, the LocalAI on GCP developer guide runs an OpenAI-compatible API that a flow can call with an http request node, and our Grafana developer guide builds dashboards for the data your flows collect.
Technical Support
If you run into any issues, our support team is here to help. Reach out to us at support@meetrix.io and we will respond within 12 hours.
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.
How do I log in to Node-RED on GCP?
Open your domain, or the site_url from the deployment outputs before SSL is in place, and log in with the username admin and the admin password you set in the Application Settings section of the deployment form. The admin user has full permissions in the editor, so store the password securely.
Which machine type should I choose for Node-RED?
The default e2-small (2 shared vCPUs, 2 GB RAM) is enough for typical integration and automation flows. Move to e2-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 VM. 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. Copy the archive off the VM with gcloud compute scp.
Why did my Node-RED domain stop working after I restarted the VM?
With the default ephemeral external IP, GCP releases the address when the VM stops and assigns a new one when it starts, so your DNS A record points at the old IP. Update the record with the new external IP, or promote the address to a static IP under VPC network, IP addresses, so it never changes.
How do I upgrade Node-RED on GCP?
When a new version is available in GCP Marketplace, back up your data, deploy the new version 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 VM. Back up first either way.
Deploy Node-RED on GCP in Minutes
Launch a pre-configured Node-RED server in your own Google Cloud project with a Meetrix image, and run your IoT, API and automation flows on infrastructure you control.
Get Started on GCP Marketplace