8.13. DHIS2 configuration reference

The following describes the full set of configuration options for the dhis.conf configuration file. The uncommented properties are mandatory. The commented properties are optional. The configuration file should be placed in a directory which is pointed to by a DHIS2_HOME environment variable. The comment (#) must be removed for a property value to take effect. You can copy and paste the following content as a viable starting point for your own configuration file.

# ----------------------------------------------------------------------
# Database connection for PostgreSQL
# ----------------------------------------------------------------------

# Hibernate SQL dialect
connection.dialect = org.hibernate.dialect.PostgreSQLDialect

# JDBC driver class
connection.driver_class = org.postgresql.Driver

# Database connection URL
connection.url = jdbc:postgresql:dhis2

# Database username
connection.username = dhis

# Database password (sensitive)
connection.password = xxxx

# Database schema behavior, can be 'validate', 'update', 'create', 'create-drop'
connection.schema = update

# Max size of connection pool (default: 40)
# connection.pool.max_size = 40

# ----------------------------------------------------------------------
# System
# ----------------------------------------------------------------------

# System mode for database read operations only, can be 'off', 'on'
# system.read_only_mode = off

# Session timeout in seconds, default is 3600
# system.session.timeout = 3600

# ----------------------------------------------------------------------
# Encryption
# ----------------------------------------------------------------------

# Encryption password (sensitive)
# encryption.password = xxxx

# ----------------------------------------------------------------------
# File store
# ----------------------------------------------------------------------

# File store provider, currently 'filesystem' and 'aws-s3' are supported
# filestore.provider = filesystem

# Directory / bucket name, refers to folder within DHIS2_HOME on file system, 'bucket' on AWS S3
# filestore.container = files

# Datacenter location (not required)
# filestore.location = eu-west-1

# Public identity / username
# filestore.identity = dhis2-id

# Secret key / password (sensitive)
# filestore.secret = xxxx

# ----------------------------------------------------------------------
# LDAP
# ----------------------------------------------------------------------

# LDAP server URL
# ldap.url = ldaps://300.20.300.20:636

# LDAP manager user distinguished name
# ldap.manager.dn = cn=JohnDoe,ou=Country,ou=Admin,dc=hisp,dc=org

# LDAP manager user password (sensitive)
# ldap.manager.password = xxxx

# LDAP entry distinguished name search base
# ldap.search.base = dc=hisp,dc=org

# LDAP entry distinguished name filter
# ldap.search.filter = (cn={0})

# ----------------------------------------------------------------------
# Application caching
# ----------------------------------------------------------------------

# Cache provider, can be 'ehcache', 'memcached', default is 'ehcache'
# cache.provider = memcached

# Cache servers, default is 'localhost:11211', applies to memcached
# cache.servers = localhost:11211

# Cache time in seconds, default is 600, applies to memcached
# cache.time = 600

# ----------------------------------------------------------------------
# Node
# ----------------------------------------------------------------------

# Node identifier, optional, useful in clusters
# node.id = 'node-1'