Liferay Service Environment Variables

The Liferay service has a range of environment variables that are used to configure the service, its connection to other services, and the DXP installation itself. You can use Liferay Cloud-specific environment variables, or you can define variables that override DXP portal properties.

Overriding Portal Properties

You can use environment variables in the Liferay service to override configurations normally defined in portal properties files.

Check the portal properties documentation to find the environment variable name (“Env”) for each corresponding portal property. For example, you can override the portal property with the environment variable, LIFERAY_COMPANY_PERIOD_DEFAULT_PERIOD_TIME_PERIOD_ZONE.

See Defining Environment Variables for more information on adding them to the Liferay service.

Converting Portal Property Names to Environment Variables

If the portal properties documentation does not have a direct translation of a portal property, then you can also convert the property to an overriding environment variable yourself.

Environment variables overriding portal properties:

  • Must not start with a digit.

  • Must have the prefix LIFERAY_ added in front of them.

  • Must only consist of uppercase letters, digits, and the underscore (_) character. Any character that does not fit this constraint must be converted to its corresponding CharPool or Unicode endpoint (converted to decimal).

To meet these requirements, you must convert any portal properties to this format. This allows Liferay Cloud to properly recognize the full name and match it to its corresponding portal property.

Use these steps to convert a portal property name to an environment variable name:

  1. Convert any characters contained in the name that are not a letter, digit or underscore (including periods) to a corresponding CharPool or Unicode endpoint, and surround them in underscores.

    For example, convert the period character (.) to _PERIOD_, or _46_ (if using Unicode).

  2. Add the prefix LIFERAY_ to the start of the variable name.

  3. Convert any letters to upper case.

For example, taking the portal property name setup.wizard.enabled, then using CharPool endpoints, you can convert it to the environment variable named: LIFERAY_SETUP_PERIOD_WIZARD_PERIOD_ENABLED.

Environment Variables Reference

The following environment variables may be set through the environment variables UI or the Liferay service’s LCP.json file:


Default Value




Sets the database port configuration used by the readOnly user. Overrides the DATABASE_SERVICE_PORT infra environment variable if it is defined.


The URL used to make the database connection. This may be used to directly set the database name and host. The value should start with jdbc:mysql://.


Allows for specifying the MySQL driver the Liferay service uses. In DXP versions 7.0 and 7.1, this is also used for the cluster configuration.



Whether to enable clustering and communication between nodes.


A string of characters that is part of the URL (prefix) of your Dynatrace SaaS account. Use this together with the LCP_PROJECT_MONITOR_DYNATRACE_TOKEN secret.


-Xms4096m -Xmx12288m

JVM options that will be appended to CATALINA_OPTS to override the default recommended options. The recommendation is to set -Xms to 25% of the Liferay service’s available memory, and -Xmx to 75%.


If you are still using version 3.x.x services, then use LIFERAY_JAVA_OPTS instead of LIFERAY_JVM_OPTS to specify the JVM options. See Understanding Service Stack Versions for more information on checking the version.


These variables must instead be defined as Secrets for the Liferay service:


Default Value



A string of characters that you can find in your Dynatrace account at Deploy DynatraceStart installationSet up PaaS monitoringInstaller Download.


The database name used for database connections (jdbc, jdbc ping, and read-only user connections).


The database password used only for the jdbc (and jdbc ping) configurations.


The read-only user’s username.


The read-only user’s password.


The primary database user’s user name. Used for the jdbc and jdbc ping connections.