> Source: https://meetrix.io/blogs/nodered-gcp-developer-guide/
> Markdown copy of that page. Cite the URL above, not this file.

Development

# Node-RED on GCP - Developer Guide

[By Binuka Ranatunga](https://meetrix.io/blogs/authors/binuka-ranatunga/) • November 16, 2026 • 14 min read

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](https://nodered.org/docs/) 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](https://meetrix.io/blogs/flowise-vs-langflow-vs-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](https://meetrix.io/store/node-red/). If you run on AWS instead, the same product is covered in our [Node-RED on AWS developer guide](https://meetrix.io/blogs/nodered-developer-guide/).

[

### Node-RED - Developer Guide

Deploy Node-RED on AWS with our step-by-step guide. Learn how to launch, configure, secure with SSL, and operate it reliably in your AWS environment.

By Binuka Ranatunga • Meetrix.io

](https://meetrix.io/blogs/nodered-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

1.  Log in to your Google account.
2.  Go directly to the product page: [Node-RED Low-Code Automation for IoT, APIs and Workflows on GCP Marketplace](https://console.cloud.google.com/marketplace/product/meetrix-public/nodered-low-code-automation)
3.  You can also browse all Meetrix products at the [Meetrix Solutions Page](https://console.cloud.google.com/marketplace/browse?filter=partner:Meetrix%20Pte%20Ltd&ref=meetrix.io).
4.  You will see the following product listing page. Click **Launch**.

![Node-RED Low-Code Automation for IoT, APIs and Workflows listing on GCP Marketplace by Meetrix Pte Ltd, showing the 5-day trial badge, the Launch button and the product overview](https://meetrix.io/blog-images/paas-dev-guides/nodered-gcp/nodered-gcp-1.png)

### Step 2: Accept the Agreement

1.  Select your GCP project from the project selector at the top.
2.  Tick the terms and agreements checkbox.
3.  Click **AGREE**.

![GCP Marketplace Agreements page with the project selected, the terms and agreements checkbox ticked, and the AGREE button](https://meetrix.io/blog-images/paas-dev-guides/nodered-gcp/nodered-gcp-2.png)

### 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.

![Checkbox to accept the Node-RED solution trial Terms and Conditions on GCP](https://meetrix.io/blog-images/paas-dev-guides/nodered-gcp/nodered-gcp-3.png)

Trial note

Infrastructure charges (VM, disk) still apply during the trial. Only the Meetrix licence fee is credited. You can cancel the trial at any time by deleting the deployment.

## Configure Your Node-RED Deployment on GCP

You will see the deployment configuration form. Fill in the fields across the following sections:

![New Node-RED deployment form on GCP showing the deployment name nodered-1, the deployment service account options with the roles it needs, the zone us-central1-a, the E2 machine series, and the product trial pricing](https://meetrix.io/blog-images/paas-dev-guides/nodered-gcp/nodered-gcp-4.png)

### General

-   **Deployment name**: A unique name for this deployment. The VM is named after it, with `-vm` added.
-   **Deployment Service Account**: Use an existing account that has the `roles/config.agent`, `roles/compute.admin` and `roles/iam.serviceAccountUser` roles, 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. Choose `e2-medium` or 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 Disk` is 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 `default` unless 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.

![Node-RED GCP networking settings with the default network and subnetwork, an Ephemeral external IP, and SSH allowed from 0.0.0.0/0](https://meetrix.io/blog-images/paas-dev-guides/nodered-gcp/nodered-gcp-5.png)

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.

![Lower half of the Node-RED GCP deployment form with the SSH firewall rule, the API access checkbox, the Application Settings fields for domain name, admin email and admin password, the trial checkbox and the Deploy button](https://meetrix.io/blog-images/paas-dev-guides/nodered-gcp/nodered-gcp-6.png)

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

1.  Once deployment is complete, click the VM instance resource name in the deployment details.
2.  Copy the **External IP** from the Network interfaces section.

![Network interfaces section of the GCP VM instance showing the default network, the internal IP and the ephemeral external IP address](https://meetrix.io/blog-images/paas-dev-guides/nodered-gcp/nodered-gcp-7.png)

### Step 2: Create a DNS A Record

1.  Go to your DNS provider.
2.  Add an **A record** pointing your Node-RED domain (e.g. `nodered.yourdomain.com`) to the copied external IP.
3.  Wait for DNS propagation before proceeding (typically a few minutes to 1 hour).

DNS must propagate first

The image requests the SSL certificate from Let's Encrypt on first boot, which verifies domain ownership over HTTP. With an ephemeral IP your DNS record usually does not exist yet at that point, so expect to run the certificate script once after DNS propagates, as shown in **Generate an SSL Certificate** below. If you reserved a static IP and pointed DNS at it before deploying, SSL is issued automatically.

## 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**.

![Node-RED login page served from a custom domain with empty Username and Password fields and the Login button](https://meetrix.io/blog-images/paas-dev-guides/nodered-gcp/nodered-gcp-9.png)

502 Bad Gateway Error?

If you see a "502 Bad Gateway" error, Node-RED is still starting up. Wait about 5 minutes and refresh the page.

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.

![Node-RED editor after first login showing the explorer with Flows, Subflows and Global Configuration Nodes, the common nodes in the palette, an empty Flow 1 canvas, the debug messages sidebar and the Deploy button](https://meetrix.io/blog-images/paas-dev-guides/nodered-gcp/nodered-gcp-10.png)

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. Avoid logging in over the plain HTTP site\_url once your domain has SSL, since the password would travel unencrypted.

## 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

1.  Go to the VM instance page in the GCP console.
2.  Click **SSH** to open a browser-based terminal and authorize access.

![GCP VM instance details page with the SSH button at the top and the Logs section listing Logging and serial port links](https://meetrix.io/blog-images/paas-dev-guides/nodered-gcp/nodered-gcp-8.png)

If you prefer your own terminal, you can connect with the gcloud CLI instead, replacing the deployment name and zone:

```bash
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:

```bash
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.

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**.

```javascript
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:

```bash
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](https://flows.nodered.org/) 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](https://nodered.org/docs/user-guide/runtime/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:

```bash
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:

```bash
sudo nano /opt/nodered/data/settings.js
```

```javascript
httpNodeAuth: {user:"api", pass:"<the hash from Step 1>"},
```

### Step 3: Restart and Test

```bash
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:

```bash
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.

```bash
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:

```bash
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:

```bash
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:

```bash
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

While the VM is stopped, your flows stop too: HTTP endpoints do not answer, scheduled inject nodes do not fire, and MQTT subscriptions are disconnected. An ephemeral external IP is released when the VM stops and a new one is assigned when it starts, so update your DNS A record afterwards, or promote the IP to a static address under **VPC network → IP addresses** first.

### Delete the Deployment

Back up your flows first, then fully remove the deployment to stop all billing:

1.  Go to **[Solution deployments](https://console.cloud.google.com/products/solutions/deployments)** in the GCP console.
2.  Find your Node-RED deployment.
3.  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:

```bash
gcloud compute scp nodered-backup-<date>.tar.gz <new-deployment-name>-vm:~/ --zone=<zone>
```

Then SSH into the new VM and run:

```bash
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](https://github.com/node-red/node-red/releases) for breaking changes, then set the new version and pull the image:

```bash
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:

```bash
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:

```bash
df -h
```

If the root volume is between 90-100%, [resize the boot disk](https://cloud.google.com/compute/docs/disks/resize-persistent-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](https://meetrix.io/blogs/supabase-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](https://meetrix.io/blogs/localai-gcp-developer-guide/) runs an OpenAI-compatible API that a flow can call with an http request node, and our [Grafana developer guide](https://meetrix.io/blogs/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](mailto: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](https://console.cloud.google.com/marketplace/product/meetrix-public/nodered-low-code-automation)

Meetrix Store

Node-RED

Low-code flows that wire together IoT devices, APIs and services

[Deploy it](https://meetrix.io/store/node-red/)

Meetrix Store New

Deploy what this guide covers, pre-configured.

-    [Node-RED Low-code flows that wire together IoT devices, APIs and services](https://meetrix.io/store/node-red/)
-    [Grafana Dashboards and alerts for Prometheus and more](https://meetrix.io/store/grafana/)
-    [Apache NiFi Real-time data pipelines with provenance](https://meetrix.io/store/apache-nifi/)
-    [Jitsi Meet Self-hosted video calls for 50 to 500 users](https://meetrix.io/store/jitsi-meet/)
-    [RustDesk Remote desktop AMI, a TeamViewer alternative](https://meetrix.io/store/rustdesk/)
-    [Coturn TURN/STUN for WebRTC, no per-minute relay fees](https://meetrix.io/store/coturn/)

[Browse all products](https://meetrix.io/store/)
