Deploying OpenEMR on Kubernetes in production

A planning guide to running OpenEMR on Kubernetes with the openemr-devops manifests, covering shared volumes, Redis Sentinel sessions, mTLS, replicas and when a managed service is the better base.

On this page

Deploying OpenEMR on Kubernetes in production: when the cluster is worth the complexity

Kubernetes fits teams that already operate clusters and need several OpenEMR web replicas that share sessions and certificates. If your organization has no cluster, no one on staff who can run one, or only a single clinic to serve, a Docker Compose deployment or a managed AWS package will usually leave you with less to operate. The openemr-devops project publishes Kubernetes manifests for running OpenEMR in production, and they address the parts that make a multi-replica setup different from a single server: a shared volume for the sites directory and certificates, Redis Sentinel session storage, mTLS between components and a replica count you can change without rebuilding the application. Before you adopt them, confirm the current manifest versions and the components they deploy in the openemr-devops repository, since those files, not this page, define what you will run.

OpenEMR is free software licensed under the GNU GPL v3.0, so there is no license fee to budget for the application itself. The cost of a Kubernetes deployment sits elsewhere: cluster operation, storage, database service, monitoring, backups and the staff time to upgrade all of them. Recent OpenEMR releases require PHP 8.3 or later and run on a MySQL- or MariaDB-compatible database, so confirm that your chosen database service and base image meet those requirements before you pick a version. The project also offers Docker deployment options, and the official image on Docker Hub is the starting point the Kubernetes manifests build on. Ask your team to name who will own cluster upgrades, image pinning and database maintenance before the first replica goes live.

This page covers how the Kubernetes deployment is built and what it takes to run it. It is not a substitute for a HIPAA risk assessment. The HIPAA Security Rule applies to covered entities and their business associates for all electronic protected health information they create, receive, maintain or transmit, and a cluster that runs OpenEMR is part of that scope. Your risk analysis must cover the cluster, its nodes, the storage, the database, the network paths and the people with administrative access. Use the OpenEMR GitHub repository for the application's release notes and the Kubernetes manifests, and treat your own assessment as the record that decides which controls are enough for your organization.

Which Kubernetes base and session model fit your environment

This table compares the deployment bases (self-managed Kubernetes, a managed service such as EKS, and single-host Docker or Ubuntu routes) and the session storage modes (native Redis and Predis Sentinel). Read each row against your own staffing and infrastructure constraints. The main takeaway is that Predis Sentinel session mode, available from OpenEMR 8.1.0, is the mode the project describes as recommended for Kubernetes deployments.

OptionBest fitMain trade-offWhen to choose it
Self-managed Kubernetes on your infrastructureOrganizations with a platform team and their own data center or private cloudYour team owns control plane upgrades, etcd backups, certificate rotation and node patchingYou already run Kubernetes clusters you control and have staff to operate them
Managed Kubernetes such as Amazon EKSOrganizations that want the provider to run the control plane in their cloud accountYou still own workloads, storage, networking, secrets and OpenEMR configurationYou want to offload control plane operations but keep data in your own accounts
Single host with Docker ComposeSmall practices or single-site deployments with one serverNo built-in replica spread, so a host failure takes the service downScale needs are modest and a single node meets your availability requirements
Single server with the Ubuntu installerSingle-site installs that prefer a packaged appliance on one hostScaling out later means rebuilding the topology rather than adding nodesYour team wants a packaged single-server install and accepts its single-host limits
Native Redis session storageLoad-balanced OpenEMR nodes with a simpler Redis setupRequires you to confirm the session features and TLS options your version supportsYour environment is less demanding on Redis topology and you verify the setup in testing
Predis Sentinel session modeKubernetes deployments with several OpenEMR replicas sharing sessionsAdds Sentinel components to deploy, monitor and test in your clusterAvailable from OpenEMR 8.1.0 and described by the project as the recommended mode for Kubernetes

How to set up OpenEMR on Kubernetes step by step

