For anyone at the confluence of the “homebrew energy monitoring” and “Linux sysadmin” and “self-hosting” Venn diagram, it’s possible to run Emoncms in a LXD container, instead of on bare metal. I have a VPS hosted with Hetzner, and I use LXD containers on it for just about everything - DB, web, mail, etcetera.
I wrote up some short notes on getting it to work at Running emoncms in a Linux container – Cricalix.Net - basically you make the container look like a Pi in terms of username and available OS (the whole PHP 8 thing) packages, and it just works.
The only annoyance has been the requirement for the SHA fingerprint of the TLS certificate. With LetsEncrypt, my certs rotate every 90 days, and I don’t want to be updating the ESP8266 configuration every 90 days, so I live with port 80 traffic.
Many moons ago, but not an LXC as they didn’t support it then. Just as emoncms installed on a DietPi OS system on a Pi. Trouble with that was that the 2 different disk management systems tended to fight (emonSD uses log2ram - DietPi has this baked in).
The Ubuntu LXC is so lightweight anyway, it doesn’t need the added complexity of DietPi.