MQTT broker (Aedes)¶
Alongside the core mqtt in / mqtt out nodes (which connect to a
broker), this gateway also ships node-red-contrib-aedes — an
embeddable MQTT broker node. Drop an aedes broker node into a flow and
the gateway itself becomes an MQTT broker other devices and services can
connect to, no separate broker software required.
Double-click the node to configure it, across three tabs.
Connection¶

| Field | Notes |
|---|---|
| MQTT port | The standard MQTT TCP port — 1883 by default |
| WS bind | Whether the WebSocket listener is exposed as a URL path or a separate port |
| WS port | Enables MQTT-over-WebSocket on this port; leave blank to disable WebSocket support entirely |
| Enable secure (SSL/TLS) connection | Wraps the broker in TLS |
Persistence¶

| Field | Notes |
|---|---|
| Persistence | Memory (default) or MongoDB |
| Persist state across restarts | Saves retained messages and subscriptions as a JSON file in the Node-RED user directory |
With persistence on, the broker writes that JSON file on shutdown and every 60 seconds. QoS 1/2 in-flight messages are not persisted, and persistence is disabled automatically if the user directory isn't writable.
Security¶

| Field | Notes |
|---|---|
| Username | Leave blank to disable authentication |
| Password | Leave blank to disable authentication |
Anonymous access by default
With Username and Password both blank — the default — any device that can reach the configured MQTT port can connect and publish/subscribe with no credentials. Set both fields if the broker is reachable beyond a trusted local network.
Using it¶
Once deployed, any node that talks MQTT — this gateway's own mqtt in /
mqtt out nodes, or an external device/service — can connect to
<gateway-ip>:<MQTT port> as if it were talking to any other MQTT broker.
This is useful for collecting readings from field devices that publish over
MQTT directly (rather than being polled over Modbus — see
Modbus / PLC integration), or as a local message bus
between flows without routing everything through a cloud broker.