# Emoncms Docker...run Emoncms on your machine in 4 commands!

**URL:** <https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823>\
**Category:** Emoncms\
**Tags:** docker\
**Created:** [23 June 2016 19:38 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823 "2016-06-23T19:38:39Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [23 June 2016 19:38 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/1 "2016-06-23T19:38:39Z")

</div>

With the help of @davehun and @spikeheap from @northwalestech I have been working on an Emoncms Docker setup. Using Docker it’s possible to fire up Emoncms on a bare system (assuming Docker is installed) in a couple of minutes with all the LAMP config faff taken care of. This is great for development since you can play about with Emoncms running in a Docker container without fear of messing up your main Emoncms install.

In the future, Docker can even be used as a deployment tool for Emoncms. In theory, it should be possible to deploy the Docker container on any server within minutes 🙂

## [Read Blog Post](https://blog.openenergymonitor.org/2016/06/emoncms-docker/#read-more)

## Quick start

```auto
$ docker pull openenergymonitor/emoncms
$ git clone https://github.com/emoncms/emoncms-docker
$ cd emoncms-docker
$ docker-compose up

```

**That’s it! Emoncms should now be runnning, browse to [http://localhost:8080](http://localhost:8080)**

The Docker files and build instructions are in the emoncms-docker repo:

## [GitHub - emoncms/emoncms-docker: Emoncms docker container(s)](https://github.com/emoncms/emoncms-docker)

Please give it a try and let me know how you get on.

~~The next step will be to push an Emoncms Docker container to docker-hub to allow anyone interested in Emoncms to pull down the container and be up and running with Emoncms almost immediately.~~  
Done: [openenergymonitor/emoncms - Docker Image](https://hub.docker.com/r/openenergymonitor/emoncms/)

To do:

- Allow docker container to startup with a large amount of test data & demo dashboards etc.
- Create ability to simulate a large number of inputs
- Simulate [emoncms.org](http://emoncms.org) multi-server
- Add MQTT
- Backup module
- Add Redis
- EmonHub
- Investigate running Docker on RaspberryPi

[See To Do list on emoncms-docker repo issues](https://github.com/emoncms/emoncms-docker/issues/2)

---

<div class="post-metadata">

**Author:** ![Bill.Thomson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/bill.thomson/32/1834_2.png) [@Bill.Thomson](https://community.openenergymonitor.org/u/Bill.Thomson)\
**Post date:** [24 June 2016 13:52 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/2 "2016-06-24T13:52:50Z")

</div>

> [@glyn.hudson](#):
>
> - Investigate running Docker on RaspberryPi

You may find this helpful:

> **[Docker on Raspberry Pi in 4 Simple Steps](https://blog.balena.io/docker-on-raspberry-pi-in-4-simple-steps/)**
>
> ANOTHER UPDATE: We've since released resin.io \[https://resin.io\] as a full service allowing you to easily run and update docker containers on multiple architectures. UPDATE: We've since released Docker 0.7.2 for ARM. Read More...

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [24 June 2016 14:28 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/3 "2016-06-24T14:28:11Z")

</div>

Yup, looks like it’s possible. It could be amazing in the future to be able to build Raspberry Pi / emonPi images from a docker container. 🙂

Out of interest, does anyone have experience with Docker?

---

<div class="post-metadata">

**Author:** ![bart.ellast](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/bart.ellast/32/12224_2.png) [@bart.ellast](https://community.openenergymonitor.org/u/bart.ellast)\
**Post date:** [24 June 2016 17:39 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/4 "2016-06-24T17:39:49Z")

</div>

My test emoncms install is running in a docker on an unraid system.  
Has been working flawlessly for a while now.

It’s definately a great way to run it independent from the server.  
With a supported official docker i might switch my vm install over…

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [24 June 2016 22:05 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/5 "2016-06-24T22:05:15Z")

</div>

Hi Bart,

Great to hear, how did you setup your Docker enviroment? I have gone for using two containers; one for php-apache and the other for mysql and linking them via docker-compose. I am keen to try and standardise on a docker setup which is best practice for emoncms in both development and production.

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [25 June 2016 14:30 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/6 "2016-06-25T14:30:11Z")

</div>

Just updated my first post with quick start guide and blog post link:

> **[Emoncms Docker](https://blog.openenergymonitor.org/2016/06/emoncms-docker/#read-more)**

It’s awesome how 4 commands gets Emoncms up and running from scratch!

```auto
$ docker pull openenergymonitor/emoncms
$ git clone https://github.com/emoncms/emoncms-docker
$ cd emoncms-docker
$ docker-compose up

```

**That’s it! Emoncms should now be runnning, browse to [http://localhost:8080](http://localhost:8080)**

---

<div class="post-metadata">

**Author:** ![Bill.Thomson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/bill.thomson/32/1834_2.png) [@Bill.Thomson](https://community.openenergymonitor.org/u/Bill.Thomson)\
**Post date:** [25 June 2016 15:22 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/7 "2016-06-25T15:22:39Z")

</div>

> [@glyn.hudson](#):
>
> It’s awesome how 4 commands gets Emoncms up and running from scratch!

Pretty slick!

There’s only three commands in your list. Your blog post shows another command:  
`$ docker pull openenergymonitor/emoncms`

Should that one be in the list too?  
Or should the text read 3 commands, vice 4 commands?

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [25 June 2016 16:10 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/8 "2016-06-25T16:10:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ChristianB](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/c/59ef9b/32.png) [@ChristianB](https://community.openenergymonitor.org/u/ChristianB)\
**Post date:** [25 June 2016 18:09 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/9 "2016-06-25T18:09:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [25 June 2016 22:23 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/10 "2016-06-25T22:23:13Z")

</div>

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](https://openenergymonitor.org/emon/forum)

---

<div class="post-metadata">

**Author:** ![SolarMill](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/solarmill/32/817_2.png) [@SolarMill](https://community.openenergymonitor.org/u/SolarMill)\
**Post date:** [18 December 2017 02:42 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/11 "2017-12-18T02:42:13Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![cab123](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/c/7ba0ec/32.png) [@cab123](https://community.openenergymonitor.org/u/cab123)\
**Post date:** [18 December 2017 14:44 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/12 "2017-12-18T14:44:08Z")

</div>

```
root@xen:/# docker ps | grep emon
438c4a303cb2 emoncms/apr "apache2-foreground" 4 months ago Up 3 weeks 0.0.0.0:80->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
root@xen:/#

```

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! 😊

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [19 December 2017 14:58 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/13 "2017-12-19T14:58:28Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [16 January 2018 14:58 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/14 "2018-01-16T14:58:19Z")

</div>

2 posts were split to a new topic: [Emoncms docker on DSM 6](https://community.openenergymonitor.org/t/emoncms-docker-on-dsm-6/6268)

---

<div class="post-metadata">

**Author:** ![kevin](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/k/2acd7d/32.png) [@kevin](https://community.openenergymonitor.org/u/kevin)\
**Post date:** [29 January 2018 19:03 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/15 "2018-01-29T19:03:44Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![m2ts](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/m/7cd45c/32.png) [@m2ts](https://community.openenergymonitor.org/u/m2ts)\
**Post date:** [26 March 2021 16:55 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/16 "2021-03-26T16:55:33Z")

</div>

> That’s it! Emoncms should now be runnning, browse to [http://localhost:8080](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).

---

<div class="post-metadata">

**Author:** ![m2ts](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/m/7cd45c/32.png) [@m2ts](https://community.openenergymonitor.org/u/m2ts)\
**Post date:** [27 March 2021 06:59 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/17 "2021-03-27T06:59:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![borpin](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/borpin/32/193_2.png) [@borpin](https://community.openenergymonitor.org/u/borpin)\
**Post date:** [27 March 2021 18:35 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/18 "2021-03-27T18:35:24Z")

</div>

For Ubuntu [EmonScripts/readme.md at master · openenergymonitor/EmonScripts · GitHub](https://github.com/openenergymonitor/EmonScripts/blob/master/install/readme.md#ubuntu)

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

---

<div class="post-metadata">

**Author:** ![boelle](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/boelle/32/19850_2.png) [@boelle](https://community.openenergymonitor.org/u/boelle)\
**Post date:** [30 March 2021 19:46 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/19 "2021-03-30T19:46:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ben.jones12](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/ben.jones12/32/169_2.png) [@ben.jones12](https://community.openenergymonitor.org/u/ben.jones12)\
**Post date:** [6 June 2021 10:10 UTC](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823/20 "2021-06-06T10:10:23Z")

</div>

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?

[Next page](https://community.openenergymonitor.org/t/emoncms-docker-run-emoncms-on-your-machine-in-4-commands/823.md?page=2)