This sequence takes a cluster from a verified baseline to an OpenEMR deployment with shared storage, Predis Sentinel sessions, mTLS between components and several replicas, and ends with checks for login, session persistence and rollback.

  1. Confirm the cluster baseline and version support

    The platform team confirms which Kubernetes distribution and minor version the cluster runs and checks it against the Kubernetes releases page, which lists the three most recent minor releases and their end-of-life dates. Pick a version that will still receive patches for the planned life of the deployment, and confirm the control plane and node upgrade order from the version skew policy before anything is installed. Confirm the cluster has a working ingress, a storage class that supports shared read-write volumes, and an etcd backup plan. Done when the team has a written version record and a cluster that passes a basic node and DNS health check.

  2. Pin an OpenEMR image tag from Docker Hub

    Choose a dated or versioned tag from the official openemr/openemr image on Docker Hub, and record the exact tag in the deployment manifests rather than using a floating tag such as latest. Recent releases require PHP 8.3 or later, so confirm the tag's release notes match the database version and PHP runtime you plan to use. Pull the image into your private registry or mirror if your policy requires it, and scan it with your usual tooling. Done when the manifest references one immutable tag and the image pulls successfully on a test node.

  3. Provision an external MySQL or MariaDB database

    Create a MySQL- or MariaDB-compatible database outside the cluster, either as a managed service in your cloud account or as a database you already operate. Keep the database out of the OpenEMR pods so that replicas can be added and removed without touching patient data. Create a dedicated database user with rights limited to the OpenEMR schema, store its credentials in a Kubernetes Secret or an external secrets store, and enable TLS for database connections. Confirm backup and restore for this database with your own team before go-live. Done when OpenEMR's setup can connect from a pod and the restore test has been run at least once.

  4. Create shared volumes for sites and certificates

    Create a ReadWriteMany volume for the OpenEMR sites directory, which holds site configuration, uploaded documents and certificates, and mount it into every web pod at the same path. Shared storage is what lets several replicas serve the same site, so confirm with your storage provider that the class supports concurrent writes and encryption at rest. Block direct web access to sites/*/documents at the ingress or web server layer, as the Securing OpenEMR guide advises. Done when a file written by one pod is readable from a second pod and direct HTTP requests to the documents path are refused.

  5. Configure Predis Sentinel sessions on Redis

    Deploy a Redis master with replicas and Sentinel instances in your cluster or in a managed service, then set OpenEMR to Predis Sentinel session mode. Session mode became available from OpenEMR 8.1.0, and the Docker Hub listing describes it as the recommended mode for Kubernetes. Set the Sentinel endpoints and the service name in the OpenEMR configuration, and confirm that the session lock settings are sized for your replicas. Done when a forced failover of the Redis master completes and a logged-in user keeps their session without being asked to sign in again.

  6. Add mTLS between components

    Issue certificates from your internal certificate authority or a cluster certificate manager, then configure mutual TLS between the ingress and OpenEMR pods, between OpenEMR and Redis, and between OpenEMR and the database where your database supports it. Keep certificate rotation in the platform runbook, because expired certificates will stop pods from connecting. Store private keys in Kubernetes Secrets with encryption at rest enabled, because Secrets are stored unencrypted in etcd by default. Confirm the exact certificate options each component accepts in its own documentation before you configure them. Done when each connection is shown as encrypted and a connection with an untrusted certificate is refused.

  7. Scale to several replicas

    Increase the OpenEMR deployment to at least two replicas behind a single service, and confirm that every replica mounts the same sites volume, reads the same database and uses the shared Redis session store. Set a readiness probe so traffic only reaches pods that have finished starting, and set resource requests so the scheduler places pods on separate nodes. Confirm the replica count against the sizing your practice or network has agreed, since concurrency depends on the database and storage as well as the number of pods. Done when all replicas report ready and a page load routed to each pod returns the same site data.

  8. Verify login, session persistence and rollback

    Sign in through the ingress, then reload the page while the ingress directs requests to different pods and confirm the session persists. Delete one web pod and check that users on it are moved to a healthy replica without losing their session. Test a rollback by deploying the previous pinned image tag to a staging copy and confirming that the database schema matches what that version expects, since OpenEMR upgrades can change the schema. Keep a documented rollback procedure with the tag, the database backup point and the owner. Done when login, session persistence across pods and a successful rollback in staging have each been recorded in the change log.

Which state must be shared across OpenEMR replicas

Every replica that serves the same OpenEMR site must see the same state, or users will be logged out mid-workflow, documents will disappear from one pod and not another, and configuration changes will apply unevenly. Three kinds of state need planning before the first replica starts: the sites directory (site configuration, uploaded documents and certificates generated for the site), session data (which the session layer covers in the Redis section of this page), and the database, which is the single shared source of clinical data. Pods are disposable, so anything written only to a container's local filesystem will be lost when that pod is replaced. Decide which paths are mounted from shared storage, which are rebuilt from the image, and which live in the database before writing the manifests.

The shared volume needs a storage class that supports the access mode you intend. A ReadWriteMany volume is what allows several web pods to mount sites at once, and not every storage class offers it. Confirm with your cluster administrator or storage vendor which access modes the class supports, how file locking behaves under concurrent writes, and what latency the file share adds to page loads. Ask for the same confirmation for the certificate path if it is mounted separately. Do not assume that a volume that works with one replica will behave correctly with three.

Two exposure risks follow from putting documents on shared storage. Uploaded files under sites/*/documents must be blocked from direct web access at the ingress or web server layer, so a guessed URL cannot return a patient file. Setup scripts also need attention: remove setup.php and other admin scripts after installation, as the Securing OpenEMR guide recommends, and confirm that the rebuilt image or the init process does not recreate them on every pod start. Verify both controls from outside the cluster after each rollout. Treat the database credentials and any shared secret as state too, and deliver them through Kubernetes Secrets with encryption at rest configured, as covered in the secrets section.

