running openmrs locally

Good morning everyone, please i’m new to openmrs, i cloned the “openmrs-distro-referenceapplication”, and followed the steps in the readme.md file, to run the application. the logs show everything works fine, but the only page i can access is “localhost => the nginx page”. but other pages show a 404 page, and there’s no indication of an error of which i can see

If you’re new to OpenMRS, the recommended way is to run it using Docker.

Please try the following:

  1. Clone the repository:
git clone https://github.com/openmrs/openmrs-distro-referenceapplication.git
cd openmrs-distro-referenceapplication

  1. Start the application using Docker:
docker compose up

  1. Once all containers are up, access OpenMRS at:
http://localhost/openmrs
1 Like

Hi @arhas23 , Welcome to OpenMRS :waving_hand:

What you’re seeing is normal. When you open http://localhost, it only shows the nginx page, which means nginx is running correctly. The OpenMRS application is not available at the root URL.

After starting the app using Docker, please access OpenMRS using one of these URLs:

  • http://localhost/openmrs/spa (recommended UI)

  • http://localhost/openmrs/login.htm (legacy UI)

Other URLs may return a 404 error, and that is expected behavior. Also, on the first run, OpenMRS can take a few minutes to finish starting up, so please wait a bit before refreshing.

If you only want to try or explore OpenMRS (and not develop locally), you can skip local setup entirely and directly use the hosted instance at: https://dev3.openmrs.org/openmrs/spa

Thanks very much, I appreciate taking the time to explain this to me. It’s working fine now.

Please I have another question. What’s the recommended way to deploy to a hospital? Will it be to use the openmrs reference application and then add the other sub-modules, e.g. stock management?