OpenEnergyMonitor Community

Emoncms Emoncms on your machine in 4 commands!

Well spotted, blog post is correct. 4 commands are needed, the docker pull command is important. I’ve amended my post above.

Very nice idea, because now I can let it run direct on my NAS :slight_smile:
What do you think, is it possible to integrate an energy monitor via modbus also on docker?

Modbus integration is a separate topic to docker. Please start a new topic discussion. I have no experience of Modbus, there might be some Modbus discussion on the old forums. Maybe try and search Forums | Archived Forum

1 Like

The more I learn about docker the more I’m blown away by its potential. I hope this is something y’all are still working on!

1 Like
[email protected]:/# docker ps | grep emon
438c4a303cb2        emoncms/apr                             "apache2-foreground"     4 months ago        Up 3 weeks>80/tcp                                                           emoncms
82544e7154f8        redis:alpine                            "docker-entrypoint..."   4 months ago        Up 3 weeks          6379/tcp                                                                     emoncms_redis
ff511ce35222        mysql:5.6                               "docker-entrypoint..."   4 months ago        Up 3 weeks          3306/tcp                                                                     emoncms_sql
[email protected]:/#

I’ve been a very happy docker user for about a year. I managed to migrate from a basic emoncms install inside a VM to containers without losing anything.

I’ve learned a lot with @glyn.hudson post and as usual forgot to drop a simple thank you.

so… THANK YOU! :blush:


I’m glad to hear your finding the docker installation useful. Docker is fantastic.

Let me know if you have any suggestions on how to improve the emoncms docker setup. Git PR’s are best

2 posts were split to a new topic: Emoncms docker on DSM 6

The default web port port 8080 which clashes with OpenHAB can be changed by editing docker-compose.override.yml
(Answered my own question)

1 Like

That’s it! Emoncms should now be runnning, browse to http://localhost:8080

Very easy indeed! I get a login page of emoncms, but what is the default username and password? I found raspi-raspberry as combination on the web, but that doesn’t work on my system (Lubuntu).

I found it myself blush. I thought I couldn’t use register, because it would send an e-mail and that probably wouldn’t work. But it’s just used as an login name. But now I would like to use emonHUB and that doesn’t seem to be included in de docker image. I think I will go for a regular Ubuntu install, as docker is too new for me :-). And - as far as I understand - the docker image is (at the moment) only for development, not for real use.

For Ubuntu EmonScripts/ at master · openenergymonitor/EmonScripts · GitHub

What are you going to use emonhub for? The 2 do not need to be on the same physical machine.

stupid Q… but does this mean that i can host emoncms on an open media vault machine?

I just tried to spin up a docker container using openenergymonitor/emoncms:latest but I am getting v10.1.13 when I login. From what I can tell, this image hasn’t been updated on Dockerhub for 2 years.

Is there a process to update this image after an EmonCMS release? Or do I just need to build it locally and use my own version of the image - i.e. is the version on Dockerhub obsolete and unused?

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 /var/www/emoncms

WORKDIR /var/www/emoncms/Modules

RUN git clone
RUN git clone
RUN git clone
RUN git clone

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 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.