Security controls to verify on a Kubernetes deployment

A Kubernetes deployment of OpenEMR inherits controls from three layers: the cluster, the ingress and service mesh, and the OpenEMR application itself. The cards below name the controls to verify in each layer before go-live. Verifying them does not make the deployment HIPAA compliant, because HIPAA has no certification and the risk analysis and policies remain the covered entity's responsibility.

Serve only HTTPS through the ingress

Configure the ingress so that only HTTPS traffic reaches OpenEMR, and consider exposing only port 443 externally. Confirm that plain HTTP is redirected or refused, that TLS certificates are issued and renewed automatically, and that no node port or debug service exposes the web pods directly. The Securing OpenEMR guide asks for the same restriction on any web server, so check it at the ingress and again inside the pod network.

Securing OpenEMR guide

Encrypt Secrets at rest

Kubernetes stores Secrets unencrypted in etcd by default, so database passwords, Redis credentials and OpenEMR keys are readable by anyone who can read the etcd data. Configure encryption at rest for Secrets, and confirm it works by reading a Secret directly from etcd after the change. Where the organization already runs a vault, consider the Secrets Store CSI Driver so that values never sit in etcd.

Secrets good practices

Restrict list and watch access

Anyone allowed to list or watch Secrets in a namespace can read every value in it, even without a get permission. Review the RBAC bindings for the OpenEMR namespace and remove wildcard verbs, cluster-wide bindings and default service account token mounts that the application does not need. Audit these bindings after every change to the deployment, because they tend to drift during incidents.

Apply Pod Security Standards

Set the Pod Security Standards level for the OpenEMR namespace, starting with the restricted profile where the image allows it. Check that containers run as a non-root user, disallow privilege escalation, drop unneeded Linux capabilities and do not mount host paths. Test the labels in warn or audit mode first, because the OpenEMR image may need specific writable paths for the sites volume.

Pod Security Standards

Enforce mTLS and rotate certificates

Where the design calls for mutual TLS between OpenEMR, Redis and other internal services, record which certificate authority issues each identity and who owns it. Test that a connection without a valid client certificate is refused, and document the rotation procedure, including how long before expiry it starts and how pods pick up the new certificate. Expired internal certificates are a common cause of outages in this kind of setup.

Enable MFA and strong passwords

