How to Set Up OpenEMR Using Docker on Linux: A Quick and Practical Guide for Clinics and Small Hospitals

How to Set Up OpenEMR Using Docker on Linux: A Quick and Practical Guide for Clinics and Small Hospitals

OpenEMR is a powerful, open-source electronic medical record (EMR) and practice management system. It offers robust features like patient management, scheduling, medical billing, prescriptions, and clinical decision support.

It’s widely adopted by healthcare providers due to its flexibility, cost-effectiveness, and compliance with HIPAA standards. If you're looking to set up OpenEMR quickly, Docker is the easiest and most efficient way to do it.

Here’s a step-by-step guide to get OpenEMR up and running with Docker.

OpenEMR : Open-source legacy EMR is accepting Donations/ Funding to move to phase 2.0
OpenEMR - one of the oldest functionional Open source EMR, announces through blog post about accepting donations.

Step 1: Install Docker

If you don’t have Docker installed, follow these instructions:

For Linux (Debian/Ubuntu):

sudo apt-get update  
sudo apt-get install -y docker.io  

Step 2: Pull the OpenEMR Docker Image

Open your terminal and pull the latest OpenEMR image:

docker pull openemr/openemr  

Step 3: Run the OpenEMR Container

Start the OpenEMR container with the following command:

docker run --name openemr -d -p 80:80 -p 443:443 -e OE_USER=admin -e OE_PASS=adminpass openemr/openemr  
  • --name openemr: Names the container openemr.
  • -p 80:80 and -p 443:443: Maps the container’s ports to your machine’s ports.
  • -e OE_USER=admin: Sets the admin username to admin.
  • -e OE_PASS=adminpass: Sets the admin password to adminpass.

Step 4: Access OpenEMR

Once the container is running, open your browser and go to:

http://localhost  

or for HTTPS:

https://localhost  

Step 5: Login Credentials

Log in with the following credentials:

  • Username: admin (or your custom OE_USER)
  • Password: adminpass (or your custom OE_PASS)

Managing the OpenEMR Container

Restart the container:

docker start openemr  

Stop the container:

docker stop openemr  

Tips for Persistent Data

If you’re deploying OpenEMR for production, you need to persist your data. Use Docker volumes to ensure data isn’t lost when the container stops:

docker run --name openemr -d \  
  -v openemr_data:/var/www/localhost/htdocs/openemr \  
  -p 80:80 -p 443:443 \  
  -e OE_USER=admin -e OE_PASS=adminpass \  
  openemr/openemr  

This command stores the data in a Docker volume named openemr_data.

Why Use Docker for OpenEMR?

  • Quick Deployment: No manual setup or configuration headaches.
  • Portability: Run the same OpenEMR environment on different machines.
  • Scalability: Easily scale your setup as your practice grows.
  • Isolation: Your OpenEMR instance is isolated, reducing conflicts with other applications.

For more details, check the official OpenEMR Docker documentation.

With Docker, setting up OpenEMR is fast, reliable, and straightforward. Whether you're a healthcare provider or a tech administrator, this method will save you time and ensure a smooth deployment.








Open-source Apps

9,500+

Medical Apps

500+

Lists

450+

Dev. Resources

900+

Read more