Meshtastic Channels & MQTT
Channels control who can read your messages. MQTT publishes that traffic to the internet. This page covers both.
How Channels Work
Every Meshtastic device has a primary channel and can have up to 7 secondary channels. Channels define who can read your messages — anyone with the same channel name and encryption key (PSK) can participate.
Out of the box, all Meshtastic devices ship on the same default channel with a known PSK. This is intentional — it lets new users discover each other. But it means anyone with a Meshtastic device can read default channel traffic.
For private communication, create a channel with a custom PSK and share it only with your group.
Primary Channel (Index 0)
The main channel your device uses for broadcast messages and node discovery. Position and telemetry data are sent on this channel.
Secondary Channels (Index 1-7)
Additional channels for separate conversations. Common uses: private group chat, emergency channel, admin channel for remote management.
Channel Configuration
Via the Meshtastic App
- 1 Go to Settings → Channels
- 2 Tap the primary channel to edit its name and encryption key
- 3 Tap "Add Channel" to create secondary channels
- 4 Use the QR code button to share channel config with others
Via Python CLI
# Set primary channel name
meshtastic --ch-index 0 --ch-set name "NoDakMesh"
# Generate a random encryption key
meshtastic --ch-index 0 --ch-set psk random
# Or set a specific base64-encoded key
meshtastic --ch-index 0 --ch-set psk base64:yourKeyHere==
# Add a secondary channel
meshtastic --ch-add "Emergency"
See the CLI guide for complete channel management commands.
About Encryption (PSK)
Meshtastic uses AES-256 encryption. Each channel has its own pre-shared key (PSK). The default PSK is publicly known — it provides no privacy. For private communication:
- Generate a random PSK for your group
- Share it via QR code (in person) or a secure side channel
- All devices on the channel must use the same PSK
- Changing the PSK immediately locks out anyone without the new key
Common Channel Setups
Public Community Channel
Anyone with Meshtastic can join. Fine for local chatter, not for anything you'd mind a stranger reading.
# Default channel uses default PSK
meshtastic --ch-index 0 --ch-set psk default
Private Group Channel
Custom PSK for your family, team, or organization. Only devices with the key can decrypt messages.
# Random key for privacy
meshtastic --ch-index 0 --ch-set psk random
Admin Channel
A special secondary channel for remote device management. Allows you to change settings on remote nodes without physical access. Use a strong PSK — anyone with admin channel access can reconfigure your devices.
meshtastic --ch-add "admin"
Range Test Channel
A dedicated channel for running range tests without cluttering your main channel. The range test module sends periodic messages and logs results.
meshtastic --ch-add "RangeTest"
Sharing Channels via QR Code
The easiest way to get someone on your channel is to share a QR code. The Meshtastic app generates QR codes that encode the channel name, PSK, and settings.
- 1. Open the Meshtastic app → Channels
- 2. Tap the share/QR icon on the channel you want to share
- 3. Have the other person scan the QR code from their app
Via CLI: meshtastic --qr generates a QR code in the terminal.
Security Note
QR codes contain your encryption key. Share them in person or via a secure channel. Don't post QR codes publicly unless you want anyone to join. A QR code posted on social media is the same as publishing your encryption key.
MQTT Integration
MQTT bridges your LoRa mesh to the internet. Nodes with Wi-Fi (ESP32 devices) publish mesh traffic to an MQTT broker — from there you can monitor remotely, bridge distant meshes, or pipe data into Home Assistant.
How It Works
Uplink
LoRa mesh → MQTT broker. Mesh messages are published to the internet.
Downlink
MQTT broker → LoRa mesh. Internet messages are injected into the mesh.
Bridge
Two mesh networks connected via internet using the same MQTT broker.
Enabling MQTT
MQTT requires Wi-Fi connectivity, so it only works on ESP32-based devices (Heltec, T-Beam, T-Deck, Station G2).
# Enable Wi-Fi
meshtastic --set network.wifi_enabled true
meshtastic --set network.wifi_ssid "YourNetwork"
meshtastic --set network.wifi_psk "YourPassword"
# Enable MQTT
meshtastic --set mqtt.enabled true
meshtastic --set mqtt.address mqtt.meshtastic.org
# Enable uplink on your channel
meshtastic --ch-index 0 --ch-set uplink_enabled true
Public vs self-hosted: The default Meshtastic MQTT broker (mqtt.meshtastic.org) is public and free. For privacy, run your own broker using Mosquitto, HiveMQ, or similar. Set the mqtt.address to your broker's address.
MQTT Topic Structure
Meshtastic publishes to topics following this pattern:
Format: msh/{region}/{channel_index}/{encoding}/{channel_name}/{node_id}. JSON encoding is human-readable; protobuf encoding is more compact.
What People Actually Use It For
Most people start with remote monitoring — checking node battery and signal from home instead of driving out to the site. From there, it's common to bridge two meshes in different towns via a shared broker, pipe sensor data into Home Assistant for automations (like alerting when a node goes offline), or build Grafana dashboards that track signal quality trends over weeks.