Guide · Intermediate · Raspberry Pi
Tool Review: Mosquitto as a Workshop MQTT Broker
Why a boring Mosquitto install on a Pi beats cloud IoT dashboards for a home lab full of ESP32 nodes.
Project template
- Goal & materials
- Steps / firmware
- Troubleshooting
- AI assist notes
- Related gear & books
If your ESP32 nodes need to talk to a Pi without shipping telemetry to a random cloud, Eclipse Mosquitto is still the sensible workshop default.
Why Mosquitto
- Lightweight on a Pi
- Easy to test with
mosquitto_pub/mosquitto_sub - Plays well with Home Assistant later without forcing HA on day one
Minimal lab install
sudo apt install -y mosquitto mosquitto-clients
sudo systemctl enable --now mosquitto
mosquitto_sub -h localhost -t 'lab/#' -v
Security: open MQTT without auth on a WAN interface is a gift to the internet. Lab VLAN + auth before any port forward. See also Network Ninja thinking on segmentation.
ESP32 side
Publish sensor JSON to lab/room1/bme; subscribe to lab/room1/relay. Keep payloads boring and versioned.
Build path: Pi + ESP32 mesh guide · Pi first weekend checklist.