dhis2-instance-create — Creates a new dhis2 instance


/usr/bin/dhis2-instance-create [ OPTIONS ] name


Use this tool to create a new dhis2 instance in a tomcat container. The name that is specified will be used to create a new user and a new database with the name of that user. The user will be assigned to the dhis2 group. The user will have a home directory created in /var/lib/dhis2/<username>. This directory acts as both the DHIS2_HOME directory and also the CATALINA_BASE directory for the tomcat servlet container.

By default the instance is allocated 2G of heap space RAM. This can be adjusted by editing the parameters in /var/lib/dhis2/<name>/bin/

The servlet container is configured to run with an http connector pool of a maximum of 100 threads. This parameter can be adjusted by editing /var/lib/dhis2/<name>/conf/server.conf.

The servlet container configuration has been specially tweaked for running DHIS2. For example tomcat filters are used to ensure that all static content from the web application are cacheable by web proxy servers such as nginx or apache. The lib directory of the webapp has been explicitly placed in the application classpath so that additional jars such as java compiled apache camel routes can be made available to the DHIS2 application.

Note that a dhis2 war file is not deployed by default. See the manual page for dhis2-deploy-war for instructions to deploy a dhis2 war file over the internet from the latest stable global build, latest trunk build or from a user specified war file on the filesystem.

You need to be a member of the dhis2-admin group to use these and other tools for managing the instance. See the manual page for dhis2-create-admin.



http port


DO NOT create the database when creating the instance. Note if you use this option you will have to manually edit the properties file at /var/lib/dhis2/<instance>/dhis.conf.


dhis2-instance-create -p 8080 hmis

Creates a new instance called hmis listening on http port 8080.

See also

dhis2-create-admin (1), dhis2-deploy-war (1), dhis2-startup (1), dhis2-shutdown (1), dhis2-deploy-war (1) and dhis2-log (1).