Seperate MQTT server / 2 Home Assistant instances

I am considering running a standalone mqtt server, and have 2 instances of Home Assistant connected to it. One DEV instance for testing and development and one PROD instance that will only receive changes after they’ve been tested on the DEV instance.

I will be running Eclipse Mosquitto in a container, and then set up the 2 HA instances to talk to the mqtt server.


In theory the 2 instances shouldn’t know each other exist, and whatever switches are flipped on the first should be reflected on the other. (this will be useful for testing).

I’ll be testing this tonight, but I wanted to ask, is anyone else doing something similar? I’m I missing something blatantly obvious?


I’m not using any docker but otherwise this seems to work fine for me.

That’s not going to work quite as you hope. To get the two HA instances to update in synch you’re going to have to look into MQTT eventstream/statestream.

I run a test instance with a completely separate broker in a Virtualbox virtual machine.

I don’t want anyone else in the house disturbed by testing switching things on and off.

Almost 2 months later, I got around testing this. The logic is:

1 MQTT server (Mosquitto)
1 Database (MariaDB)
2 separate installations of Home Assistant (0.93.1 and 0.93.0)

I just copied all the yaml files from one installation to the other.

These are the results.