MQTT Overview & Setup
Meshtastic MQTT Gateway Overview
MQTT allows Meshtastic nodes to bridge the local LoRa mesh to the internet, enabling mesh messages to travel between physically separated mesh islands and feeding data into monitoring dashboards.
Hardware Requirements
Only ESP32-based devices with Wi-Fi can act as MQTT gateways:
- Heltec V3 / V4
- T-Beam
- T-Deck
- Station G2
nRF52-based devices cannot use MQTT - they lack Wi-Fi hardware. This includes most RAK Wireless modules and some Lilygo variants.
The gateway node must also have access to a Wi-Fi network at its location.
Public MQTT Broker
The Meshtastic project operates a free public broker:
mqtt.meshtastic.org
Topic Structure
msh/{region}/2/{encoding}/{channel_name}/{node_id}
The 2 segment is a fixed value in the Meshtastic MQTT protocol and does not change per channel. The {encoding} field is either e (encrypted protobuf, default) or json (human-readable JSON).
Example for a US node on channel 0 using JSON encoding on the LongFast channel:
msh/US/2/json/LongFast/!a1b2c3d4
Configuration via Meshtastic CLI
Enable JSON encoding (human-readable messages on the broker):
meshtastic --set mqtt.json_enabled true
Enable uplink on channel 0 (mesh → MQTT):
meshtastic --ch-index 0 --ch-set uplink_enabled true
Enable downlink on channel 0 (MQTT → mesh):
meshtastic --ch-index 0 --ch-set downlink_enabled true
Critical Warning: Only enable downlink on ONE node on your local mesh. If multiple nodes have downlink enabled, the same MQTT message will be injected into the mesh multiple times, causing duplicate messages and unnecessary channel congestion.
App Configuration Path
In the Meshtastic app: Radio Config → MQTT
- Enable MQTT: on
- Address:
mqtt.meshtastic.org - Root topic:
msh/US(replace US with your region code) - Username / Password: optional (public broker accepts anonymous)
- TLS: enabled recommended
No comments to display
No comments to display