OpenEMR's Administration Globals hold the password rules and MFA settings. Confirm in the admin screens that multi-factor authentication is enabled for clinical and administrative accounts, that the strong password rule, length limits, reuse prevention and expiration match the organization's policy, and that the hashing algorithm is set as intended. Because these are application settings, a Kubernetes change does not enforce them, so verify them after every upgrade.

Administration Globals

Back up etcd and test restores

The cluster state, including the Secrets and configuration that OpenEMR depends on, lives in etcd. Schedule regular snapshots with etcdctl snapshot save, store them outside the cluster with access controls, and test a restore with etcdutl on a separate environment. A backup that has never been restored is not yet a recovery plan, so record the time each restore takes.

Operating etcd clusters

Questions teams ask before running OpenEMR on Kubernetes

What does running OpenEMR on Kubernetes cost, and what drives it up?

No published price applies to this work, so the cost depends on the written scope. The main components are the cluster build (control plane, worker nodes and upgrade tooling), shared storage for the sites and certificates volumes, the database, the session tier (Redis Sentinel), and testing before go-live. Setup is one-time work. Node capacity, managed database and storage, backups, monitoring, and OpenEMR and Kubernetes upgrades recur. Costs rise with the number of replicas, the database high availability design, the number of sites in a multisite setup, and the depth of security testing. Ask for each component to be priced separately in the written scope, with the infrastructure cost paid to your cloud provider or data center and the DeployOpen work quoted on its own line.

Can a small team run OpenEMR on Kubernetes without outside help?

A small team can run it if it already operates Kubernetes in production and has someone who owns the storage, database and identity pieces. OpenEMR itself is a PHP application with a MySQL- or MariaDB-compatible database, and recent releases require PHP 8.3 or later, so the work is more than the container image. Shared volumes for sites and certificates, Redis Sentinel sessions, mutual TLS between services, and upgrade sequencing all need routine attention. If the team has never run a stateful application on Kubernetes, a fixed-scope build with documented runbooks is often easier to hand over than learning on a live clinical system. Check how many people can perform a restore and an OpenEMR upgrade without the original builder.

How long does a Kubernetes deployment of OpenEMR usually take?

Duration depends on scope and environment, and no supplied timeline applies. The largest variables are whether the cluster already exists and meets your standards, how many OpenEMR sites and replicas are required, whether an identity provider and an existing database are ready, and how much testing and documentation the organization needs before go-live. A new cluster build adds time for node provisioning, etcd backup design and access control. A deployment onto a cluster you already run is shorter. Ask for milestones in the written scope, with named client dependencies such as access, approvals and change windows, so the schedule reflects where delays are likely to occur.

What does the client need to provide before the work starts?

The work needs several inputs from your side before it can begin. Typical items include:

  • Cluster access, or a decision on whether to provision a new cluster, with a defined Kubernetes version and distribution
  • An identity provider for administrator and staff access, and a plan for how OpenEMR users are authenticated
  • A database decision, including whether a managed MySQL- or MariaDB-compatible service is acceptable, and its backup and encryption requirements
  • A network plan covering ingress, certificate management, allowed source ranges, and how the web tier is exposed
  • Named owners for change approval, backups, monitoring and the compliance evidence the organization must keep

Confirm each item and its owner in writing. Gaps in these inputs are the most common cause of schedule slips.

When is Amazon EKS a better base than a self-managed cluster?

Amazon EKS is usually the better base when your team already runs AWS, wants the control plane operated by the cloud provider, and prefers to spend its effort on OpenEMR rather than etcd, control plane upgrades and node lifecycle. A self-managed cluster fits better when you must run in your own data center or an air-gapped network, when policy forbids a particular cloud service, or when you already have a platform team that runs Kubernetes well. The choice also affects the database and storage design, because managed services change which pieces you operate. Compare the shared responsibility split, the managed database options, and how each base supports your backup and recovery plan. The EKS-specific packages are covered on their own pages.

Does running OpenEMR on Kubernetes make HIPAA compliance easier?

