New install advices: multiple LxC or single with multiple docker containers for mqtt-zigbee2mqtt-HA?

mascal-labo

New Member
Jan 7, 2025
6
0
1
Hello all,

I am a newbie in the Proxmox world or with VMs generally (and Linux generally), and would like to know if there are some advices to follow now before setting all in a wrong way.
Here is my project with an old laptop as server (8 GB RAM, dual core):
  1. MQTT, Zigbee2MQTT and HA, controlling a mix of ~50 zigbee/wifi devices, with remote access to HA
  2. if possible, a NextCloud instance for local use only
  3. some lightweight web apps, local use too

For now, I started setting an LxC with portainer to get Mosquitto/MQTT explorer running. This works fine.
But I am wondering:
- Should I add Zigbee2MQTT + HA in the same LxC, or
- Create a second/third LxC for Zigbee2MQTT + HA?

As I lack experience with all of this, my main question is about best option for maintenance of all + handling of bugs /crashes in the daily life...

Thanks in advance for your feedback/webpages to read about it,
 
I run all of the above in the HA OS running in a VM and just install the add-ons inside HA, which creates its own docker for those add-ons. I used to have them all running in their seperate dockers, but just found it so much easier to let HA OS handle that. So I have Mosquito + Z2M + HA in the same VM
Thanks, I thought about this too, but read that there might be better stability if in different containers (not sure if it was docker or lxc containers though).
I was also thinking about testing other environments than HA, and then get some independence for mqtt/zigbee...
But maybe it's easy to re-create an MQTT device list in a different environment? (I don't know yet how this works in HA add-ons but I have seen how to get add-ons)
 
Last edited:
Gotcha. Yeah, if you're not set on HA and will be trying different stuff, makes sense to isolate the mqtt stuff. I prefer docker for that since it was super easy to just run a compose command and call it a day, as opposed to setting up an lxc. LXC works fine, but a bit more work to setup I found. Docker containers I found easy to update as well.

As far as the device list, as soon as you create the MQTT integration in HA it will pickup on all the mqtt devices and vacuum that up and create respective devices/entities in HA, if you have discovery topic enabled in Z2M (that should be in the Z2M settings -> Home Assistant integration). The devices are tied to the integration, so if you remove/disable MQTT in HA those devices disappear again.
 
Last edited:
  • Like
Reactions: mascal-labo
Thanks, my wonder is really on the longer term about stability and maintenance.
For instance, to isolate more what is expected to be less stable, so that it's easier to restart/maintain.
Maybe my wonders are wrong :)

And I would fully understand that when I decide on precise tools, I can also get to a different setup that is less flexible but more robust...
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!