Self-host mqtt2discord
v1.0.0MQTT-to-Discord webhook bridge for topic notifications
docker run --rm -it --name $app -v "$PWD/src/config.json":/usr/src/bot/config.json registry.gitlab.com/opensource-auke/mqtt2discord/mqtt2discord:latest- Requires
- MQTT Broker
registry.gitlab.com/opensource-auke/mqtt2discord/mqtt2discordWhat is mqtt2discord?
mqtt2discord is a small Python bridge for homelab and IoT setups: it subscribes to MQTT topics on a broker you point it at and forwards each payload into a Discord channel using a channel webhook, which means you never register a Discord bot. Routing is many-to-many — you can add as many topic entries as you like, send several topics into the same channel, or fan one topic out to several channels, and each entry can optionally push a startup message. A heartbeat option can publish a JSON health summary (version, activity, send/receive counters) to a topic at a chosen interval, with an optional timezone for those timestamps. To run it yourself you copy config.json.sample to src/config.json and fill in broker host, port, optional username/password, timezone, heartbeat and topics; then either install the requirements with pip3 and run main.py, or use the container image from the GitLab registry (also mirrored on Docker Hub) with docker run, docker compose or Docker Swarm. The latest release is v1.0.0 from May 2022 and the repository's last activity is October 2023, and no licence file or licence statement is given in the sources.
mqtt2discord alternatives
Zigbee2MQTTOpen-source, self-hosted Zigbee-to-MQTT bridge that replaces proprietary vendor hubs, controlling thousands of devices via one USB coordinator and any MQTT broker.CompareZigbee2MQTT with mqtt2discord
mqttuiMQTTUI is a self-hosted, open-source web app for monitoring and automating MQTT infrastructure with multi-broker support, rules engine, and alerting.Comparemqttui with mqtt2discord
amcrest2mqttSelf-hosted open-source bridge that exposes all events from Amcrest cameras to an MQTT broker with built-in Home Assistant discovery support.Compareamcrest2mqtt with mqtt2discord
discord-rss-botSelf-hosted Discord bot that monitors RSS feeds and posts updates to channels in real-time with configurable intervals and Docker support.Comparediscord-rss-bot with mqtt2discord
matterbridgeSelf-hosted chat bridge daemon relaying channels between Discord, IRC, Matrix, Slack, Telegram, XMPP and Mattermost, with nickname spoofing, file relay and a REST API.Comparematterbridge with mqtt2discord
DockerDiscordControlA self-hosted open-source Discord bot and web dashboard for managing Docker containers remotely — control, monitor, and automate from chat.CompareDockerDiscordControl with mqtt2discord
broadlink-mqttSelf-hosted open-source MQTT client that bridges BroadLink smart home devices (RM, SP, A1, MP1, Dooya, BG1) to an MQTT broker for home automation integration.Comparebroadlink-mqtt with mqtt2discord
DashCordA self-hosted Discord bot that turns chat messages, file uploads, and button panels into webhook calls for automation tools like n8n, Make, Zapier, and Node-RED.CompareDashCord with mqtt2discord
Should you self-host mqtt2discord?
mqtt2discord scores 43/100 on selfhost.directory (how scoring works) and ranks #5 of 6 in Bridges.
There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.
Setup is moderate: expect some configuration beyond a single command. An official Docker image is available.
Its closest alternative on selfhost.directory is Matrix-Telegram bridge (65/100, 1 765 stars). It scores higher overall, so compare the two before you pick. See mqtt2discord vs Matrix-Telegram bridge side by side.
Features
- Heartbeat health-check
- MQTT authentication
- MQTT to Discord message relay
- Multiple topics to multiple channels
- Per-channel startup message
- Timezone for heartbeat timestampsDocumented as available from version 1.0.1
- Webhook-based delivery (no bot registration)
How to install mqtt2discord
Install mqtt2discord with Docker
docker run --rm \
-it \
--name $app \
-v "$PWD/src/config.json":/usr/src/bot/config.json \
registry.gitlab.com/opensource-auke/mqtt2discord/mqtt2discord:latest
Also documented for Docker compose (`docker compose up -d`) and Docker Swarm with the config passed as a swarm config.
More in Bridges
OpenCode Chat BridgeSelf-hosted open-source bot connecting ACP agents like OpenCode and Ferrum to Matrix, Slack, WhatsApp, Discord, Telegram, and a web widget with permission-based security.
Zigbee2MQTTOpen-source, self-hosted Zigbee-to-MQTT bridge that replaces proprietary vendor hubs, controlling thousands of devices via one USB coordinator and any MQTT broker.
iGotify-Notification-AssistentSelf-hosted bridge forwarding Gotify notifications to iOS via Apple's push service and SecNtfy, with end-to-end encryption and a native iOS app.
Matrix-Discord bridgeSelf-hosted open-source bridge connecting Matrix and Discord for using Matrix clients with Discord chats, featuring webhook relay and encryption.
Matrix IRC BridgeSelf-hosted, open-source IRC bridge that connects Matrix homeservers to IRC networks with two-way messaging, private messages, and dynamic channel mapping.
Matrix Signal bridgeA Matrix-Signal puppeting bridge
Matrix-Telegram bridgeSelf-hosted open-source bridge connecting Matrix and Telegram with puppeting, relaybot, and double puppeting support for seamless cross-platform messaging.
mautrix-gmessagesSelf-hosted Matrix bridge for Google Messages (RCS/SMS) with media, reactions, typing notifications, read receipts, and automatic portal creation.
mautrix-googlechatAn open-source, self-hosted Matrix bridge connecting Google Chat to Matrix for two-way messaging with media, threads, reactions, and multi-user support.
0 comments