Emoncms in a LXD container

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.