Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


The LFHC Distro project gathers the OpenMRS modules for the (Ref App-like) custom LFHC distribution.

Generating the distribution package

Make sure to install all custom or in-development modules into your local .m2 Maven repository because the generated file will reference those modules.

Then within /openmrs-distro-lfhc execute:

mvn clean package

Launching a server running the distribution

1) Install the OpenMRS SDK

Start by installing the OpenMRS SDK if it has not been done yet:

mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk

Additionally, here is how to update the SDK when it is already installed:

mvn openmrs-sdk:help -U
2) Setup the server

(We assume that MySQL server 5.6.x is installed, runs on port 3306 and that root's password is 'pass'.)

The generated distribution properties file should be in ./target/openmrs-distro-lfhc-VERSION/, cd into its directory and run

mvn openmrs-sdk:setup -DserverId=lfhc-distro -Ddistro=./ -DdbUri=jdbc:mysql://localhost:3306/openmrs_lfhc-distro -DdbUser=root -DdbPassword=pass

You will be asked to pick your database setup, choose 1:

Which database would you like to use?:
1) MySQL 5.6 (requires pre-installed MySQL 5.6)
2) MySQL 5.6 in SDK docker container (requires pre-installed Docker)
3) Existing docker container (requires pre-installed Docker)

Which one do you choose? [1/2/3]: 1

You will be asked to pick your JDK. Choose JDK 1.7 for pre-Platform 2.0-based distros or JDK 1.8 otherwise:

Which JDK would you like to use to run this server?:
1) JAVA_HOME (currently: /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre)
2) /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home/jre/
3) /Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home/jre/
4) Other...

Which one do you choose? [1/2/3/4]: 2
3) Run the server

When the setup has completed, run the server:

mvn openmrs-sdk:run -Dport=8080 -Ddebug=58080 -DserverId=lfhc-distro

(This will run the webapp on port 8080 while opening the remote debugging port 58080.)

Wait until you see this line INFO: Starting ProtocolHandler ["http-bio-8080"] to launch the webapp in your browser at http://localhost:8080/openmrs. This will trigger the initial setup:

alt tag

Close the browser page and go back to the shell to watch until the log flow becomes still, this takes about 2 min. At that point you can access the running distribution at http://localhost:8080/openmrs and login with the default admin credentials: admin / Admin123.