Meshtastic: Node Location via MQTT

Meshtastic nodes can optionally publish telemetry and position data to the internet using MQTT. This allows geographically separated mesh networks to connect and enables public tools like MeshMap to visualize nodes worldwide.

MQTT acts as a bridge between local LoRa mesh networks and the internet. A node with internet connectivity can forward packets it hears to an MQTT broker where other nodes and services can consume the data.

However, MQTT should be treated as an optional extension rather than a core dependency. The primary design goal of the mesh is to remain fully autonomous and functional without any internet connectivity. MQTT is therefore best understood as an auxiliary tool for visualization, monitoring, and interconnection, not as a required part of the network.

Typical data flow

LoRa Mesh
Local radio network exchanging telemetry and position data

Gateway Node (Internet-enabled)
Forwards selected LoRa packets to MQTT

MQTT Broker (mqtt.meshtastic.org)
Central distribution hub using pub/sub model

Visualization Layer (MeshMap etc.)
Turns raw data into maps and insights

What MQTT Publishes

When MQTT is enabled, a Meshtastic node can publish several packet types:

  • node metadata (name, ID, hardware)
  • text messages
  • routing information
  • telemetry
  • position reports

These packets are forwarded to the MQTT broker as serialized MeshPackets so external tools can process them. Public maps simply subscribe to these MQTT topics and display nodes that publish position packets.
Requirements for Appearing on Public Maps

For a node to appear on maps like MeshMap, several conditions must be met.

  • MQTT uplink: A node must publish packets to an MQTT server.
  • Position packet: The node must broadcast a valid location.
  • Encryption rules: Position packets must be unencrypted or use the default channel key.
  • Position sharing: The node must explicitly allow publishing its location.

Maps only display nodes that send valid position packets through MQTT. If a node stops reporting, it will eventually disappear from the map after a period without updates.

MQTT Configuration

Before enabling MQTT, connect your gateway node to Wi-Fi. Configure the Wi-Fi credentials under the network settings:

  • network.wifi_ssid
  • network.wifi_psk
  • network.wifi_enabled

For the public Meshtastic MQTT service, the relevant MQTT settings are:

SettingPublic Meshtastic MQTT
MQTT enabledEnabled
Encryption enabledDisabled
JSON outputDisabled
TLSDisabled
Root topicmsh
Proxy to clientDisabled
Map reportingEnabled if the node should be visible on supported public maps
OK to MQTTEnabled
MQTT Servermqtt.meshtastic.org
Port1883

The exact options available may vary depending on the Meshtastic firmware version and client. In particular, Map Reporting is a separate MQTT function and should be enabled when the node is intended to appear on supported public Meshtastic maps.

Note: The public Meshtastic MQTT service uses specific restrictions and filtering rules. Do not use the public MQTT configuration as a template for private MQTT brokers without checking their requirements.

MeshHessen MQTT

MeshHessen operates its own MQTT infrastructure with network-specific settings. If you are using the MeshHessen network, follow their dedicated configuration guide instead of applying the public Meshtastic MQTT settings above.

See the MeshHessen MQTT documentation for the current configuration and access requirements.

Position Broadcasting

Location data is not sent with every message. Instead, nodes broadcast position packets at configurable intervals.
Typical settings:

  • Position broadcast interval: 10–30 minutes
  • GPS mode: Enabled for mobile nodes
  • Fixed position: Enabled for stationary nodes

These periodic broadcasts allow other nodes and MQTT services to track the node location over time.

Fixed Position for Stationary Nodes

Nodes without GPS hardware can still share location data. This is common for infrastructure nodes.
Typical use cases include:

  • rooftop nodes
  • relay nodes
  • gateways
  • home base stations

Example configuration:

  • Latitude: 49.8948
  • Longitude: 8.2855
  • Altitude: 210

Instead of GPS updates, the node periodically publishes the configured coordinates.

MQTT Network Restrictions

The public Meshtastic MQTT server applies several safeguards.

  • Zero-hop policy: Prevents MQTT traffic from endlessly propagating through LoRa meshes.
  • Traffic filtering: Prioritizes important packets such as telemetry, position, and routing.
  • Location precision filtering: Reduces coordinate accuracy when using the public channel.

These restrictions help keep the global network stable as the number of nodes increases.

Verification

After enabling MQTT and location broadcasting, the node should appear on public maps once position packets are received.
Common tools include:

These services visualize node positions received from MQTT.