Ubuntu 24.04 LTS installation issues

Hi Walter,

I did eventually get a working installation on Ubuntu 24.04, but it was tricky. Not smooth at all.

Definitely had to use PHP 8.3.

I don’t think my installation works 100% - redis was a problem I recall. However, it works “enough” for me to monitor my heat pump.

I expect to be reinstalling again in the next week or so and will happily make notes as I go share the outcome if that helps.

Miles

1 Like

Hello Miles

Thanks for your feedback.
I moved on purpose to a VPS server with root access because you don’t get Redis installed, except if you go for a managed server which is way too much expensive.

Anyway, you said your Redis is kind of working. As far as I remember, redis is compiled from the sources if you run the emoncms scripts (work well by the way). Maybe you got some compatibility issues.

Another point: PHP 8.1 will not get any support from this month on. At some point, we will have
to upgrade to 8.3 which, as you said, is included by default in Ubuntu 24.04. Ubuntu is “pushing” to upgrade to 24. If we do it now, it will be installed automatically. If we wait too long, we will have to do it manually.

It would be nice if we could get updated scripts that would solve the issues you had. I am ready to test these scripts in a virtual machine if necessary.

Thanks again for your help.

Walter

It is more likely to be issues with the PHP code than the scripts themselves that cause issues with moving to PHP 8.3. That is @TrystanLea bag.

Redis is largely used to act as a buffer to reduce the write load to memory. This is a major issue for SD Cards, less so for disk based servers so the ‘low-write’ functionality can be switched off on a server.

However, Redis is also used to enable some commands from GUI buttons and that is a different problem :frowning:

Walter,

I realise time has passed, but I moved on to using Docker. Eventually I was pointed towards the simplest, easiest installation of emoncms I’ve ever done.

See this thread.

Up to date docker container image? - Emoncms / Installation - OpenEnergyMonitor Community

This link

Running the App with docker-compose | Emoncms docker

I changed the image line in that docker-compose.yml to simply

image: alexjunk/emoncms

tweaked the passwords and ports, made sure my host machine /data was chmod 777 as a starting point (you can restrict it later when you can see what users and groups the directories are created as), and simply did docker compose up. That’s it. Worked like a dream. I bet you could do it from nothing in less than 5 minutes including installing docker…

Maybe this helps you too.
Miles

Hi

Thanks for the info. Before going that route, do you know which versions have been included like for PHP, Python, Ubuntu, Redis etc. ?
Thanks

Walter

Hi Walter,

No, I have no idea and I don’t need to know! I actually don’t care - what I have is a black box working emoncms installation that “Just Works”. It’s the most complete installation I have ever had ever and it was trivially easy.

For reference, this is my docker-compose.yml file

services:
  emoncms:
    image: alexjunk/emoncms
    volumes:
    - type: bind
      source: /mnt/emoncms
      target: /data
      bind:
        create_host_path: true
    environment:
      - TZ=Europe/London
      - REDIS_BUFFER=1 # 0 to disable low-write mode
      - EMONCMS_LOG_LEVEL=2 # 1=INFO, 2=WARN, 3=ERROR
      - MYSQL_DATABASE=emoncms
      - MYSQL_USER=emoncms
      - MYSQL_PASSWORD=emomcms
      - MYSQL_ROOT_PASSWORD=emoncms
      - MQTT_USER=""
      - MQTT_PASSWORD=""
      - MQTT_HOST=localhost
      - MQTT_LOG_LEVEL=error
      - CRT_FILE=/etc/ssl/apache2/server.pem
      - KEY_FILE=/etc/ssl/apache2/server.key
      - CNAME=localhost
    ports:
       # These ports are in format <host-port>:<container-port>
 #     - 7443:443 # Public HTTPS Port
      - 8080:80 # Public HTTP Port
#      - 9883:1883 # Public MQTT Port (if using the internal broker)
    restart: always

I have my data in a volume mounted on the host in /mnt/emoncms and I don’t care about https since I have it behind a reverse proxy host anyway, so I could probably remove the key file entries etc. I’m also not currently using any mqtt, so that’s redundant too.

Install docker.
Create a docker-compose file.
docker compose up

And That’s Everything.

Miles

1 Like