Wiki Spaces


Get Help from Others

Q&A: Ask OpenMRS »
Discussion: OpenMRS Talk »
Real-Time: IRC Chat


Skip to end of metadata
Go to start of metadata

OpenMRS Standalone provides a simplified, all-inclusive installation option with both an embedded database and web server. You can have a local copy of OpenMRS running within minutes: simply download and expand the archive, and then run the extracted openmrs-standalone.jar file. Your browser will open a new instance of the OpenMRS system. The default username is "admin" and the default password is "Admin123".

OpenMRS Standalone is a great way to evaluate and explore OpenMRS capabilities. It may also be useful for small-scale production environments. At this time we are still developing operational experience with the standalone in production environments.

Since the embedded database & server are production-quality and the OpenMRS code is the same as our enterprise release, we have high expectations for the standalone. Before you choose the standalone, be aware that we are still gaining experience with this version in production environments.  If you have any questions or concerns, let us know through our mailing lists, Twitter (@openmrs), etc. We're listening!



You must have Java 6+ installed on your system to run OpenMRS. If you are running Linux, use Java 1.6u23 or newer due to a known bug, which results in errors like Cannot run program "chmod": error=12, Cannot allocate memory.


Step 1

Download and unzip the standalone file

Step 2

Execute the jar file in that folder:

OpenMRS will install itself the first time it is run.  The installer will offer an option to install demo data (demo concepts and/or patient data). 

If you have a Java 1.8 installed, the standalone may fail to start. You can run the standalone with a specific version of Java by giving the full command line to the java executable. For example:

See below for a list of command line options.

Do NOT delete or rename folders after decompressing the standalone package. They are used by the standalone jar file and it expects them to be in the exact locations where they already are.

GUI Mode Options

Tomcat Port

This is the port at which to run Tomcat

MySQL Port

This is the port at which to run MySQL

File → Quit

This stops Tomcat and MySQL and then closes the application

File → Launch Browser

This opens the OpenMRS login page for the current web application context

File → Clear Output

This clears the output log in the user interface text area, but does not clear the log file written on the file system


This button runs Tomcat, which will automatically start the MySQL database engine if it was not already running. For the embedded MySQL, the first connection automatically starts the MySQL engine


This button stops Tomcat and then also stops the MySQL database engine, without closing the application

Minimizing or maximizing the application window does not have any effect on the server. The Close window icon will stop the server (behaves as File → Quit) but will first ask you to confirm.

Command Line Mode Options

-commandlineRun from the commandline


Use to override the MySQL port in the runtime properties file


Use to override the Tomcat port in the runtime properties file


Use to start the server


Use to stop the server


Use to launch a new browser instance

-noninteractiveNo prompting, installs demo data
-noninteractive -expertNo prompting, installs without demo data (just basic metadata)
-noninteractive -emptyNo prompting, installs with an empty database

Authentication Information

After running the standalone jar, it will take you to the OpenMRS log in web page where you can log in with the following default username and password:

OpenMRS username: admin

OpenMRS password: Admin123 or test

The MySQL database has these credentials by default:

MySQL username: openmrs

MySQL password: randomly generated at initial startup. Look in file under connection.password

How to connect to the MySQL database

Go to the extracted standalone folder and copy the password from the openmrs-runtime.propertiesfile. Then go to the database/bin folder and execute this at the commandline:

That will prompt you for a password which you copied from the openmrs-runtime.propertiesfile.

If you are using graphical tools like Navicat and others, just create a new connection and enter the appropriate properties of username, password, port, etc as in the run-time properties file.

If running windows, then you can change the above command to: mysql.exe -u openmrs -p

How to change the embedded Tomcat memory

You can override the default tomcat memory by changing these values in the "vm_arguments" run-time properties file property as below:

vm_arguments=-Xmx512m -Xms512m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:NewSize=128m

How to run the embedded Tomcat in debug mode

You can run the embedded tomcat in debug mode by appending values to the "vm_arguments" run-time properties file property as below:
vm_arguments=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5000

After starting the standalone with those vm arguments, if you are using an IDE like eclipse,

Go to "Run->Debug Configurations...". Click on "Remote Java Applications", then click "New". Type in the title. Set the port as 5000 and click the Debug button. Feel free to change the port to any other value.

How to upgrade OpenMRS in a Standalone

See Upgrading OpenMRS

How to profile with YourKit

You can profile the standalone with YourKit by appending values to the "vm_arguments" run-time properties file property as below:
vm_arguments=-agentpath:<full agent library path>

This is an example:  vm_arguments = -agentpath:/Projects/

You can get details of the vm arguments from:


  • If you already have an installed instance of OpenMRS and do not want the standalone one to use the same database, you need to do three things:
    1. In the standalone extracted folder, rename the openmrs.war file in  "tomcat/webapps" to something different. e.g  openmrs-1.7.war, openmrs-1.8-beta.war, openmrs-1.8.war, etc.
    2. In the standalone extracted folder, rename the run time properties file to a name corresponding to the one you have given the war file. e.g the above three examples would have the following respective run time properties file names:,,
    3. Finally delete the openmrs folder (which was expanded from the war file) from the "tomcat/webapps" directory.
  • If you try connecting to the MySQL server from commandline and get this error message: "ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)":
    • Add this "&server.socket=/tmp/openmrs.sock" (without the double quotes) at the end of the value in the connection.url key of the runtime properties file, and then restart the standalone application. If after doing that, you still get the same error message, then on your command line, add this: --socket=/tmp/openmrs.sock
    • Then you can connect with something like: ./mysql -u openmrs -p --socket=/tmp/openmrs.sock
  • If you have any server-side parameter that you want to add or used to add in the my.cnf file, simply add it to the connection.url in the runtime properties file in this format: &server.parametername=value.
    • For instance, if you wanted something like: max_allowed_packet=32M, you would add it as:  &server.max_allowed_packet=32M
  • If you choose Expert Mode on the first time standalone screen, you will go through the database setup wizard where you will enter the mysql user name as openmrs and the password should be copied from the runtime properties file under a key named: connection.password

Known Issues

Showing 20 out of 25 issues Refresh

Request New Feature or Report Bug

Please create a ticket in our issue tracker under the "OpenMRS Standalone" project.

Technical Documentation

The standalone is an executable jar. Inside the jar is a Java embedded MySQL jar and an embedded Tomcat jar. (TODO, add links to mysql and tomcat pages) The Tomcat home folder is the directory where you unzipped the standalone. The tomcathome/webapps already has the openmrs war file inside of it, ready to be run. When you execute the standalone jar, MySQL and Tomcat are started on open ports. Because the openmrs war file is in the tomcat webapps directory, it starts automatically.

Code for the standalone can be found in git:

See the readme.txt file in the openmrs standalone code for instructions on how to build, package, and release the standalone application.

  • No labels


  1. Some one put information on this page which is not related to the standalone version of OpenMRS. I have removed and backed it up on the Non-Standalone Information child page.

  2. Running OpenMRS Standalone on Ubuntu 14.04, I needed to

    • Add &server.socket=/tmp/openmrs.sock to the end of the connection.url in the runtime properties file (as suggested in the tips).
    • Create a file called "mysql" in the main folder of the standalone (same folder as runtime properties)

      mysql (in same folder as runtime properties)
    •  Issue command chmod 755 mysql on that file to make it executable

    After that, I can go into the OpenMRS Standalone folder and type this command to run MySQL connected to its database:

    If manually setting the socket file doesn't cause any harm, perhaps we could do provide this by default. (smile)


  3. How does a developer go about building a standalone version themselves?