The CloudSOE OpenMRS image runs the OpenMRS 3 reference application (gateway, frontend, backend and MariaDB) as a Docker Compose stack on a hardened Ubuntu base. The database is fully initialized at build time (normally a 30–60 minute import), so your first boot only rotates every baked credential to per-instance values and starts the containers: about five minutes, with a live progress meter when you SSH in.
What you’ll need
- An Azure subscription
- An SSH public key (password login is disabled in the image)
- About fifteen minutes
Step 1: Create the VM
- Find the CloudSOE OpenMRS offer in the Azure Marketplace and click Create.
- Choose a resource group, region and VM name.
- Pick a size with 8 GB of RAM (for example
Standard_D2as_v4); the four-container stack needs more memory than a typical web app. - Keep the OS disk at 100 GB: the image ships with multi-gigabyte container images and a pre-initialized database.
- Under Administrator account, select SSH public key, pick a username (e.g.
azureuser) and paste your key. This account is the uid-1000 admin user that owns the credentials file. - Create or attach a public IP so you can reach the system. For production, make it Static so the address survives stop/start.
Step 2: Open the firewall ports
nginx on the VM serves HTTPS on port 443 and proxies to the OpenMRS gateway, which also answers plain HTTP on port 80 (it is not redirected to HTTPS). In the VM’s network security group, allow inbound:
| Port | Protocol | Purpose |
|---|---|---|
| 22 | TCP | SSH administration |
| 443 | TCP | HTTPS (nginx on the host, proxying to the OpenMRS gateway) |
| 80 | TCP | Plain HTTP (OpenMRS gateway), optional |
Restrict port 22 to your own IP range where possible. For a medical records system, also consider restricting ports 443 and 80 to your clinic’s network or VPN. Port 80 is unencrypted; leave it closed unless you need it.
Step 3: Watch first boot (about 5 minutes)
On the very first boot the openmrs-firstboot service rotates the MariaDB passwords and the OpenMRS admin password to per-instance values, starts the container stack and writes your credentials file. SSH in while it’s working and a live progress meter appears automatically:
ssh <admin-user>@<public-ip>
# OpenMRS is initializing on this instance (takes ~5 minutes on first boot).
# / [######################## ] 61% Starting OpenMRS services
Press Ctrl+C to drop to your shell at any time; run openmrs-bootstrap-status to bring the meter back.
Step 4: Retrieve your credentials
Once the meter reaches 100%, read the credentials file:
sudo cat /opt/openmrs/default-openmrs-credentials.txt
This file (mode 600) holds the rotated admin password. The MariaDB passwords (also rotated) are in /opt/openmrs/.env, root-only.
Step 5: Log in to OpenMRS
From your own machine (note: an Azure VM often cannot reach its own public IP from inside), browse to:
- Clinical app (O3):
https://<public-ip>/for patients, visits, charts - Admin / legacy UI:
https://<public-ip>/openmrsfor modules, global properties, users, REST/FHIR APIs
The same login works for both: user admin with the password from the credentials file. Change it after first login. HTTPS uses a self-signed certificate generated for your instance on first boot, so expect a browser warning until you install a trusted one (see the configuration guide).
Next steps
- Configure OpenMRS: the compose stack, file locations, HTTPS certificates and managing containers
- Tips & tricks: backups, updates and troubleshooting