To Proxmox or not to Proxmox

In the meantime I’m really making progress in setting up my HA env. Really satisfied with this setup, the stability and the speed right now!

image

1 Like

Missing one :wink:
Nginx Proxy Manager in Proxmox LXC container

1 Like

Can you explain why I need/should use Nginx?

I use it for Duck DNS and Let’s Encrypt

EDIT: No need for it if you use Nabu Casa

1 Like

I still run those 2 as add-ons in my HA. Feels a bit overkill to run them in a separate LXC container

1 Like

Do you have any other system using your MariaDB database, your MQTT broker or NodeRed ?
It’s a nice setup but I can find any relevant advantage running these applications in Proxmox container rather than HA Addons.

I can however see lots of advantages to run things like Zigbee or ZWave network managers in containers.

How do you pass the USB stick to the Zigbee2MQTT LXC ? I do it for VM but I’ve never tried for LXC…

1 Like

Screenshot 2020-12-30 at 1.47.50 PM

EDIT: 2/19/21
Screenshot 2021-02-10 at 8.08.23 AM
Been running this method for a couple of months. I wish I had done it from the beginning! Stable and Fast!!

2 Likes

I find it very satisfying that I don’t brake any of those add-ons when changing, upgrading, updating anything on my HA box. On restarts everything keeps running, and HA restarts are very fast. Everything is back-upped, and can be restored, separately. I’m really pleased with this setup, runs real smooth.

You can’t do it in the Proxmox web interface, so you have to do it on the command-line

Find out the VendorID and ProductID of your Zigbee coordinator (a CC2531 in my case)

root@proxmox:/etc/pve/lxc$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 0451:16a8 Texas Instruments, Inc.
Bus 001 Device 002: ID 2341:0042 Arduino SA Mega 2560 R3 (CDC ACM)
Bus 001 Device 004: ID 8087:0aaa Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Add a UDEV rule to set the rights on the USB device, and to create a new symlink

root@proxmox:/etc/pve/lxc$ nano /etc/udev/rules.d/50-myusb.rules
SUBSYSTEMS=="usb", ATTRS{idVendor}=="0451", ATTRS{idProduct}=="16a8", SYMLINK+="zigbee", GROUP="users", MODE="0666"

Find the major number of the device based on the Bus and Device in the lsusb output. 189 in my case

root@proxmox:/etc/pve/lxc$ ls -al /dev/bus/usb/001/006
crw-rw-rw- 1 root users 189, 5 Dec 29 14:30 /dev/bus/usb/001/006

Add two lines of code to the configuration of your LXC container to passthrough the USB device based on its major number and on the created symlink

root@proxmox:/etc/pve/lxc$ nano /etc/pve/lxc/202.conf
...
lxc.cgroup.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/zigbee dev/zigbee none bind,optional,create=file

Remember you need to reboot your Proxmox box (or reload the UDEV rules) and LXC container off-course

# Reload UDEV rules
udevadm control --reload-rules
udevadm trigger
# Stop and start container from the Proxmox command-line
pct stop [ContainerID]
pct start [ContainerID]
12 Likes

Thank you very much !
Much appreciated. :slight_smile:

1 Like

I’m running Debian 10/docker/ha on my NUC equivalent (wyse 5070)…but since this is a learning/experimental system, I tried everything under proxmox. I’m running pihole in a container and I created a proxmox Debian 10 lxc just for testing.

The NUC uses my TV as it’s display…and I want to be able to display web content like mp3’s or zoom calls using the NUC. I could not find any way to create a container that could use the TV…the TV on the only graphics β€œcard” in the NUC is dedicated to Proxmox. Yes, I understand that I could add a debian desktop to the proxmox installation (or install proxmox under debian?), but since this is a learning system…I wanted to be able to try ubuntu/debian/…in different containers just to see how they differ. If I can’t switch the TV to the container I want to display, then Proxmox isn’t the answer for me.

Have I missed something that would solve my display issue?

You can use PCI passthrough in a VM (not in a container!). But I would suggest to post this question on the Proxmox forum, as this has nothing to do with HA

https://pve.proxmox.com/wiki/Pci_passthrough

thanks for the reference, but this is appropriate to this forum because decision to Proxmox or not goes well beyond HA…HA runs just fine under Proxmox or Debian/docker.

I am currently going through the process of migrating from RPi3 to Proxmox and have HA and NodeRed running in LXC Containers. Would anyone care to share a Zigbee2mqtt LXC template or is it quite straight forward to create my own?

First follow this to create your lxc with port passthrough Then follow this to install z2m bare metal
skip sudo chown -R pi:pi /opt/zigbee2mqtt you’ll be working from root

3 Likes

Thanks @tteck for your guidence.

I have now got my Proxmox Zigbee2mqtt container setup however I am having a few problems.

First problem I’m having is that it is reporting in the logs that i am not connected to the MQTT Server.
I have set it up in the configuration.yaml to connect with the Mosquitto broker addon running on my HA. I have therefore identified the IP address of where this resides. I’m not sure of what else needs to be setup in order for it to make a connection.

Secondly, I have updated the configuration.yaml so that I can view the frontend. I can see the frontend, but none of the paired devices. I know that there are some paired devices based on the logs as well as from the updated configuration.yaml file which shows a couple of devices.

I have spent a good few hours trying to work this out for myself, however I think I need some help.

If you’re running HAOS or HA Supervised, I’m afraid that I’ll be of no help.
I run everything decoupled, with everything having its own IP.
The only thing that I’d suggest would be set server: 'mqtt://localhost:1883' to the actual mqtt broker IP server: 'mqtt://192.168.<?>.<?>:1883'

Thanks for the response.

I’m a bit confused to be honest. I intend on setting it up in a decoupled state also and I guess following your lead where I have HomeAssistant, Nodered and zigbee2mqtt running in there own containers with their own IP addresses. I presume from your Proxmox screen captures shown in this thread, you also have your MQTT server ( Mosquitto) running in its own container too. So in this case you will have your MQTT server container ip address configured within the configuration.yaml?

Any ideas with regard to the second issue? Do you have the zigbee2mqtt frontend enabled for your setup. It does seem strange that I can see devices being paired but not displayed in the interface.

In your case, your mqtt broker ip will be your HA IP:1883

Sorry to be a pain, but how do you connect your zigbee devices into your home assistant? Do you use the mqtt auto discovery within HA to find the devices from your MQTT server container? I could well be getting this architecture all wrong so please forgive me, i’m just learning.

Also, with regard to my second question, do you have the zigbee2mqtt frontend enabled for your setup? It does seem strange that I can see devices being paired in the log but not displayed in the interface. Is my asumption correct that zigbee2mqtt should work independantly to a connection to an mqtt server?

First 9 lines in my zigbee2mqtt config

frontend:
  port: 9442
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://192.168.86.224:1883'
  user: <usr>
  password: <pwd>