Wiki Spaces


Get Help from Others

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


Page tree
Skip to end of metadata
Go to start of metadata

Runtime Properties

These properties are loaded when a webapp is started. It is used to specify database connection settings, custom look and feel per installation, sensitive data, etc.

This file is created by the initialization wizard and does not have be created manually as of 1.5.0. 

In the following descriptions, {WEBAPP NAME} is used in place of your web applications name (the name of the war file you loaded). Often this will be openmrs.

Do not use {APPDATA} in your path. OpenMRS will not render it. It is only used here as an example. In Windows 7+ this is C:\Users\currentuserrunningtomcat\AppData\Roaming\OpenMRS. In Windows XP and below this is C:\Docs and Settings\currentuserrunningtomcat\Application Data\

In some versions of windows, this can be found at C:\Windows\System32\config\systemprofile\Application Data\OpenMRS

While in some others, it can be found at C:\Windows\SysWOW64\config\systemprofile\Application Data\OpenMRS

As of version 1.8, OpenMRS will look for the runtime properties file in this order:

  1. The current directory:

  2. Using the environment variable

  3. User's home directory
    • Windows:

    • *Linux:

      ~/.OpenMRS/{WEBAPP NAME}

      (NOTE: On Linux, in some occasions, it is still necessary to set the


      environment variable to point to your file in order to get OpenMRS to read it.)

  4. In the current directory

Prior to version 1.8 the "current directory" was the last location searched for the runtime properties

The runtime properties that can be overwritten are shown below with their default values and a couple of available optional properties:

# OpenMRS Runtime Properties file
# (comments starting with a pound sign "#" are ignored)

### Database connection properties

## If set to true, allows automatic database updates

# Allow/Disallow uploading of a module via the web

# If set to true, all patients will be names will be displayed as below

### Debugging options

### Customization Options
## If the custom setting is a folder, only files contained in the customization will be overwritten

### Other
## Set the directory that OpenMRS uses for its application data
## Will be used as base dir for modules, generated reports, etc
## Defaults to C:/Docs&Settings/username/Application Data/OpenMRS for windows
## Defaults to ~/.OpenMRS for *nix
## (As of build
# application_data_directory=/opt/openmrs
## Displays optional extra data in the Legacy UI admin screens footer,
## alongside OpenMRS version... etc.
## (As of Legacy UI module 1.7.0)
#legacyui.footer.extradata=Docker Image 45f156d

### Encryption Settings
## WARNING! Changing these values will cause all encrypted data to be invalidated!
## Randomly set upon fresh installation but not during upgrade process.
## OpenMRS built-in defaults are:

# These properties are deprecated as of 1.7.0

Where is my runtime properties file?

When OpenMRS starts up, it will print a message to the server log file about where it is.  Look for the string "Using runtime properties file: " and the path following it.


  1. On Suse Linux Enterprise Server 11, with OpenMRS 1.8.3 and Tomcat 7.0.23, even with the global variable specified it wouldn't find the runtime properties file.  To get it to run, I created a symbolic link to where I actually had the runtime properties file, where the catalina.out log said it was looking for the file.

    cp -s /home/openmrs/.OpenMRS/ /srv/www/apache-tomcat-7.0.23/

    1. Is it possible that the global variable you defined was not being applied to the tomcat process?  Did you try defining the variable within the Tomcat startup script?

      1. Thanks for your suggestions Burke.

        It's likely that the variable wasn't getting defined properly, as I tried to access the variable as root, and it wasn't working.  I tried defining the global variable within the tomcat startup script.  I also tried defining the variable in the vi /etc/profile.local.  Neither worked.  Since I found a work-around, I decided to share it on this page.

  2. Looks like openmrs platform 1.6.7 (< 1.7) fails looking up to a wrong path with the application_data_directory=/opt/openmrs definition! see:

    WARN - Listener.getRuntimeProperties(561) |2015-12-23 20:52:09,173| Unable to find properties file: /Users/k-joseph/.OpenMRS/

    Where the data directory is /Users/k-joseph/.OpenMRS/MoH_EMR