OpenMRS on Docker, Kubernetes or VMs: which deployment model fits your team
Your team must host OpenMRS inside its own infrastructure, and the deployment model you pick shapes everything after it. The documented paths in the OpenMRS download page are three: the O3 Reference Application's Docker Compose stack, the 2.x platform as a WAR file for Apache Tomcat with an existing MySQL database, and the standalone package with an embedded database. The Compose stack runs MariaDB, the OpenMRS backend, two Nginx services (a frontend serving the 3.x modules and a gateway) and an optional Certbot service for SSL certificates. Kubernetes is not a documented OpenMRS deployment path, so choosing it means your team writes the packaging, maintains it through upgrades and supports it yourself.
Compose suits a team that wants a small, reproducible stack on one host. The stack is compact to keep in version control and rebuild, and it fits a team that can run a Docker host, back up the MariaDB data and keep the Nginx configuration current. The trade-off is that one host carries the whole stack, so high availability and host failover need a design your team owns. VMs suit teams with established VM operations, hypervisor backups and patch routines, and a 2.x WAR install, because Tomcat with MySQL, MariaDB or PostgreSQL sits inside tooling your operators already run. Confirm with OpenMRS and your implementer whether each path is supported for production use, and which database engine each one expects.
Kubernetes suits a team that already runs a cluster and can own the packaging. The cluster brings scheduling, restarts and secret handling your platform team already operates, but you still decide where the database runs (inside the cluster or on a service outside it), how persistent storage is provisioned, how Nginx routing and TLS are handled and how images are built and upgraded. Before you commit, ask OpenMRS and your implementer in writing which components are supported in production, whether a maintained container image or chart exists for your chosen version, and who answers for a failed upgrade. Keep those answers with the platform version you select, because the 2.x Platform and the O3 reference application carry separate version numbers.
How OpenMRS deployment on containers compares with OpenMRS on VMs
This table compares running OpenMRS in containers with running it on virtual machines, using the latest supplied versions as anchors: platform 2.8.1 and O3 3.7.1. Read each row as a list of things to confirm with the vendor, the implementer or your own environment, since several operational details depend on your setup. The main takeaway is that the Compose path gives a ready starting point for packaging, while the VM path leaves more of the stack assembly with your team.
| Factor | Option A: containers | Option B: virtual machines |
|---|---|---|
| Platform version | O3 3.7.1 (released July 13, 2026) through the Compose stack. Confirm the version your Kubernetes manifests will track. | Platform 2.8.1 (released October 7, 2025) as a WAR on Tomcat or Jetty, or the standalone package. Confirm which package and release you deploy. |
| Databases supported | MariaDB in the O3 Compose stack. Confirm whether you keep it or move to an external database under Kubernetes. | MySQL, MariaDB or PostgreSQL for the core on Tomcat or Jetty. Confirm which one your WAR path uses. |
| SSL handling | Certbot is an optional service in the Compose setup. Confirm renewal and certificate handling for any Kubernetes ingress you build. | TLS is set on Tomcat or a reverse proxy you configure. Confirm the setup and renewal process with your security team. |
| Scaling and availability | Replicas and failover come from your orchestrator. Confirm with the implementer that the core and database support multiple instances. | Any extra nodes and load balancing are yours to design. Confirm session handling and database failover with the implementer. |
| Packaging ownership | O3 Compose files come from the reference application repository. Confirm who writes and maintains any Kubernetes manifests. | You assemble Tomcat, the WAR or package, modules and JVM settings. Confirm who patches the operating system, Java and Tomcat. |
What each OpenMRS deployment model runs
OpenMRS ships as a 2.x platform and as the 3.x O3 frontend, and each packaging option bundles a different subset of them. Each card names the component, the model it belongs to, and the operational question your team must answer before choosing it.
O3 Compose backend and database
The O3 Reference Application's Docker Compose setup runs a MariaDB database and the OpenMRS backend as separate services. Under Docker, the patient records sit in the database container's storage, so the key question is where the MariaDB data is stored and how you back it up. Confirm the volume location, the dump schedule and a tested restore before go-live, because an untested backup gives no assurance. On VMs or Kubernetes, the same question moves to the database host or to a managed database service you run.
Reference application repoNginx frontend for 3.x modules
The Nginx frontend container serves the 3.x micro-frontend modules that make up the O3 user interface. These modules are static assets delivered to the browser, while the backend and database handle clinical data. Because the frontend is a separate container, you can rebuild or replace it without touching the database, but you must confirm which backend release it expects. The question to settle is which module versions the frontend serves and whether they match your backend, checked in staging before each change.
Nginx gateway and optional Certbot
The Nginx gateway is the entry point that routes requests to the frontend and backend containers in the O3 Compose stack. Certbot is an optional service that obtains and renews SSL certificates, so you can leave it out if TLS terminates at a load balancer or an existing reverse proxy. The question to settle is who owns certificate issuance and renewal, and whether your security team allows automated renewal from inside the stack. On VMs or Kubernetes, that decision usually belongs to the ingress or proxy your infrastructure team already operates.
2.x core on Tomcat or Jetty
The 2.x platform is a Java core built with Maven that runs on Tomcat or Jetty and connects to MySQL, MariaDB or PostgreSQL. The download options include a WAR file for Tomcat with an existing MySQL database, which fits a VM your team already operates. Because the core supports three database engines, the question is which engine you standardize on and how your DBA backs it up and restores it. Check that choice against your hosting team's skills before you commit to a deployment pattern.
openmrs-core repositoryStandalone package with embedded database
The standalone package ships OpenMRS with an embedded database, so a single host can run the platform without a separate database server. That makes it a quick route for a pilot, a training environment or a single-site test, and it has the fewest moving parts of the options. The question to answer is whether the embedded database meets your backup and restore standard, and how you would move the data to an external database if the site outgrows the package. Ask the project how the embedded database is supported for production use before you rely on it.
OpenMRS download optionsKubernetes layer you package yourself
The OpenMRS download options cover a Docker Compose stack, a standalone package, a WAR file and an SDK, so a Kubernetes deployment is a layer your team writes. You own the manifests or chart, secrets, ingress, persistent storage and the upgrade sequence. That gives you control over scaling and rollouts, but it also gives you the operating work. The question to settle first is how the database runs in the cluster, with storage, backup and failover planned before the first deployment. Ask the OpenMRS community whether a maintained chart exists before you build your own.
How a request reaches the O3 stack and its database
Requests start in the browser and reach the Nginx gateway, which receives browser traffic first in the O3 Docker Compose stack. The gateway sends 3.x interface requests to the Nginx frontend, which serves the 3.x modules, and API calls to the OpenMRS backend. The backend reads and writes patient data in MariaDB. Certbot is optional and manages SSL certificates at the gateway edge. The lower subgraph shows the 2.x path, where Tomcat or Jetty runs the OpenMRS WAR against MySQL, MariaDB or PostgreSQL. That is a different deployment model, so confirm which path your team will run before you size hosts, plan backups or choose a container platform.
The diagram shows topology only. It makes no sizing recommendation.
How sizing and high availability change with the deployment model
Reliable sizing for OpenMRS depends on your workload, so the starting point is a load estimate you build yourself: expected concurrent users, patient and encounter volume over the retention period, uploaded document and image storage, and the number and speed of integrations such as FHIR calls, laboratory interfaces and identity lookups. Turn that estimate into a staging environment built on the same deployment model as production, then load-test it with representative clinical workflows, including bulk registration and heavy reporting queries. Watch database CPU, connection pool use, JVM memory in the Tomcat or Jetty container and disk growth over several days. Ask your implementer to show the test results and the assumptions behind them before you accept a sizing.
Availability depends less on the OpenMRS process itself than on what sits around it. A single Docker Compose host is one failure domain: a host outage, a failed disk or a bad upgrade takes the whole record system down until the host is restored, so recovery design rests on backups and a restore procedure someone has actually rehearsed. A set of VMs behind a load balancer removes the single application host, but it only works cleanly if uploaded files, configuration and user sessions are handled consistently across nodes and the health checks reflect whether the application is truly serving. A cluster with its own scheduler and persistent storage adds automatic restart and rescheduling, but it also brings control plane, storage class and networking components that your team must operate, patch and troubleshoot. Choose the model by who will carry the failure response at 2 a.m. and how quickly they can restore service.
The database usually decides the recovery design. OpenMRS core supports MySQL, MariaDB and PostgreSQL, and the O3 Docker Compose stack runs MariaDB as one of its four services, so a restarted container is rarely the hard part, while a lost or corrupted database is. Confirm with OpenMRS and your implementer which database replication and failover pattern is supported for your chosen database and version, including whether several application nodes can share one writable primary, how failover is detected, and whether the application needs a restart or reconfiguration afterward. Then rehearse a restore to a point in time, time it, and check that backups also cover uploaded files and module configuration. Write these answers into the runbook before you choose the deployment model, since they limit which models are safe to run.
Upgrades, backups and monitoring for each OpenMRS deployment model
This table compares how each OpenMRS deployment model handles upgrades, backups, monitoring, host and image patching, and staffing. Read the upgrade row first, because moving between the 2.x platform and the O3 stack is a project in either model. The main takeaway is that containers shift effort toward image and orchestration work, while VMs keep the work closer to server administration.
| Operating factor | Option A: containers (Compose or self-packaged Kubernetes) | Option B: VMs (Tomcat with WAR or standalone) |
|---|---|---|
| Upgrades | Pin image tags and redeploy. A move from 2.x to O3 is a re-platform with form migration. See the transition guidance. | Redeploy the WAR or standalone package after a tested backup. O3 needs a new stack and form migration. See the transition guidance. |
| Backups | Back up the database, uploaded files and module or configuration volumes. Rehearse a restore into a clean stack. | Back up the database, uploaded files, and module and configuration files on the host. Rehearse a restore on a second VM. |
| Monitoring and logging | Watch application and database health, disk, and certificate expiry. Collect container logs centrally. | Watch application and database health, disk, and certificate expiry on the host. Collect Tomcat and application logs centrally. |
| Patching the host or base images | Rebuild images to pick up base image fixes, then redeploy. Patch the container hosts separately. | Patch the guest OS and Java runtime, then restart Tomcat or the standalone service. Test each change in staging first. |
| Skills each model needs | Container build and registry work, Compose or Kubernetes operations, and database administration. Kubernetes adds cluster operations. | Linux administration, Tomcat or Java service tuning, and database administration. Often easier to staff where the team already runs Linux servers. |
How an OpenMRS upgrade or re-platform runs, step by step
This sequence moves an existing OpenMRS deployment to a new platform version or hosting model without losing clinical data or workflows. Each step has a named owner and a check that must pass before the next one starts. The internal team owns clinical sign-off throughout, while the implementer carries most of the build, restore and test work.
Confirm the target versions and deployment model
Fix the destination before anything is copied. Decide whether you stay on the 2.x platform or move to the O3 Reference Application, and check the current release on the OpenMRS download page. At the time of writing that page lists Platform 2.8.1, released October 7, 2025, and O3 3.7.1, released July 13, 2026. A move from 2.x to O3 changes the user interface and may require form migration, which the OpenMRS 3 (O3) vs OpenMRS 2.x comparison covers. Who does it: the internal team decides with the implementer. Done when a signed version record lists the platform or O3 release, modules, database engine and deployment model.
Take and verify a database backup
Take a full database backup from production, along with a copy of the configuration that defines the instance, including module lists, runtime properties and any files the deployment depends on. Restore the backup into a scratch database to prove it is readable, then compare record counts for key patient, encounter and observation tables against the source. Who does it: the implementer runs the backup, and the internal team confirms retention periods and where the copy is stored under its own data handling rules. Done when the test restore matches the source, the backup is encrypted, and it is stored outside the host being changed.
Build a staging copy on the target model
Stand up a staging instance in the target model, whether Docker, Kubernetes or virtual machines, using the same platform or O3 version, database engine, modules and identity settings as the plan. Restore the verified backup into it and run the upgrade or re-platform steps exactly as the runbook lists them, logging every change and deviation. Who does it: the implementer builds it, and the internal team provides hosts, network access and the SSO or OAuth2 settings the copy must use. Done when the runbook has run once end to end, the service starts cleanly, and the schema upgrade completes without errors in the logs.
Test clinical workflows and integrations end to end
Run the test cases that clinicians sign off, covering patient registration, encounters, orders, medication, results and reports. Test every interface the site uses, such as FHIR, SMART-on-FHIR, OAuth2 login or laboratory feeds, and confirm that each one returns the expected records. If you move from 2.x to O3, test each migrated form against its legacy version before sign-off. Who does it: clinical leads and the internal team define and approve the cases, and the implementer executes them and fixes defects. Done when every signed case passes with a named tester and no critical defect remains open.
Plan cutover with a tested rollback path
Schedule the production cutover with a freeze window agreed by clinical leadership and a final backup taken just before the change. Set a written decision point after which rollback becomes harder, and rehearse the rollback on staging: restore the pre-cutover backup, repoint the load balancer or DNS, and confirm users can sign in and read records. Who does it: the internal team owns the go or no-go decision and communication to sites, and the implementer runs the change and the rehearsal. Done when the rollback rehearsal passes, a named person can authorize rollback, and the signed plan lists owners, checks and the rollback trigger.
Which team should run OpenMRS on which model
A small IT team running one or two servers without a container platform usually fits a virtual machine or bare host running the OpenMRS 2.x platform as a WAR file under Apache Tomcat with MySQL or MariaDB. A pilot may use the Standalone package with its embedded database. This model keeps the number of moving parts low and reuses the patching and backup habits the team already applies to Linux and database servers. The team owns every layer, so the operating work must be planned for from the start.
- Skills to hold already: Linux server administration, Tomcat service management, and tested backup and restore for the chosen database.
- Hand to an implementer: the first installation, form and concept configuration, and a written upgrade runbook that the team can repeat without the implementer present.
- Single-host limits: one server is a single point of failure, so high availability needs a second host, a database design that supports it and a failover test before go-live.
- Who patches what: the team owns the operating system, Tomcat, the database and OpenMRS upgrades, so confirm that staff time exists for each of them.
Confirm on the OpenMRS download page which package and database combination your planned version supports, and whether the embedded-database package is intended for your production load.
A platform engineering team that already runs Kubernetes and has container security controls usually fits a containerized deployment. The team can start from the O3 Reference Application Docker Compose layout, which runs MariaDB, the OpenMRS backend, an Nginx frontend and an Nginx gateway, with an optional Certbot service for certificates, and translate those services into cluster objects. The model works best when the cluster already provides image scanning, admission policy, secrets handling and centralized logs, so OpenMRS inherits those controls and does not need a parallel set.
- Skills to hold already: container image build and scanning, Kubernetes workload and storage operations, and ingress and TLS certificate management.
- Stateful database: the database runs as a service in the Compose layout, so the team must settle persistent volumes, backup schedules and restore tests before the first deployment.
- Hand to an implementer: mapping the Compose services to cluster objects, configuring the OAuth2 Login or SMART on FHIR settings your sites need, and writing the upgrade and rollback procedure.
- Security controls to confirm: whether admission policy accepts the images, where database and OAuth2 secrets are stored, and whether application audit logs reach the cluster log pipeline.
Confirm which OpenMRS line your cluster will run, since the latest O3 release is 3.7.1 (July 13, 2026) and the latest 2.x platform is 2.8.1 (October 7, 2025), and the two are packaged differently.
An implementer or national program team that will deploy and support several sites usually needs one standard build that every site receives, with per-site configuration kept separate from it. That build can run as containers on Kubernetes where sites have reliable connectivity and trained staff, or as templated virtual machines where they do not. Several national distributions, including KenyaEMR, run on OpenMRS, so the program team can ask the implementer to start from an existing reference build instead of a blank installation.
- Skills to hold already: configuration management, release management across sites, and a process for testing upgrades in a staging environment before they reach live sites.
- Hand to an implementer: a versioned and tested build for the chosen model, a site onboarding runbook and templated per-site configuration.
- Operating model: agree in writing who patches each site, who holds the backups, who receives alerts and who approves each upgrade.
- Cost drivers: OpenMRS has no paid edition, so cost sits in implementation, hosting, support and staff time. Ask for a quote built from a written scope that lists sites, environments and support arrangements.
- Confirm before choosing: where patient data may be hosted for each site under local rules, and whether the implementer will support the version your program standardizes on.
Check the packages and version lines on the OpenMRS download page before you standardize on a build, because each line has its own packaging.
What running OpenMRS yourself takes in effort, skills and cost
How much effort does it take to run OpenMRS yourself?
Effort depends mainly on how many environments you run, how much you customize, and how many people you need to keep the system patched and backed up. A single-site install with a stock configuration needs far less ongoing work than a multi-site deployment with custom modules, single sign-on, and a tested backup and restore routine. The work falls into four areas: provisioning the database and application tier, configuring identity and access, setting up backup and monitoring, and applying platform and module upgrades on a schedule. Ask any implementer to list which of these they will hand over and which your staff must own after go-live.
Can a team run OpenMRS on Docker Compose without outside help?
A team with solid Docker and Linux skills can start the reference distribution without outside help. Its Compose setup runs a MariaDB database, the OpenMRS backend, an Nginx frontend serving the 3.x modules, and an Nginx gateway, with an optional Certbot service for SSL certificates. Getting it running on a test machine is a different task from running it for patient data, which requires decisions about backups, secrets, access control, logging and hardening that you must make and document yourself. Confirm whether your team can own those decisions before you decide to go it alone.
Do you need Kubernetes for high availability with OpenMRS?
No. Kubernetes is one way to reach high availability, and it is optional. High availability depends on the database tier, how application instances share state and sessions, how traffic is balanced across them, and how quickly a failed node is replaced. Kubernetes can restart containers and spread replicas across nodes, but it does not make a single database resilient to node loss, and it adds cluster operations work your team must staff. For a single-site setup, a pair of virtual machines with a replicated database and tested failover may meet your availability target with fewer moving parts, so define the target first and then choose the platform.
Is there an official Helm chart or Kubernetes operator for OpenMRS?
Confirm with OpenMRS and your implementer whether an official Helm chart or Kubernetes operator exists before you plan a deployment around one. Ask OpenMRS through its community channels, and ask your implementer whether they maintain their own charts or manifests and who supports them. Any chart you adopt should be reviewed for database handling, persistent storage for module and configuration files, secrets management, and upgrade ordering before it touches patient data. Until that review is complete, treat the Docker Compose and virtual machine paths as the basis for your runbook.
How long does an OpenMRS deployment or upgrade take?
The timeline depends on the written scope, so no duration can be stated here. Scope drives it: the number of sites and environments, the volume of data to migrate, the number of custom modules and forms, the identity integration, and whether you move from the 2.x platform to the O3 reference application. The latest releases are O3 3.7.1 and Platform 2.8.1, so confirm which line your deployment runs before you plan an upgrade. Ask any implementer for a written plan that lists test cycles, cutover steps and the sign-off each phase needs, then check it against your change calendar.
What does a DeployOpen engagement for OpenMRS cost?
DeployOpen does not publish a price list, and a quote follows from the written scope agreed before work starts. The main cost drivers are the scope itself, the number of environments, the data migration, and whether you add an ongoing retainer for support, upgrades or continuous testing. Scope and migration work are usually one-time costs, while retainers recur on terms you agree in writing. Ask for a quote that lists each deliverable, each environment, the migration assumptions and what is excluded, so you can compare it with the staff time your own team would spend.
Does OpenMRS have a paid edition or a license fee?
No. OpenMRS has no paid edition, and the platform is released under the MPL 2.0, so the cost of running it is hosting, staff time and any implementer services. Hosting covers compute, storage, the database, backups and network paths in your cloud, data center or air-gapped network, and it recurs as long as the system runs. Staff time covers installation, identity setup, monitoring, upgrades and module work, and it recurs for as long as your team owns those tasks. Implementer services are optional and billed for the work they cover, so ask any vendor to separate one-time build work from recurring support in the quote.
How DeployOpen scopes and runs OpenMRS deployments
DeployOpen plans and runs OpenMRS inside your own cloud accounts, data centers or air-gapped networks, so we work within the hosting model your team already runs. Most engagements are fixed-scope, with deliverables and timelines agreed in writing before work begins. The approach below covers the same arc for Docker, Kubernetes and virtual machine deployments, with the platform and database choices confirmed at scoping.
How we scope
- The written scope records which hosting model you choose and the reasons behind it.
- Scope covers sizing inputs: user counts, sites, data volume, and backup and recovery targets to confirm.
- Database engine (MariaDB, MySQL or PostgreSQL), SSO and audit logging needs are fixed before any build starts.
How we build
- Deploy inside your own cloud accounts, data centers or air-gapped network using the packaging chosen at scoping.
- For Docker, the O3 Compose stack (MariaDB, backend, two Nginx services) is the reference point.
- Virtual machine builds use the Tomcat WAR or Standalone package, with Kubernetes manifests scoped separately and confirmed in writing.
How we hand over
- Handover documents the topology, configuration keys, secrets locations, and the upgrade and restore runbooks.
- Backup and restore are tested in the target environment before handover, with results recorded in the documentation.
- Compliance evidence, such as access settings and audit logs, is packaged for independent auditors to review.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after handover.
- Upgrades for OpenMRS 2.x or 3.x are planned as their own scoped work, with release notes reviewed first.
- Security testing and retests after fixes can be added to the written scope or a retainer.

