ESP32 Self-Hosted IoT Platform: Your First MQTT Message in 15 Minutes The ThingBoot project published a guide showing how to connect a stock ESP32 to a self-hosted Mosquitto MQTT broker in about 15 minutes, using either the ThingBoot ESP Arduino SDK or plain Arduino with PubSubClient. The walkthrough covers publishing telemetry to topics like things/esp32-demo/telemetry and receiving commands back, with a Docker one-liner for launching the broker and mosquitto_sub/mosquitto_pub commands for testing. The project says a planned follow-up will let AI agents control devices via MCP. This article is cross-posted from the ThingBoot Guides https://github.com/Kevin-ThingBoot/thingboot-guides repository on GitHub, where you'll also find the Chinese version https://github.com/Kevin-ThingBoot/thingboot-guides/blob/main/guides/01-esp32-mqtt-platform.zh-CN.md . Most ESP32 tutorials stop at "blink an LED". Real products need the next step: get your device talking to a platform you own — not someone else's cloud. This guide walks you from a stock ESP32 to publishing telemetry and receiving commands over MQTT against a self-hosted broker. It takes about 15 minutes. php ESP32 --WiFi-- MQTT Broker self-hosted --- Your apps / dashboards / AI agents <-------- commands, OTA triggers ------ Self-hosting the broker means: your data stays on your network, you control auth, and AI agents can talk to devices through the same topics later. The fastest way to get a local broker: docker run -d -p 1883:1883 --name mosquitto eclipse-mosquitto Then create a minimal mosquitto.conf allowing local testing: listener 1883 allow anonymous true For production: always enable auth + TLS. See the OTA & safe-mode guide https://github.com/Kevin-ThingBoot/thingboot-guides/blob/main/guides/02-esp32-ota-production.md . Install the ThingBoot ESP Arduino SDK https://github.com/ThingBoot/thingboot-device-esp-arduino-sdk , which wraps WiFi provisioning, MQTT reconnect, and OTA into a setup /loop model. Or use plain Arduino with PubSubClient — the flow is the same: include