Kubernetes does not make an organization HIPAA compliant, and there is no HIPAA certification to obtain. The HIPAA Security Rule applies to covered entities and business associates for the electronic protected health information they handle, and the HHS FAQ states that no standard requires certifying compliance. Kubernetes can help you enforce some technical safeguards, such as access control, logging and encryption settings, but its defaults do not cover them. Secrets are stored unencrypted in etcd by default, so encryption at rest and least-privilege RBAC must be configured. Your risk analysis, policies, business associate contracts and workforce training still apply. Ask your compliance lead which controls the platform must evidence before the design is approved.

Should we test the deployment before it handles patient data?

Yes, testing before go-live is strongly advisable for a clinical system. Test the deployment for pod and secret handling, network exposure, authentication and session behavior, and the failure of a replica or Redis node. Test a restore from backup, and run an OpenEMR upgrade in a staging environment, since the 8.x line has specific database and PHP requirements. Security testing of the web application and its APIs can run alongside the build. DeployOpen performs security testing and prepares evidence for compliance assessments, but it does not issue audit reports or certifications. Ask for the test plan, acceptance criteria and the retest process in the written scope.

How the OpenEMR pods, shared storage, Redis and database connect

The diagram starts at the ingress, where TLS terminates at the edge before traffic reaches several OpenEMR web pods inside the cluster trust boundary. The pods share the sites and certificate volumes and keep sessions in a Redis Sentinel tier, and they reach the external MySQL or MariaDB database over mTLS. Check each hand-off: which links carry mTLS, which volumes must be shared across replicas, and that the database sits outside the cluster boundary under your own backup and access controls.

Traffic path, shared state and trust boundary for a multi-replica OpenEMR deployment.

Operating OpenEMR on Kubernetes after go-live

Pin every image to a dated tag and test each upgrade in a non-production namespace before it reaches the production deployment. OpenEMR releases on the GitHub releases page carry their own dates, and the 8.3.0 and 8.4.0 releases fixed security vulnerabilities in the FHIR APIs, the patient portal, billing, the fax and SMS module and the fee sheet. Those fixes matter for any cluster that exposes the portal or the FHIR endpoints, so the team needs a standing process: subscribe to the release feed, read each security note, rebuild the staging copy from the same manifests with the new tag, and run the login, portal, billing and FHIR smoke checks before promoting. Confirm with your own change board how quickly a security release must be rolled out, because that window is a policy decision, not a product fact.

Watch pod health and session behavior as separate signals. Readiness and liveness failures show up as restarts and endpoints dropping out of the Service, but a healthy pod can still log users out if Redis Sentinel failover is slow or the session lock settings are wrong. Track restart counts, failed probes, Sentinel failover events and the rate of re-authentication prompts, and set alerts on each. Replica counts should be reviewed after any change to the shared volumes for sites and certificates, because a node that cannot mount those volumes will fail in ways that look like application errors. Ask the platform team which metrics and dashboards they will own versus which the clinical operations team will read.

Backups of the database, the sites volume and the Redis configuration sit outside the cluster, and no Kubernetes object will restore them for you. Deleting a namespace or a PersistentVolumeClaim does not preserve patient documents, site configuration or the database contents, so the backup targets, retention and restore tests must be designed and owned separately from the manifests. The sibling operations page covers backup tooling and monitoring in detail, and the multisite and Redis pages cover what must be shared between web nodes. Before go-live, confirm in writing who runs the restore drill, how often it runs and where the encryption keys for backups are held.

How to decide between Kubernetes and a managed base

