Node-RED, always on.
This server runs Node-RED 5. It saves your flows to a database, so they survive restarts, and keeps itself awake on free hosting.
What's running here
Everything below is set up by environment variables on the server. You don't need to change any code.
- Flow editor
- At
/red. It asks for a username and password when the server has them set. - Storage
- Flows, credentials and settings are saved to Turso or PostgreSQL, so they survive restarts and redeploys. With no database set, they're saved to a local
flows.json. - Stays awake
- On Render, the app requests its own address every 10 minutes so the free plan doesn't put it to sleep.
- Theme
- The editor follows your system's light or dark setting. Change it any time in the editor's settings.
Run your own
Free accounts on Turso and Render are enough to keep one Node-RED running all month.
-
Create a Turso database
Sign up at app.turso.tech, create a database, then copy its URL and create a token for it.
-
Sign in to the editor
When the deploy finishes, open
https://<your-app>.onrender.com/redand sign in. Your flows are saved to Turso every time you deploy them.
Make it yours
Common changes, and where to make them.
Add nodes
Install them from Manage palette in the editor menu. To keep them across rebuilds, also add the package to package.json. Browse nodes in the Node-RED library.
Turn on the editor login
Set NODE_RED_USERNAME and NODE_RED_PASSWORD in your host's environment settings, then restart.
Replace this page
Put your own files in public/. They're served from the site root.
Serve the editor at the root
In settings.js, remove httpStatic and set httpAdminRoot to "/".