Migrating MQTT from HA to external broker

Up to this point I used Home Assistant’s built in add-on for the MQTT broker.

While this works flawlessly I’m moving the MQTT Broker away from HA as I have more than 1 environments running. This way I don’t have to change the MQTT Broker address when I spool up a new instance for testing etc.

Installing a vanilla eclipse broker provides a mosquitto.conf which is essentially empty with all options commented.

Is there a way to “examine” my current mosquitto.conf so I can replicate this onto the new system?

Well the template is here. It passes your config to render it so it’s not exactly what is used at runtime but you can kind of figure it out.

If you want the exact runtime config you’d need access to the docker cli. Then you can go into the container with docker exec -it addon_core_mosquitto bash and look at it at /etc/mosquitto/mosquitto.conf.

Although be aware, the addon is more then just base mosquitto. You should take a look at the dockerfile to see all the dependencies. In particular it uses mosquitto-go-auth for authentication. You might not need that in an external broker.

Thanks. Was able to work back from the template. All good