Default environment variables

The Open Liberty environment variables in the following list can be configured in the server.env file to customize the Liberty environment. You can configure Open Liberty environment variables in your server.env file to customize the Open Liberty environment. The ${wlp.install.dir} configuration variable has an inferred location that is set to the parent of the directory that contains the launch script.

The following table lists the default Open Liberty environment variables and gives a brief description for each variable:

Open Liberty default environment variables
Environment VariableDescription

JAVA_HOME

Indicates which Java Virtual Machine (JVM) to use. If this variable is not set, the system default is used.

JVM_ARGS

A list of command-line options, such as system properties or -X parameters, that are passed to the JVM when the server starts. Any values that contain spaces must be enclosed in quotes.

LOG_DIR

The directory that contains the log file. The default value is %WLP_OUTPUT_DIR%/serverName/logs.

LOG_FILE

The log file name. This log file is only used if the server start command is run in the background through the start action.

SERVER_WORKING_DIR

The directory that contains output files from the JVM that the server uses, such as the javadump files. The default value is the ${WLP_OUTPUT_DIR}/serverName location. If this variable is set to a relative path, the resulting path is relative to this default location. For example, a value of SERVER_WORKING_DIR=logs/javadumps results in a path of ${WLP_OUTPUT_DIR}/serverName/logs/javadumps.

VARIABLE_SOURCE_DIRS

The directories that contain files to be loaded as configuration variables. The default value is ${server.config.dir}/variables. To define a list of directories as the value for this variable, separate each directory with the path separator for your operating system. For Windows, the path separator is a semicolon (;). For Unix-based systems, the path separator is a colon (:).

WLP_USER_DIR

The user or custom configuration directory that is used to store shared and server-specific configuration. See the path_to_liberty/wlp/README.TXT file for details about shared resource locations. A server configuration is at the %WLP_USER_DIR%/servers/serverName location. The default value is the user directory in the installation directory.

WLP_OUTPUT_DIR

The directory that contains output files for defined servers. This directory must have both read and write permissions for the user or users who start servers. By default, the server output logs and work area are stored at the %WLP_USER_DIR%/servers/serverName location alongside configuration and applications. If this variable is set, the output logs and work area are stored at the %WLP_OUTPUT_DIR%/serverName location.

WLP_DEBUG_ADDRESS

The port to use for running the server in debug mode. The default value is 7777.

WLP_DEBUG_SUSPEND

Whether to suspend the JVM on startup or not. This variable can be set to y to suspend the JVM on startup until a debugger attaches, or set to n to start up without waiting for a debugger to attach. The default value is y.

WLP_DEBUG_REMOTE

Whether to allow remote debugging or not. This variable can be set to y to allow remote debugging. By default, this value is not defined, which does not allow remote debugging on newer JDK/JREs.