🎬

Video tutorial coming soon.

🏥 Setup OpenEMR — Self-Hosted Electronic Health Records

Deploy OpenEMR on Ubuntu with Docker — a comprehensive open-source EHR/EMR system covering patient records, scheduling, billing, e-prescribing, and clinical decision support. The most feature-complete free medical records platform available.

⚠️ This script is provided for demo and testing purposes only. Not intended for production use.

📦 Resources & Setup Scripts

Grab the automated bash script from GitHub to follow along with the video.

Automated install — OpenEMR with MySQL database in one command.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/clinic/openemr/openemr-ubuntu.sh
chmod +x openemr-ubuntu.sh
sudo bash openemr-ubuntu.sh

Tutorial Steps

1 Download the Script

Fetch the OpenEMR install script from the Prisma Docker library:

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/clinic/openemr/openemr-ubuntu.sh

2 Make it Executable

Grant execute permission before running:

chmod +x openemr-ubuntu.sh

3 Run the Installer

The script installs Docker if needed, then deploys OpenEMR with a MySQL database backend. The setup wizard launches on first browser access.

sudo bash openemr-ubuntu.sh

4 Complete the Setup Wizard

Open your browser on port 80, follow the installation wizard to configure the database connection, create your admin account, and set your practice details.

http://<your-server-ip>

Ports Used

PortPurpose
80 / 443OpenEMR Web UI (HTTP / HTTPS)
3306MySQL Database (internal only)

Overview

OpenEMR is the world's most widely used open-source electronic health record (EHR) and medical practice management system. It is ONC-certified, HIPAA-compliant when properly configured, and actively maintained by a global community of physicians, developers, and health IT professionals. OpenEMR covers the full outpatient practice management workflow: patient demographics, appointment scheduling, encounter documentation, diagnosis coding (ICD-10), e-prescribing, medical billing (CPT codes, insurance claims), lab results, immunisation records, and patient portal. It supports over 30 languages and is used in over 100 countries by private practices, community health centres, and NGO clinics.

Why Use It

OpenEMR provides commercial EHR functionality at zero licensing cost. For a practice that would otherwise pay $500–$2,000 per provider per month for Epic, Athena, or similar systems, self-hosting OpenEMR on a modest server represents massive savings. ONC certification means OpenEMR meets US Meaningful Use requirements. The active community ensures regular security patches and new feature development. The Docker deployment makes version upgrades and environment replication significantly easier than the legacy tarball installs.

