Raspberry Pi 4 4GB - can I run other things along side OpenHab?

I am looking at buying a Raspberry Pi 4 4GB. I would like to start playing around with OpenHAB. I would also like to do other things on the Pi such as a locally running web server for apache/php/mysql or nodejs maybe. And maybe running pihole on there as well. In the future I could see wanting a VPN server. Can the Pi 4 4GB handle OpenHAB plus other services running? Would it be wise to have them all running in the same environment? Or should I try and virtualize to seperate out environments? Can you virtualize on the Pi 4?

Since a Pi 3B+ with 1GB of RAM can run openHAB and sometimes other services, the Pi 4 with 4GB should definitely be able to run more than just openHAB.
Although you can run Docker on the Pi, I have not tested to know how well the OH Docker image is supported.
Docker may make sense on a 4GB Pi. I know some non-OH people run Docker on a 1GB Pi.

I ran pihole and openhab on a pi3 for over a year with no issues at all. I now have openhab on the same pi3 and pihole and a media server on a pi2. The only reason I moved pihole was stop my network from not working everytime I rebooted or backed up my openhab setup, I use pihole as my DHCP server as well.

1 Like

A Pi has enough ressources to handle stuff beyond OH, but installing anything else next to OH is not really recommended for reliability reasons (more stuff = more software to potentially impact OH and more administration = more risk this can break your OH service).

1 Like

You can run many things on the PI at the same time. The one thing that I find heavy is the MotionEyeOS which monitor an IP camera stream; the CPU is hot and constantly at around 30% load. OH is nothing compares to that.

However, It’s always a balance. On one hand, you want to maximize the usage on the PI. On the other hand you have to think of the worse case when the PI goes down dues to SDCard failure or other hardware failure. How many of your services would be affected? Can you wait until you restore the PI.

I would personally distribute the services over multiple PI to reduce single point failure. I am current running PI Hole and OH on one, MotionEyeOS on another. And I just got a PI 4 1GB. I plan to run secondary PI Hole and NFS there.

1 Like

It’s no trouble to run docker and different containers on an Raspby 4 with 4GB. I’m currently running containers for openHAB, InfluxDB, Grafana, Frontail & Homebridge and use around 30% memory while the average CPU load is way below that.
I would recommend to just try it - if you are already set on using a docker setup you can easily use additional Pis in the future if you have so many different containers that you want to use more machines…

My start into docker with openhab was this post and the linked github repo: https://community.openhab.org/t/the-openhab-2-5-0-update-process-my-experience/

1 Like

I have a rasp 4 with 4gb that run openhab, pivpn (wireguard), phoscon and nextcloud (so php, mariaDB, apache). I never had some problem but I think @mstormi is right when says every more services you add, you could have a problem on all services. Maybe containers are the way, but I never tried containerized openhab on rasp because I’m afraid of latency.