My Journey with OpenMRS: Setting Up OpenMRS SDK on Windows
Introduction
As a passionate open-source enthusiast, I recently embarked on my journey with OpenMRS, a powerful open-source platform revolutionizing healthcare data management. My goal was to set up the OpenMRS SDK on Windows, understand its workings, and contribute to this amazing community. This guide shares my experience, step-by-step setup instructions, challenges faced, and how I resolved them—hoping to help others who are just getting started!
Prerequisites : Before setting up OpenMRS SDK, ensure you have the following installed :
Java Development Kit (JDK) 8 or higher – Download JDK
Verify installation by running : java -version
If JDK is not recognized, set JAVA_HOME
environment variable. Guide
Apache Maven – Download Maven
Add Maven to the Windows PATH
. Guide
Verify installation by running: mvn -version
Docker (For MySQL setup using containers) – Download Docker
Ensure Docker is running before proceeding.
Run the following command to check Docker status: docker --versio
Docker setup guide: Docker Docs
Git (Recommended for version control) – Download Git
Installation guide: Git Docs
Follow These Steps
Step 1: Installing OpenMRS SDK : The OpenMRS SDK simplifies development, allowing developers to create and manage OpenMRS servers locally. Here’s how I installed it on Windows
Open Command Prompt (cmd) as Administrator.
Run the following command to install OpenMRS SDK:
mvn org.openmrs.maven.plugins:openmrs-sdk-maven-plugin:setup-sdk
Verify the installation:
mvn openmrs-sdk:help
If successful, you should see output similar to:
OpenMRS SDK 3.13.6
😟Possible Issues & Fixes:
Error: 'mvn' is not recognized as an internal or external command
Ensure Maven is added to system
PATH
.Restart the terminal after installation.
Java version compatibility issue
Ensure JDK 8+ is installed and
JAVA_HOME
is correctly set. JDK Setup Guide
✅Step 2: Setting Up an OpenMRS Server Now that the SDK was installed, I proceeded to set up my first OpenMRS server.
Run the setup command:
mvn openmrs-sdk:setup
When prompted, enter a server ID (any unique name for your server, e.g.,
my_openmrs_server
).Choose server type:
Enter
1
for OpenMRS distribution (recommended for beginners).
Select the latest stable distribution version. Check Latest Version
Set up ports:
Default web app port:
8080
Remote debug port:
1044
Choose MySQL installation method:
Enter
2
to install MySQL 5.6 in a Docker container.Ensure Docker is running. Docker MySQL Setup
Wait for the setup to complete. A success message will appear:
Server configured successfully...
Possible Issues & Fixes:
Docker is not running or not installed
Start Docker manually or reinstall it. Docker Fix Guide
Port 8080 is already in use
Use a different port when prompted during setup.
✅Step 3: Running the OpenMRS Server : Once the server was configured, I started it with:
mvn openmrs-sdk:run -DserverId=my_openmrs_server
(Replace my_openmrs_server
with the server ID you chose.)
After some time, I saw the message:
OpenMRS is ready for you at http://localhost:8080/openmrs/
Possible Issues & Fixes:
Server startup takes too long
Ensure your system has at least 4GB RAM available.
Restart Docker if using MySQL container.
Port conflict error
Change the port number in the setup command.
✅Step 4: Logging into OpenMRS
Open a web browser and go to:
http://localhost:8080/openmrs/
Wait for the initialization process to complete.
Use the default credentials to log in:
Username:
Admin
Password:
Admin123
🎉 Success! I had my OpenMRS instance up and running! 🎉
Possible Issues & Fixes:
Login fails even with correct credentials
Try restarting the OpenMRS server.
Clear browser cache and try again.
Next Steps in My OpenMRS Journey Setting up OpenMRS SDK was just the beginning! My next steps include:
Exploring OpenMRS module development – Learn More
Contributing to OpenMRS by fixing beginner-friendly issues – GitHub Issues
Engaging with the OpenMRS community via Talk Forum & GitHub – Join Here
Final Thoughts This journey has been exciting and rewarding! OpenMRS SDK makes it easier to work with the platform, and I encourage anyone interested in open-source healthcare tech to give it a try. If you're starting out, don’t hesitate to ask questions in the OpenMRS Talk Forum—the community is incredibly helpful!
🚀 Ready to get started? Install OpenMRS SDK and begin your own journey today! 🚀
Feel free to connect with me on GitHub: deepakjain06 or discuss this journey in the OpenMRS forum!