Mesh Guide
On this page

Meshtastic MQTT gateways#

A Meshtastic node with an internet connection can act as a gateway, passing mesh traffic to an MQTT server and back. Maps use it to show nodes, and meshes use it to link areas the radio can't reach.

MeshCore works differently

MeshCore's equivalent, an observer, only reports what it hears. It doesn't carry messages between meshes.

MQTT is set up per channel, with two switches, both off by default:

Uplink
Messages heard on this channel are sent to the MQTT server.
Downlink
Messages from the MQTT server are transmitted on this channel locally.

The node also needs an internet connection: Wi-Fi or Ethernet on boards that have it, or Proxy to Client, which uses your phone's connection instead.

The public server#

Leaving the server field blank uses Meshtastic's public server, mqtt.meshtastic.org. It has limits to keep it from flooding meshes:

  • Zero-hop. Traffic downlinked from the public server reaches nodes in direct range of the gateway, but isn't relayed further across the mesh.
  • Default-key traffic is filtered. On the default key, only text, node info, position, telemetry, map reports and routing pass through, and positions only at reduced precision.

What gets published#

Encryption. With Encryption enabled off, packets go to the server unencrypted, even on a channel with its own key. Turn it on unless you specifically want readable traffic on the server.

JSON output publishes decoded packets as readable JSON, unencrypted. It isn't available on nRF52 boards.

OK to MQTT, in the LoRa settings, tells gateways whether you're happy for your own packets to be uploaded. It's off by default. It only covers traffic on the default keys, and it's a request that gateways honor, not something enforced by encryption.

Map reporting, off by default, has your node publish its own details to the map every hour or less often: names, ID, approximate position, hardware model, role, firmware version, region, preset and primary channel name. Position precision defaults to about 1.5 km.

Getting on a map#

meshmap.net shows nodes heard by the public server. Your node appears if a node that uplinks to MQTT can hear it and you've turned on OK to MQTT. Your position needs a precision between 364 m and 23.3 km, so leave Precise location off. Nodes drop off after 8 hours without a position update.

Linking meshes#

Two gateways on the same channel and server can link meshes that are out of radio range of each other. Be careful with this:

  • Don't use the default key on a private server. Private servers don't enforce the public server's zero-hop rule, so default-key traffic from everywhere connected to that server can flood your local mesh.
  • Expect duplicates. Several gateways hearing the same packet all upload it. Anything reading from the server should drop duplicates by packet ID.
  • Ask first. Downlinking busy traffic into a mesh costs airtime for everyone in range of the gateway. Coordinate with your local mesh before running one.

The full settings are in Meshtastic's MQTT module and MQTT integration docs.