When You Need It

    Who Should Use It

      Real Use Cases

        Main Features

          How to Use After Installation

            Security Best Practices

              Ports and Firewall Notes

              OpenEMR's web interface runs on port 80 (HTTP) and 443 (HTTPS) when behind a reverse proxy. MySQL uses port 3306 internally — this must never be exposed externally. For HIPAA compliance, the entire application must be served over HTTPS and access restricted to authorised clinical staff. Consider IP allowlisting or VPN access for the admin interface, and only expose the patient portal via HTTPS to a filtered external path.

              Backup and Maintenance

                Common Mistakes

                  Troubleshooting

                    Alternatives

                    OpenMRS is the better choice for HIV, TB, and maternal health programmes in developing countries — its concept dictionary is more flexible for disease-specific workflows. GNU Health covers full hospital operations (inpatient, surgery, pharmacy) that OpenEMR lacks. For US practices needing certified EHR incentive compliance with more support options, commercial systems like Athenahealth, DrChrono, or Practice Fusion offer managed alternatives. Globally, iCliniq and similar regional EHR platforms may have better local regulatory compliance certifications. DHIS2 is complementary for aggregate disease reporting alongside OpenEMR for individual records.

                    When Not to Use It

                    If you need a full hospital information system with inpatient ward management, surgery, and pharmacy, OpenEMR is not the right tool — choose GNU Health or a commercial HIS. If your practice is in the US and you need guaranteed ONC certification for Medicare incentive programmes, verify your OpenEMR version's certification status before deploying — not all versions are certified. If your IT team cannot commit to ongoing HIPAA hardening, security patching, and backup management, a managed EHR service reduces compliance risk. For large multi-specialty group practices, OpenEMR's configuration complexity may outweigh the savings compared to a properly negotiated commercial EHR contract.

                    Need Help Setting Up OpenEMR?

                    PrismaTechWork provides end-to-end infrastructure services — from initial deployment and security hardening to ongoing monitoring, automated backups, and dedicated support. Whether you need a single-server setup or a multi-site network, our team ensures your infrastructure is built right, secured properly, and maintained reliably.

                      Contact Us

                      Frequently Asked Questions

                      Is OpenEMR HIPAA compliant?

                      OpenEMR provides the technical controls required for HIPAA compliance, but a default installation is NOT automatically HIPAA compliant. HIPAA compliance requires additional steps: HTTPS with a valid certificate, full audit logging enabled, strong access controls configured, encrypted database storage, staff training documentation, a Business Associate Agreement (BAA) with your hosting provider, and documented security policies. The OpenEMR community publishes a HIPAA compliance checklist — work through it completely before using the system with real patient data.

                      What does ONC certification mean for OpenEMR?

                      ONC (Office of the National Coordinator for Health IT) certification means OpenEMR meets the US federal standards for Electronic Health Record technology, including criteria for clinical decision support, e-prescribing, data portability (FHIR/HL7), and Meaningful Use requirements. ONC-certified EHRs qualify providers for Medicare/Medicaid incentive programmes and are required for certain US regulatory reporting. Check the ONC Health IT Certification Program database to confirm the specific OpenEMR version you deploy holds current certification.

                      Can OpenEMR handle medical billing and insurance claims?

                      Yes — OpenEMR has a full billing module supporting electronic claim submission (X12 837P), explanation of benefits processing (835 ERA), and accounts receivable management. It integrates with US payers via clearinghouses like Change Healthcare and Availity. Configuration requires correct NPI (provider), tax ID, payer IDs, and fee schedule setup. The billing module is primarily US-centric; international billing workflows require customisation. A billing specialist should configure and test the module before processing real claims.

                      How do I enable the patient portal?

                      Go to Admin → Globals → Portal and enable the Patient Portal. Configure the portal URL (your HTTPS domain), set the patient notification email (SMTP settings under Admin → Globals → Notifications), and enable the features you want (appointment requests, secure messaging, lab results). Patients receive a portal invite email when you create their account. The portal requires HTTPS — it will not function correctly over plain HTTP.

                      Does OpenEMR support telehealth?

                      Yes — OpenEMR has a built-in telehealth module that integrates with Zoom for Healthcare for HIPAA-compliant video consultations. Providers can initiate video calls from within the encounter workflow and patients join via a link in the patient portal. The telehealth module requires a Zoom for Healthcare account (not standard Zoom — the healthcare tier includes the required BAA). Third-party integrations with other HIPAA-compliant video platforms are also available via API.

                      How do I upgrade OpenEMR to a new version?

                      Always back up the MySQL database and OpenEMR data volume before upgrading. Update the Docker image tag in your docker-compose.yml to the new version, then run docker compose pull followed by docker compose up -d. On first startup, OpenEMR runs database migration scripts automatically. Monitor the container logs during the upgrade. For major version upgrades (e.g., v6 to v7), read the release notes carefully — some upgrades require manual steps or configuration changes.

                      Can OpenEMR be used outside the United States?

                      Yes — OpenEMR is used in over 100 countries. It supports multiple languages, international date and address formats, and non-US diagnosis coding systems (ICD-10 internationally, not just the US adaptation). The billing module is primarily US-focused (CPT codes, US insurance payers), but the clinical documentation, scheduling, and patient portal work globally. International deployments typically disable or ignore the billing module and use local billing systems. Community-contributed language packs and regional configurations are available.

                      What are the minimum server requirements for OpenEMR?

                      For a small practice (1–5 providers, under 50 concurrent users): 2 vCPU / 4 GB RAM / 50 GB SSD. For a medium practice (5–20 providers): 4 vCPU / 8 GB RAM / 200 GB SSD. OpenEMR's PHP backend is memory-intensive — allocate at least 512 MB PHP memory limit and tune MySQL's innodb_buffer_pool_size to 50–70% of available RAM. SSD storage significantly improves performance for large patient databases. Store backups on a separate volume or offsite — losing the database in a disk failure without backup is catastrophic.