# Self-host Node-RED

> Low-code tool for building event-driven flows that collect, transform and visualize data, edited in a browser. Run your own Node-RED on an always-on EnvHaven workspace by asking its coding agent: one request installs it, puts it on an HTTPS address and locks it down. What the agent takes care of, and the manual route.

_Updated November 23, 2026_

Running your own Node-RED usually means a list of server chores: a machine that stays on, Docker or a runtime, a reverse proxy with certificates, a domain, and the settings that make Node-RED behave behind all of it. On an EnvHaven workspace you skip the list. You ask the coding agent, and it does the work while you watch.

## Just ask your agent

Open a Hobby workspace, tap **Launch** to start any coding agent (Claude Code, Codex, OpenCode or another), and ask it:

```text
Set up Node-RED on this workspace and give me the link. Follow https://envhaven.com/self-host/node-red.md
```

Then open the link it sends and create your Node-RED account straight away, before anyone else finds the address. That is the whole request: the address in it is this page's Markdown copy, and the agent follows the instructions for it further down, with every setting Node-RED's docs require.

## Or keep it private with Tailscale

The preview URL puts Node-RED on the public internet, which suits something other people need to reach. For an app only you and your household use, your tailnet is the better home: Tailscale gives Node-RED an HTTPS address that only your own devices, signed in to your Tailscale account, can open. Save a Tailscale auth key in the workspace's **Vars** pane as `TS_AUTHKEY`, and ask the agent:

```text
Set up Node-RED on my tailnet instead of the preview URL. Follow https://envhaven.com/self-host/node-red.md and https://envhaven.com/guides/self-host-privately-with-tailscale.md
```

