Community
OpenEnergyMonitor

OpenEnergyMonitor Community

Easy EmonCMS docker install?

Hello, Is there such a thing as an easy install for EmonCMS ?, I’m thinking of a one line Bash script, I tried from documents but couldn’t get the install to work. I mentioned a while ago to Dockstarter.com if they could include EmonCMS in there very good installer but I don’t think there was much interest, I did though get Node-red added to the list.

Hi @myozone - welcome to EmonCMS, nice to have you around.

Quite a few of us are using openenergymonitor/emoncms:

https://hub.docker.com/r/openenergymonitor/emoncms

and we’ve been chatting about various things in this topic:

Were those the install instructions you were following? If so, what tripped you up?

It might be best to respond in that other thread if you’d like to chat about using the Docker setup because then people looking for Docker info will learn from your experience.

Thanks

Thanks for the reply, No those aren’t the instructions I followed I can’t find the ones I followed right now. I couldn’t understand what I did wrong with four simple commands, although I have just noticed I also have Shinobi CCTV also on port 8080 :roll_eyes: that could be the issue. I’m just ‘playing’ at the moment with Docker on a Ubuntu Oracle VM on my laptop, then move over to PI 4 maybe. I just wanted to play with Dockstarter.com but thought it would be nice to have EmonCMS running on the same Docker install. I’ve had EmonCMS running on a PI 2 for years from an image I downloaded from a guy in Norway I’ll have a go with your link and see how that goes.

I’ve just run the four commands everything appeared to install ok but no access via the webpage on 8080


1 Like

Hi @myozone

I’m sure you already thought of this, but the 172.x address for the container is not the 192.x address. I’m assuming you have some virtualization and then networking bridging going on.

To debug, just exec into the container and curl it’s localhost.

docker exec "container-name-or-id" curl localhost

Then you’ll know if it’s not started properly (in which case look in the container logs) or if you are having network re-direction fun (look at the thing wrapping docker to check it’s bridging 8080 too).

I think it’s a permissions issue as all other containers work ok even with the internal docker 172.x addressing.

[email protected]:~$ docker exec “emoncms-docker_web_1” curl localhost
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 274 100 274 0 0 39142 0 --:–:-- --:–:-- --:–:-- 39142

403 Forbidden

Forbidden

You don't have permission to access this resource.


Apache/2.4.38 (Debian) Server at localhost Port 80

It’s running, but I’ll look into permissions. I’ve not really used Docker therefore, a steep learning curve for me.

For a Virtual Environment, the other alternative is Proxmox VE. I run Emoncms in a PVE instance installed on an old laptop, then an Ubuntu container in that. Simple, low resources and built-in UPS!

My plan was to use Docker and have everything on one PI 4, this testing now is temporary playing to get it to work and get used to Docker. I’ve tried a new VM install of Ubuntu and install Docker then the EmonCMS install above with the same issue as above, I thought it might have been DockStarter screwing things up or Shinobi I had on the same port 8080.