More than one MQTT broker?

Is it possible to use more than 1 MQTT broker?

Having tried and failed to set up a local broke with SSL/nginx reverse proxy, I thought perhaps I’d use CloudMQTT for my phones, and then run a LAN-only broker on my server for local devices.

You probably want to look into bridging. Connect your home assistant to your LAN-only broker and setup a bridge between that LAN broker and your CloudMQTT instance.

https://mosquitto.org/man/mosquitto-conf-5.html (Configuring Bridges)

The hard part seemed to be getting encryption working though, which I’d still have to do if I bridged?

Ideally I wanted to get my MQTT broken running behind nginx like I do for HASS but just couldn’t find any clear instructions on how to get it working :frowning:

When this question arises I always point to these instructions. They are rather old, and don’t use a proxy, but I think everything will still work

1 Like

Thanks - I’ll have a look at that and see if I can get it to work - looks easier than trying to get owntracks to go straight to my local server

OMG I think it actually worked!!! Thanks so much :smiley:

1 Like

I didn’t bother with the proxy given the broker is just connecting out to cloudmqtt over SSL.

I have more that 1 MQTT Broker to which I want to subscribe to, don’t see my answer above, what I see is having one subscribe to another, other words the subscriber basically creates a copy of the other broker in addition to it’s own topics ??
Would be nicer if I can specify 2 independent brokers ?
G

I don’t think Hass supports more than 1 MQTT broker

… hope someone in development sees this thread, do believe it could be of major use to be able to specify/configure multiple mqtt brokers that can provide data.

G

4 Likes