OpenEMR on Raspberry Pi 400

Here is my setup to get OpenEMR on a Raspberry Pi 400 as a server, should work on other pi’s as well.

Install Raspberry Pi OS Lite (64-bit) to a SSD with Raspberry Pi Imager
(you can use a SD card but not recomended for production, and I will also be adding software RAID 1 (2 USB SSD’s) at a later time, which is recomended. Make sure to use the blue USB jacks on the Pi)
Boot and set up your login

login

type:
sudo apt update -y && sudo apt upgrade -y

sudo raspi-config and set your time zone (option 5, L2) and turn on SSH with options 3, I 1

sudo reboot

now goto another computer and use Putty to login to raspbian then type:

sudo apt-get install apache2 mariadb-server libapache2-mod-php libtiff-tools php php-mysql php-cli php-gd php-xml php-curl php-soap php-json imagemagick php-mbstring php-zip php-ldap php-intl
answer Y (just reurn)

sudo mysql_secure_installation
and set a password then answer n to Switch to unix_socket authentication return for rest of questions.

sudo service apache2 restart

sudo service mariadb restart

sudo wget Download openemr-7.0.3.tar.gz (OpenEMR)

tar -pxvzf download

sudo mv openemr-7.0.3 /var/www/html/openemr

now using a browser goto to ip of emr/openemr and follow the setup

click 1 then 2 and enter your passwords in this screen then click 4

then goto terminal and type:
sudo nano /etc/php/8.2/apache2/php.ini

use ctrl w to find each entry and varify or change it to the sugested values starting with short_open_tag and then save the file with ctrl x

click step 5

cd /etc/apache2
sudo nano apache2.conf
copy and add the following to the end of this file:

<Directory “/var/www/html/openemr”>
AllowOverride FileInfo
Require all granted

<Directory “/var/www/html/openemr/sites”>
AllowOverride None

<Directory “/var/www/html/openemr/sites/*/documents”>
Require all denied

crtr x and y to close

click Proceed to select a theme

select a theme

click proceed to final step

click start and login with your admin creds.

it works? if so logoff, close browser goto terminal and type:

sudo wget https://www.open-emr.org/patch/7-0-3-Patch-4.zip

sudo mv 7-0-3-Patch-4.zip /var/www/html/openemr

cd /var/www/html/openemr

unzip 7-0-3-Patch-4.zip and answer A for all

using browser goto your ip/openemr/sql_patch.php

click login

close the browser and sudo reboot

now you can log in at serverip/openemr using the browser

1 Like

Hi @Craig_Diamond welcome to the community and thanks for a v cool contribution!

I’m curious if you have any projects in mind that this could be used for?
I suppose the Raspberry Pi has v low power requirements? One thing that occurs to me takes advantage of that would be running a clinic on solar power far away from civilization.

This is great!

  • HT

This proof of concept has already been proven by a couple folks.
Suggest search forum and issues.

This is actually for a small clinic as a proof of concept, it will either be run at the clinic air gapped, or in the cloud on another system. It does use about 6 watts (using a small USB SSD). It has no moving parts especially fans so should be reliable and quiet. Easy and cheap to replace hardware. The Pi’s 400 4 meg of ram and Quad core makes it quite responsive. A Pi 500 (8g ram) with 2 SSD’s in RAID 1 would be the best setup for pi’s. But I don’t have one of those currently. The Pi 400/500 have a big built in heatsink and keyboard making them great for servers.

Update:

The Manage Modules wasn’t working in the above setup and 2 more commands need to be entered at the end before reboot or at a later time.

sudo a2enmod rewrite
sudo systemctl restart apache2

Now Mangage Modules will work.

This setup also works on Debian 12.11 (bookworm) on a HP Enterprise server…after logging into the super user account with su