Hi Ben,
Looks like Docker development never really took off. More info at the link below:
According to that post, the build-script should be usable as the basis of a Docker image.
Hi Ben,
Looks like Docker development never really took off. More info at the link below:
According to that post, the build-script should be usable as the basis of a Docker image.
Thanks @Bill.Thomson - I will try building my own image using the Dockerfile in the emoncms-docker repo and see how I get on.
This has been working well for me for about 18 months, I rebuild it pretty often.
I don’t use very many features so the rather enthusiastic rm -rf might get rid of things you care about.
FROM openenergymonitor/emoncms
RUN rm -rf /var/www/emoncms
RUN mkdir /var/www/emoncms
RUN git clone https://github.com/emoncms/emoncms.git /var/www/emoncms
WORKDIR /var/www/emoncms/Modules
RUN git clone https://github.com/emoncms/dashboard.git
RUN git clone https://github.com/emoncms/graph.git
RUN git clone https://github.com/emoncms/app.git
RUN git clone https://github.com/emoncms/device.git
RUN chmod -R a+rx .
WORKDIR /var/www/emoncms/
COPY settings.ini .
Thanks for sharing. Any reason you don’t use the Dockerfile from the emoncms-docker repo? I guess if it ain’t broke…
I had to fix a typo on the device repo clone command, but other than that it has worked OK so far.
Good stuff @ben.jones12 - keep using the one from the repo if it’s doing what you need. It sounds like you are rocking now.
I use the stripped down one because I develop an app and wanted less things around to think about.
Just as an FYI - Please note that the systemd people are pretty strongly anti-Docker, because of Docker’s anti-systemd stance. So potentially expect difficult problems if you try to do anything complicated. Suppposedly Podman https://podman.io/ is a close to identical replacement. I don’t know much more than that; I haven’t used either.
I’ve got an odd issue, how do I backup my data? The build in Backup option doesn’t appear to show, even though the Component appears to be loaded:

I’ve been using this Docker build for a couple of years, want to migrate to a new VM and wanted to rebuild using the current recommended method.
Probably a daft questioin but then I am daft ![]()
I’m trying to install Emoncms in a docker container on an asutor nas.
I have docker installed on the nas ok.
So, here’s the daft bit. Do I need to install the Emoncms requirements (PHP, MySQL/MariaDB, Apache, Redis et al) on the NAS directly or in a docker container?
Following on from my question above. I started again fromm scratch following the instructions on this thread.
It seems to have gone ok but when I try to open it in a browser on another machine I get an Apache Error
Forbidden
You don’t have permission to access this resource.
Apache/2.4.38 (Debian) Server at
I have set up a Docker group. set access rights to rw.
Not sure what to try next.
Any pointers/ideas appreciated.
I attach a screenshot of portainer for info.
Can you get to the copyright file on this docker instance?, e.g. http://172.18.0.4/COPYRIGHT.txt
If that works fine, you need to have a look into the Apache logging.
2 posts were split to a new topic: New hardware solution to replace Pi
Is this still a way to install and run emonCMS? And is it a good way?
@alexandrecuer has a more up to date Docker I think (have a search).
Is it a good way? Depends on your setup.
I’ve installed (and use) an instance using the scripts on an LXC running in a PVE environment (though there are some issues with the scripts and compatibility with the latest Ubuntu).
There is also a Home Assistant addon also from @alexandrecuer (basically the same as the docker). Emoncms self contained docker container and HomeAssistant Addon - #82 by alexandrecuer
Right! That would be the Docker container https://emoncms-docker.github.io/, listed on Docker Hub as alexjunk/emoncms - Docker Image .
I was drawn to @glyn.hudson’s Docker image at openenergymonitor/emoncms - Docker Image as a) it’s ‘official’ I guess, and b) it looks far easier to set up, with a few simple commands. @alexandrecuer’s looks a lot more complex, with having to make a compose file then save it (where??) then setting up the database, creating a folder (again, where?) to persist data, and set up MQTT.
Would be awesome if the simplicity of the of the OEM image could be updated.
actually it is the opposite, the alexjunk image is simple to setup : it was crafted for that.
You just have to run a single container, everything is on board. if you have portainer, in one click you are ready
in you dont use portainer and only use CLI, just run
docker run --rm -p 8081:80 -p 7883:1883 -it alexjunk/emoncms
and you have an emoncms instance running on http://127.0.0.1:8081
enjoy