Docker openhab install on a raspberry pi

I presently have an openhab 5.0 on a Toshiba satellite laptop. As I have two raspberry pi, a 3 and a 4, I would like to use these to host my openhab installation. I also have a Kingston external SSD.

My preference would be to use the pi3. Is this a good idea? Is there pros and cons.

Thanks.

No, Docker on Raspi is not a good idea, let alone on any 1 GB RAM machine.
Better choose openHABian.

1 Like

In this case, would there be an x86 equivalent to the pi on the market that would be suitable to run docker openhab at a fair price^

Thanks.

Why not just get a Pi with more RAM ?

  • openHAB5 is 64-Bit only, so a 64-Bit Java as well as 64-Bit OS is needed, and in consequence you will need more RAM. Pi4 may work (you did not mention the amount of RAM…)
  • Why docker? There is (and will be) an image for Raspberry Pi with openHABian preinstalled. best practice is not to add “foreign” services to the Pi which runs openHAB.

If you want to go “x64”, maybe take a look at used NUC hardware. As a rule of thumb, at least 4GByte RAM, if you want to add other stuff with docker, more RAM will be better (maybe 8 GByte …)
Please be aware that, although openHAB runs fine with docker and the official container is well maintained, there is no official support.

And you don’t need Docker at all when you run a dedicated system as you intend to.
Docker just unnecessarily adds complexity and has no benefits here.

I understand that both my raspbery pi could do the job according to your installation specs:
https://v2.openhab.org/docs/installation/rasppi.html

If the pi3 B is sufficient, I could keep the pi4 for another project.

I have two raspbery pi that are not in use now:
Raspberry Pi 4 Model B/8GB
Raspberry Pi 3 - Model B - ARMv8 with 1G RAM

Sandisk ultra 128 gb micro sd sxc I (10 A1)

Kingston 240 gig SSD external drive. On another project the Kingston SSD would replace the micro sd at booting.

Thanks to all for your feedback.

Your link to documentation appears to be old. As a long time OH user, I did have OH running with docker on both rpi3b 32 OS and rpi4 2gb 64 OS at several times in the past. I also had a zw to Mqtt running. I did like the docker because updates are easy. For instance you don’t have to worry about Java versions because it is part of the package.

However with OH5, the rpi3 with a 64 OS is too much, even all by itself. I don’t have a super large OH install either. I think your rpi4 will be fine

A more recent document:

Though this is openHABian specific, it’s valid for openHAB5 in general:

On systems with only 1 GB of RAM running the 64 bit image may cause issues as there may not be sufficient RAM. If you observe issues please consider upgrading to a model with more that 1 GB of RAM.

That given, it’s not worth trying if there is already a Raspberry 4 with at least 2 GByte of RAM.

I also OH (4.3.5) on a rpi4b with 8GB of RAM with docker for the reasons @apella12 mentions. In addition, I was already running other services on an identical rpi4b under openSUSE Tumbleweed, and I preferred to stick with a single OS distribution, so docker smoothed any distribution-specific differences.

Is there anything in OH5 that would make me change course?

With the caution that I’m not a super user, IMO I’d say, stay the course.

I have a OH5 test system on a rpi4-2G with Zwave2Mqtt (ZUI) that uses 0.75 GB of RAM. The first startup of the upgrade (M1) (from 4.3.3 - just changed the image in docker compose), was messy, but a restart of the container cleared everything up. Just using the java 21 in the package. 8GB is going to be plenty

FWIW- Similar experience with Rpi5-4G (production OH5, another ZUI install, MQTT, MariaDB containers) totaling 1.75 GB RAM. Again, the transition to OH5M1 required a restart

EDIT: Debian 12 (bookworm?) 64-bit OS

If you are already using docker successfully, I see no reason to change it :slight_smile:
You already have tackled the typical problems for sure, and it’s unlikely that OH5 will add new problems.

Thanks. I suspected this was true but was concerned about the earlier comments about docker not being a good idea on a Raspberry Pi, in the context of OH5. I agree that docker on a low-resource machine is not a good idea, and that many Rpi models are (appropriately) very low resource, but I see no issue with docker on the higher-end models.