---
title: "Deploy Node-RED"
description: "Low-code flow editor for APIs, webhooks and IoT, with login and storage"
category: "Automation"
url: https://railway.com/deploy/node-red-5
---

# Deploy Node-RED

Low-code flow editor for APIs, webhooks and IoT, with login and storage

**[Deploy Node-RED on Railway](https://railway.com/template/node-red-5)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/node-red-5/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Automation

## Template content

### Node-RED https://nodered.org/about/resources/media/node-red-hexagon.png

- **Image:** nodered/node-red:5.0.9@sha256:2ccd38b4066648bd5e17430c50a2f8102c566a82fd4f2fc5c342e61664d6896f
- **Start command:** `/bin/sh -c 'mkdir -p /data/.railway && node -e "const f=\"/data/.railway/settings.js\",fs=require(\"fs\");fetch(\"https://raw.githubusercontent.com/aalfath/node-red-railway-template/1d9e3fd954286736fa94d4a994c760537887af27/settings.js\").then(r=>{if(!r.ok)throw Error(\"HTTP \"+r.status);return r.text()}).then(t=>fs.writeFileSync(f,t)).catch(e=>{console.error(\"[railway] settings.js download failed: \"+e.message);if(!fs.existsSync(f))process.exit(1);console.error(\"[railway] using the cached copy\")})" && exec node $NODE_OPTIONS node_modules/node-red/red.js --userDir /data --settings /data/.railway/settings.js'`
- **Health check:** /
- **Public domain:** Yes

## Documentation

# Deploy and Host Node-RED on Railway

Node-RED is an open-source, low-code programming tool for event-driven applications. You build flows in a browser editor by wiring together nodes for HTTP, MQTT, webhooks, schedules, databases and thousands of community add-ons, then deploy them with one click. It runs on Node.js and is an OpenJS Foundation project.

## About Hosting Node-RED

Node-RED is one Node.js process that serves the flow editor and any HTTP endpoints your flows create. Hosting it means keeping that process running, storing its user directory (flows, encrypted credentials and installed nodes) on persistent storage, and putting a login in front of the editor, because anyone who can use the editor can run code on the server. This template runs the official nodered/node-red 5.0.9 image, pinned by digest, with a Railway volume at /data. A small settings file turns on the editor login from variables, and Node-RED refuses to start without a password. The admin password and the credential encryption key are generated when you deploy.

## Common Use Cases

* Webhook and API glue: receive webhooks, reshape the data and call other services
* Home automation and IoT flows over MQTT, with dashboards and alerts
* Scheduled jobs and small integrations, such as polling an API and writing the results to a database or a chat channel

## Dependencies for Node-RED Hosting

* The official `nodered/node-red` Docker image (5.0.9)
* A Railway volume mounted at `/data`

### Deployment Dependencies

* [Node-RED Docker guide](https://nodered.org/docs/getting-started/docker)
* [Securing Node-RED](https://nodered.org/docs/user-guide/runtime/securing-node-red)
* [Node-RED settings file reference](https://nodered.org/docs/user-guide/runtime/settings-file)
* [Node-RED 5.0.9 release](https://github.com/node-red/node-red/releases/tag/5.0.9)
* [Template settings repo](https://github.com/aalfath/node-red-railway-template)

### Implementation Details

* Open the service's public domain and sign in as `admin` (the `NODE_RED_ADMIN_USER` variable) with the password from the service's `NODE_RED_ADMIN_PASSWORD` variable. You can replace the password with your own, in plain text or as a bcrypt hash, and redeploy.
* The editor and its admin API need that login. Endpoints you build with `http in` nodes are served on the same domain (for example `/hello`) and are public, so add your own checks where needed.
* Flows, credentials and nodes installed from the palette manager are stored in `/data` and survive redeploys.
* Keep `NODE_RED_CREDENTIAL_SECRET` unchanged after the first deploy, or Node-RED can't decrypt the credentials saved in your flows.
* At start-up, the service downloads its `settings.js` from [aalfath/node-red-railway-template](https://github.com/aalfath/node-red-railway-template) at a fixed commit and caches it on the volume. To change other settings, fork that repo and point the start command at your copy.
* `RAILWAY_RUN_UID=0` runs the container as root so Node-RED can write to the Railway volume.

## Why Deploy Node-RED on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Node-RED on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — Automate WhatsApp workflows with Evolution API, n8n, and Postgres.
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/node-red-5