- On Plus and Pro, a Tailscale container runs beside Node-RED, so it keeps its private address through workspace restarts and updates, and every app you set up this way gets an address of its own.
- On Hobby, Tailscale runs in the workspace beside Node-RED; after a restart or an update, ask the agent to start both again.
- Anything other services have to reach, such as a webhook, still needs a public address. [Keep self-hosted apps private with Tailscale](https://envhaven.com/guides/self-host-privately-with-tailscale) covers both, and what Tailscale's free plan includes.

| At a glance |  |
| --- | --- |
| What it is | Automation and workflows |
| License | Apache-2.0 |
| Runs as | Docker (`nodered/node-red`) or a native install |
| Memory | Not documented |
| Plan that fits | Hobby or larger |
| Web port | 1880 |
| Documentation | [nodered.org/docs/getting-started/](https://nodered.org/docs/getting-started/) |

## What your agent takes care of

- **Installing it.** Node-RED runs from the official image, `nodered/node-red`, with its data in folders under `~/apps/node-red`, or without Docker on Hobby.
- **Putting it on an HTTPS address.** The workspace's preview URL serves it, and your own domain can too.
- **Locking it down first.** What Node-RED's docs say to set before it faces the internet, below.
- **Telling you what to back up**: /data in the Docker image (the user directory) and $HOME/.node-red by default when installed natively (userDir) ([docs](https://github.com/node-red/node-red-docker/blob/main/README.md)).

### The settings it needs behind a proxy

- httpAdminRoot: Root URL of the editor and admin API (default /). Setting it to false disables all admin endpoints. ([docs](https://nodered.org/docs/user-guide/runtime/configuration))
- httpNodeRoot: Root URL for nodes that provide HTTP endpoints, such as HTTP In (default /). ([docs](https://nodered.org/docs/user-guide/runtime/configuration))
- uiHost: Interface the runtime listens on (default all IPv4 interfaces); standalone mode only. ([docs](https://nodered.org/docs/user-guide/runtime/configuration))
- https: Lets Node-RED serve HTTPS itself, with key and cert in PEM format; the docs describe this as the way to get HTTPS access and describe no reverse-proxy setup. ([docs](https://nodered.org/docs/user-guide/runtime/configuration))
- requireHttps: Redirects insecure HTTP connections to HTTPS (commented out in the default settings.js). ([docs](https://github.com/node-red/node-red/blob/5.0.10/packages/node_modules/node-red/settings.js))
- httpServerOptions: Passes custom options to the Express.js server Node-RED uses; the docs name no trust-proxy or forwarded-header setting. ([docs](https://github.com/node-red/node-red/blob/5.0.10/packages/node_modules/node-red/settings.js))

### Before it faces the internet

- The editor has no authentication by default; anyone who can reach it can deploy changes. ([docs](https://nodered.org/docs/user-guide/runtime/securing-node-red))
- Enable adminAuth in settings.js with bcrypt-hashed passwords; the sample user in the docs has the password password, so use your own hash (generate with node-red admin hash-pw). ([docs](https://nodered.org/docs/user-guide/runtime/securing-node-red))
- Set credentialSecret yourself: credentials are encrypted with a generated key by default, and changing the secret later makes existing credentials unreadable. ([docs](https://github.com/node-red/node-red/blob/5.0.10/packages/node_modules/node-red/settings.js))

## Things to ask next

Everything after the install is one more sentence to the agent. Some that come up:

- "Build a workflow that posts each new GitHub issue in my repo to Slack."
- "Add the credentials it needs from my Vars pane, and test the workflow once."
- "Move Node-RED to app.example.com." Add the domain on the dashboard's Domains page with a CNAME to `domains.envhaven.app`, and the agent changes Node-RED's address settings to match.
- "Update Node-RED to the latest release." It pulls the new image and recreates the container, data kept.

## Instructions for the agent

The agent reads these from the page's Markdown copy. They also work pasted on their own, if you would rather give them in your own words.

```text
Set up Node-RED on this workspace and serve it at my preview URL.
- Where Docker has a daemon (Plus and Pro), use Docker Compose with the official image, nodered/node-red, starting from the docs' compose file: https://nodered.org/docs/getting-started/docker#docker-stack--docker-compose. If `docker compose` is missing, install the Compose plugin into ~/.docker/cli-plugins first.
- Keep the compose file in ~/apps/node-red and all of its data in folders there (bind mounts, not named volumes), with restart: unless-stopped on every service.
- This server has no firewall, so publish no port on its public IP, and drop host networking and privileged mode from the docs' compose file. Docker runs on the host: connect this workspace to the compose network and relay my preview URL's port to Node-RED's port 1880.
- Without Docker (on Hobby, where Docker has no daemon), install it as its docs describe, with `npm install -g node-red`, then `node-red` (Node.js 22 or newer for Node-RED 5.x (18 or newer for 4.x); Node-RED recommends Node.js 24.x), into ~/apps/node-red with its data, so it survives workspace updates; global installs and system paths do not. Run it in a tmux window named node-red, listening on 0.0.0.0:1880, and point my preview URL at port 1880.
- The preview URL terminates HTTPS in front of Node-RED: serve plain HTTP on its port, and trust the forwarded headers the relay passes on.
- Set what "The settings it needs behind a proxy" lists on https://envhaven.com/self-host/node-red.md for the preview URL, as Node-RED's docs describe for running behind a proxy; skip any that apply only when Node-RED serves HTTPS itself.
- Before the preview URL serves it, apply what "Before it faces the internet" lists on https://envhaven.com/self-host/node-red.md.
- When it answers at the preview URL, send me the link and tell me what to back up.
- If I asked for my tailnet instead of the preview URL, set Node-RED up the same way but follow https://envhaven.com/guides/self-host-privately-with-tailscale.md for the network: no preview URL, no relay.
```

## What to know

- In Docker, Node-RED's containers keep running when the workspace restarts or updates. The relay from the preview URL is a process in the workspace, so after a restart or an update, ask the agent to restore it.
- Without Docker, Node-RED runs as a process in the workspace, so after a restart or an update, ask the agent to start it again.
- HTTP requests to the runtime API are capped at 5mb by default. ([docs](https://github.com/node-red/node-red/blob/5.0.10/packages/node_modules/node-red/settings.js))
- The tcp in node can connect to a remote TCP port or accept incoming connections. ([docs](https://github.com/node-red/node-red/blob/5.0.10/packages/node_modules/@node-red/nodes/locales/en-US/network/31-tcpin.html))
- The udp in node produces a msg.payload from received UDP messages and supports multicast. ([docs](https://github.com/node-red/node-red/blob/5.0.10/packages/node_modules/@node-red/nodes/locales/en-US/network/32-udp.html))
- The Snap package runs in a container without gcc, git or access to external commands, so it is not recommended for most uses. ([docs](https://nodered.org/docs/getting-started/local))
- A workspace has one preview URL and one custom domain, both serving the same port, so it puts one app on a public address at a time.

## Without a workspace

The manual route, on a server you run:

1. Rent a Linux VPS, secure SSH, and create a user for the app.
2. Install Docker and write a compose file from the official image.
3. Put a reverse proxy in front (Caddy, nginx or Traefik), get certificates, and point a domain at the server.
4. Set the proxy settings listed above for that domain, and pass WebSocket upgrades through the proxy if the app uses them.
5. Keep the firewall closed except for the proxy, and schedule backups and updates.

Node-RED's own [documentation](https://nodered.org/docs/getting-started/) covers each step for its install methods.

## Sources

Facts about Node-RED come from its own documentation, checked on 2026-11-23:

- [nodered.org/docs/getting-started](https://nodered.org/docs/getting-started/)
- [github.com/node-red/node-red-docker/blob/main/README.md](https://github.com/node-red/node-red-docker/blob/main/README.md)
- [nodered.org/docs/faq/node-versions](https://nodered.org/docs/faq/node-versions)
- [nodered.org/docs/user-guide/runtime/configuration](https://nodered.org/docs/user-guide/runtime/configuration)
- [github.com/node-red/node-red/blob/5.0.10/packages/node_modules/node-red/settings.js](https://github.com/node-red/node-red/blob/5.0.10/packages/node_modules/node-red/settings.js)
- [github.com/node-red/node-red/blob/5.0.10/packages/node_modules/@node-red/nodes/locales/en-US/network/31-tcpin.html](https://github.com/node-red/node-red/blob/5.0.10/packages/node_modules/@node-red/nodes/locales/en-US/network/31-tcpin.html)
- [github.com/node-red/node-red/blob/5.0.10/packages/node_modules/@node-red/nodes/locales/en-US/network/32-udp.html](https://github.com/node-red/node-red/blob/5.0.10/packages/node_modules/@node-red/nodes/locales/en-US/network/32-udp.html)
- [nodered.org/docs/getting-started/local](https://nodered.org/docs/getting-started/local)
- [nodered.org/docs/user-guide/runtime/securing-node-red](https://nodered.org/docs/user-guide/runtime/securing-node-red)

## Keep reading

- [Self-host any app with your agent](https://envhaven.com/self-host)
- [Self-host n8n](https://envhaven.com/self-host/n8n)
- [Self-host Activepieces](https://envhaven.com/self-host/activepieces)
- [Self-host Windmill](https://envhaven.com/self-host/windmill)
- [Self-host Huginn](https://envhaven.com/self-host/huginn)
- [AI agent hosting](https://envhaven.com/guides/ai-agent-hosting)

Source: https://envhaven.com/self-host/node-red
