How to configure Home Assistant and integrate data from Proxmox.
If you first need to install and configure Proxmox, check out this guide: https://disorder.dk/wonderware/2025/01/30/installing-proxmox-on-a-lenovo-thinkcentre-m910q/ and to install Home Assistant, check out this guide: https://disorder.dk/wonderware/2025/01/30/installing-home-assistant-in-proxmox/
Choose a username and password.

Search for your location by writing your address and clicking the small map with a looking glass icon to the right of input field.
You can opt-in to share anonymized information, this is your own choice and thank you to HA for making this a opt-in and not a opt-out like Google and Microsoft, that is trying to trick you into handing over your data and information.
Right away Home Assistant scans your network for compatible devices. A summary of what is found on your local network is shown. Some are already added, others may need extra configuration.
We now get the Home Assistant overview.

You can choose a more suitable hostname, to identify your VM on the network, if you want to be sure what Home Assistant instance you are looking at from the perspective of your router. You can also set a static IP, which you should set by MAC address reservation in your router.

But we want to get some actual data shown! Let us start by getting some information about our hardware that is running HAOS. We would like to see information about CPU, RAM and disk.
As HAOS is agnostic about its Proxmox host, we need a way to get data from the Proxmox server itself, to an integration in HAOS. Go to Settings > Devices & services > Click + Add Integration bottom right corner. Search for Glances.

A integration popup asks for connection details. But we do not yet have a Glances server (https://github.com/nicolargo/glances/wiki) to get data from. Press the ? mark to get to the integration documentation: https://www.home-assistant.io/integrations/glances thats lists these informations:
Support for Glances api version 2 is deprecated. It is recommended to upgrade your Glances server to version 3. Once upgraded, reload the integration to connect again.
These sensors needs a running instance of
glancesin Web Server Mode on the host. The minimal supported version ofglancesis 2.3.For details about auto-starting
glances, please refer to Start Glances through Systemd.
So we now know we have to install Glances on the host, which is Proxmox itself, and we need to run it in web server mode and we have to do something for auto-starting.
We do this by using the guide from Glances official documentation (https://glances.readthedocs.io/). To install, we go to the >_ Shell of the Proxmox node.

We need pip installed on Proxmox, before we can use the Python Installer for the Glances installation. When looking for solutions to Proxmox OS, it can help to look for Debian help, as its based on that OS, and your problem is not directly related to virtualization. Use the following command in the shell: apt install pipx Answer Y to installation list and press enter. (python3-pip will not work, unless you delete security features between OS and python, which goes without saying, is a bad idea. Do not use “rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED”, which you can find recommended on stackoverflow or other places)

We can now continue to install Glances with the following command in the shell: pipx install ‘glances[all]’ (covered in the readme: https://github.com/nicolargo/glances/blob/master/README.rst)
When installation is done, you are prompted to ensure environment variables path is correct, with command: pipx ensurepath

To start the webserver, we follow the guide for that: https://glances.readthedocs.io/en/latest/quickstart.html#web-server-mode
To protect the server from being accessible from any machine on the network, we set a username and password, while starting the server. Use the following command in the shell: glances -w –password (we will just use the default username glances). Shut down the server with CTRL+C before continuing.

To confirm that the server is working, use a webbrowser on another PC on the network, and enter the IP and port number listed.

We would like the webserver to autostart and we do that by following this guide: https://github.com/nicolargo/glances/wiki/Start-Glances-through-Systemd
We need to create a new file called glances.service in the /etc/systemd/system/ folder. Use the following command in the shell: nano /etc/systemd/system/glances.service
Important!: Because we used pipx, the installation folder is different than default!
[Unit]
Description=Glances
After=network.target
[Service]
ExecStart=/root/.local/bin/glances -w -u glances
Restart=always
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
Save the file with CTRL+X, save answering Y and confirm file path with Enter.

To enable the unit for automatic start while booting and to start the service, enter the following two lines in the shell:
systemctl enable glances.service
systemctl start glances.service

Type reboot in the shell to restart proxmox, to test is automatic start works.
Now we go back to Home Assistant integrations page and enter the details of the glances server.

We are now happy. We have glances data in HAOS! It is not pretty on the overview, but that is fixable by making new cards with custom selection of the new glances sensors.


For more Home Assistant guides, check out: https://disorder.dk/wonderware/home-assistant/
Discover more from SCADA, PLC and Automation Engineering
Subscribe to get the latest posts sent to your email.