To Proxmox or not to Proxmox

@tteck fixed it - I had to add the ‘listener’ line to mosquitto.conf otherwise mqtt wont be allowed to listen for anything other than localhost (as per log file entry in post above):

# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example

pid_file /run/mosquitto/mosquitto.pid

persistence true
persistence_location /var/lib/mosquitto/

log_dest file /var/log/mosquitto/mosquitto.log

include_dir /etc/mosquitto/conf.d
listener 1883 0.0.0.0

Not sure if you can build that into the install script? Alternatively, I guess it can be added as a config line item on /etc/mosquitto/conf.d/default.conf?
UPDATE:
Just tested that out and it works fine if you edit /etc/mosquitto/conf.d/default.conf with the following:

allow_anonymous false
password_file /etc/mosquitto/passwd
listener 1883 0.0.0.0

Looks like Debian 11 has brought new versions of MQTT. port 1883 is deprecated and now requires listener 1883 I’m thankful that @Townsmcp has a good troubleshooting skill.

Can you change your default.conf to the following, and confirm it’s working

allow_anonymous false
persistence true
password_file /etc/mosquitto/passwd
listener 1883
# ...

EDIT: I can confirm everything is working as it should with the above config

1 Like

Wondering this setup will give more advantage since I need to install each app manually on LXC rather than running on Docker?

Still debating whether I need to switch or remain running VM. Supervised so far is very nice and its auto-backup addon is the best.

Everyone has their preferred method to run Home Assistant. No right/wrong way as long as it’s a supported installation method.

I prefer this method because:

  1. total control (no supervisor)
  2. ease of troubleshooting
  3. individual lxc auto backups to a USB SSD drive with auto prune
  4. fast restores
  5. my key automation’s continue to function without Home Assistant

And most importantly, I’m comfortable with this method.

1 Like

yeah… I should agree on the information, however most of my apps is running on Docker and I will have a headache to install it manually. For example install influxDB - Grafana

The Home Assistant Container LXC uses Portainer and Docker, so you can add docker containers.

Like I said, It’s what you’re comfortable with. Such a fun hobby!

so for HA container LXC is running on docker inside LXC nesting?

1 Like

Yes. The good thing about Proxmox is you can create a VM or LXC and play around to see if things work for you without messing with your current, working setup.

Personally, I prefer to use Whiskerz script (found here GitHub - whiskerz007/proxmox_hassio_lxc) so that I can run HA as close to bare metal as possible rather than in a docker container. By using this method I still have access to Supervisor and add-on store (kind of the best of both worlds). But I am going through breaking down important integrations out to their own LXC’s - this is thanks to @tteck for individual LXCs. That way, as Tteck has said, you can keep plaing around without screwing everything up in a big way.

Just as a side note though, Whiskerz script is not Proxmox 7 compatible. However there is a Proxmox 7 pullrequest that justme88 corrected the PVE 7 issues. At least, it corrected it until apt-get update failed to work! I fed back the changes required to the pullrequest in the thread and it works pefectly now. It can be found at Update create_container.sh by justme88 · Pull Request #42 · whiskerz007/proxmox_hassio_lxc · GitHub. I havent Actpohomoc pullrequest yet though so cant vouch for that. But to get it working with the pullrequest, I just copy/pasted the code into a new local .sh file, modified the line and ran the script locally to get the new container running

Doesn’t that install method show “Unsupported” ?

It does unfortunately. However, since being on PVE 7 (and even on PVE 6) I havent had any problems from the install and everything is working much much better than was HA was on a PI4 with external SSD.

Im actually just doing the MariaDB script and so far can see a couple of differences to your documented changes to what is in the 50-server.cnf for Debian 11 container:

  1. ‘port’ and ‘socket’ lines are missing on default install.
  2. ‘skip-external-locking’ is uncommented

Not sure if I should change to your settings? Or go with the defaults and add ‘port’ line/comment out ‘skip-external-locking’?

Does it show " Unhealthy" ?

Not that I can see:


…unless Im looking in the wrong place?

run script again if you didn’t get it working
Debian 11 brought more changes than expected.
I’m working on new docs

1 Like

As far as I understand this is just Home Assistant Supervised running in an LXC container instead of a VM. So Home Assistant, Supervisor and all add-ons still run in docker containers.

It’s not integrations that you are breaking up into LXCs, it’s add-ons/additional software like the mqtt broker that you break up into separate LXC containers.

1 Like

Thanks. Think I will wait for the updated info - just built a new LXC, followed the install steps, but when it comes to adding the new admin account and accessing it I get the following:

root@mariadb:~# sudo mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 55
Server version: 10.3.29-MariaDB-0+deb10u1 Debian 10

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]> GRANT ALL ON *.* TO 'admin'@'192.168.1.%' IDENTIFIED BY 'myPassword' WITH GRANT OPTION;
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> exit
Bye
root@mariadb:~# mysql -u admin -p
Enter password: 
ERROR 1045 (28000): Access denied for user 'admin'@'localhost' (using password: YES)
root@mariadb:~# 

hehe couldnt think of the name (add-ons) so just went with integrations :slight_smile:

So, does that mean that Tteck’s script puts HA inside a docker inside a docker inside an LXC but Whiskaz is in an docker inside an LXC?

That’s a small but rather important difference :slight_smile:

No, whiskaz script installs Home Assistamt Supervised (with supervisor and add-ons, all running in docker containers) inside an LXC. Tteck script installs Home Assistant Container (no supervisor, no-addons, just Home Assistant in a docker container) inside an LXC.
As bare metal as possible would be running Home Assistant Core (Home Assistant in a virtual environment) in an LXC container.

3 Likes

Ah ok cool. Will give that a go as part of the new build. My only concerns are having the same functionality from various addons that I have installed (although a leaner HA will be nice - my current setup is using up 100gb storage):

Out of that lot, the main ones I would really want are log viewer, file editor, Google Drive backup, Grafana/Influx and some sort of terminal (which I guess I can replace functionality in Guacamole to ssh in from anywhere

Thank you for this detailed descriptions. It is really helpful.

1 Like