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 AWS account subscribed to the CloudSOE OpenMRS listing on AWS Marketplace
  • An EC2 key pair in your target region (SSH is key-based only; password login is disabled)
  • About fifteen minutes

Step 1: Launch the instance

  1. Open the OpenMRS listing on AWS Marketplace and click Continue to Subscribe, then Continue to Configuration.
  2. Pick your region and click Continue to Launch → Launch through EC2.
  3. Choose an instance type. t3.large (2 vCPU, 8 GB RAM) is the recommended starting point; the four-container stack needs more memory than a typical web app.
  4. Select your key pair, and keep the root volume at 100 GB: the image ships with multi-gigabyte container images and a pre-initialized database.

Prefer the CLI? Once subscribed:

aws ec2 run-instances \
  --image-id <ami-id-from-the-listing> \
  --instance-type t3.large \
  --key-name my-key \
  --security-group-ids sg-xxxxxxxx \
  --subnet-id subnet-xxxxxxxx \
  --tag-specifications 'ResourceType=instance,Tags=[{Key=Name,Value=openmrs-01}]'

Step 2: Open the firewall ports

nginx on the instance 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). Your security group needs these inbound rules:

PortProtocolPurpose
22TCPSSH administration
443TCPHTTPS (nginx on the host, proxying to the OpenMRS gateway)
80TCPPlain 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 ubuntu@<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

Browse to:

  • Clinical app (O3): https://<public-ip>/ for patients, visits, charts
  • Admin / legacy UI: https://<public-ip>/openmrs for 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