This sequence tests whether your organization can run Kubernetes for OpenEMR over the long term, and produces a written record of the evidence that points to either a self-managed cluster, a managed service such as EKS, or a simpler Docker Compose or single-server route.

  1. Confirm existing Kubernetes operating capacity

    Start by listing who already runs Kubernetes in your organization, which clusters are in production, and who is on call for them. Your platform or infrastructure lead should confirm whether that team can take on OpenEMR as one more workload without new hires. Done means you have a named owner for cluster upgrades, node patching, certificate rotation and etcd backups, and a record of how many hours per week that team already commits to existing clusters.

  2. Define replica and multisite requirements

    Write down how many OpenEMR web replicas you need for availability, whether you will run several clinics or entities from one codebase, and how many concurrent users each site expects at peak. Your clinical operations lead and the platform owner should agree on these numbers together. Done means a one-page requirements note that states replica count, whether multisite is in scope, and the expected load shape, which later drives the session and shared-volume design.

  3. Check storage, database and identity constraints

    Map where patient documents, the sites directory and certificates must live so that every replica sees the same files, and confirm which MySQL or MariaDB-compatible database you will use and where it is hosted. Include identity: confirm whether users will sign in through LDAP, Active Directory, Google Sign-In or multi-factor authentication. Ask your storage team to confirm the shared-volume options available in your environment. Done means a constraints table that names the storage class, database host, identity source and the team that owns each.

  4. Compare operating burden against EKS and Docker Compose

    Set out the three realistic bases side by side: a self-managed Kubernetes cluster, a managed Kubernetes service such as EKS, and a Docker Compose or single-server route. For each, list the tasks your team would own, including control plane and node upgrades, Kubernetes version skew, etcd backup and restore, and secrets encryption at rest. Ask your architecture lead to confirm which items your cloud provider or distribution handles. Done means a comparison sheet with an owner against every operational task, so the choice rests on who does the work, not on preference.

  5. Verify compliance and evidence obligations

    Confirm with your compliance lead which regulations and internal controls apply, such as HIPAA Security Rule safeguards, audit logging and access reviews, and whether any EU obligations apply to your processing. Ask them to name the evidence an assessor will request, such as access logs, backup test records and change history, and check that your chosen base can produce it. Done means a signed list of evidence sources mapped to the team that generates each one. This list does not certify compliance; independent auditors do that work.

  6. Decide the base and record the rationale

    Using the comparison and constraints, the platform lead and the CISO choose one base and write a short decision record that states what you chose, what you rejected and why. Include the assumptions that would change the decision, such as a new clinic joining or a change in the team that runs Kubernetes. Done means an approved decision record stored with your architecture documentation and a named reviewer for the next scheduled review.

  7. Request a fixed written scope

    Send the decision record, requirements note, constraints table and evidence list to the implementation partner you are considering, and ask for a written scope covering deliverables, responsibilities, acceptance checks and the handover of operating runbooks. Ask the partner to state which items are one-time work and which recur as retainers. Done means a scope document both parties have signed, with a quote derived from that scope, so the price follows from what has been agreed.

How DeployOpen scopes, builds and supports OpenEMR on Kubernetes

DeployOpen plans and builds OpenEMR on Kubernetes inside your own cloud accounts, data centers or air-gapped networks. We start from a written scope that covers the cluster, shared storage, session handling, transport security and the operating runbooks, so your team can review each decision before the build begins.

How we scope

  • Confirm the OpenEMR release line, PHP and database versions, and whether you run the official image or the openemr-devops manifests.
  • Map which Kubernetes platform you will run on, including whether a managed service such as EKS is the better base for your team.
  • Agree in writing how many web replicas, shared volumes, Redis Sentinel and mTLS paths are in scope, with deliverables and timelines set before work starts.

How we build

  • Configure shared volumes for sites and certificates, and verify that every replica reads the same site configuration and documents.
  • Set up Redis Sentinel session storage, then test failover and session lock behavior with the web replicas under load.
  • Harden the deployment with restricted pod settings, encrypted Secrets, least-privilege RBAC, and HTTPS-only ingress, then test the result against your written requirements.

How we hand over

  • Deliver the manifests, configuration values and a runbook covering upgrades, rolling restarts, certificate rotation and etcd backup.
  • Document each control and where its evidence lives, so your compliance and security teams can review the deployment without us in the room.
  • Walk your platform and clinical IT staff through the operating procedures and record the handover as part of the agreed deliverables.

How we support

  • Offer ongoing support, OpenEMR and Kubernetes upgrade planning, and continuous testing as a retainer after handover.
  • Plan upgrades against the Kubernetes version skew policy and the OpenEMR release notes, and retest the deployment after each change.
  • Ask for a quote built from the written scope, which should itemize build, testing, documentation and any recurring support.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.