Meshtastic can use the MQTT protocol to bridge radio networks over the Internet, allowing gateway nodes in different locations to exchange messages, position reports, telemetry, and other data. A node connected to Wi-Fi or Ethernet can publish packets received over LoRa to an MQTT broker (server) and receive packets published by other gateways, linking otherwise separate local meshes across much greater distances.
The Meshtastic project operates a public MQTT service for general use, but it has restrictions intended to control traffic and prevent Internet-delivered packets from overwhelming local radio networks. Most notably, the public service applies a zero-hop policy to packets entering the mesh from MQTT. Those packets may be transmitted by the gateway radio itself, but they are marked so that neighboring Meshtastic nodes will not relay them farther over RF. The public service may also filter traffic, limit which topics or regions can be used, and reduce the precision of position data carried on certain public channels.
For most setups, users should:
Leave the MQTT module disabled
Configure the LoRa module to Ignore MQTT: No, and OK to MQTT: Yes
This will allow communication with other MQTT gateways already on the mesh.
Users who need more control can operate their own private MQTT broker. A private server can use custom topics, authentication, private channel keys, and routing policies appropriate for a particular club, community, or regional network.
It can also be configured to permit limited RF relaying of MQTT-originated packets, although operators should use conservative hop limits and careful traffic management to avoid congesting the relatively low-bandwidth LoRa channel.
Ignore MQTT tells your node to ignore stations originating from MQTT links, and OK to MQTT tells other nodes that it's okay to relay your traffic over MQTT.
Meshtastic users who need more control over MQTT traffic can run their own MQTT broker. With access to a compatible OS environment and the Docker container management platform, Eclipse Mosquitto can provide custom MQTT services for private and public meshes. Here's a good Mosquitto deployment guide. Use care when establishing hop limits and other network policies to minimize congestion.
By enabling UDP Broadcast in the radio's Network configuration, two or more nodes on the same WiFi or Ethernet LAN can communicate with one another without sending traffic to the LoRa mesh. This works regardless of the LoRa preset, frequency, or slot being used by each individual radio: a LongFast radio can talk to a MediumFast radio, for example. (WiFi considerably increases power consumption.)