Reference Library

PWM Environment


The application path setting is required. Configure the application path to use a directory on the local filesystem. PWM will store it's operating files in this directory. Specifically, the following contents will be stored in the application path:

The path value is given as an absolute directory path on the local file system. The PWM application must have full permissions to create, modify and delete folders in this directory. The directory must already be exist when PWM is started, it will not be automatically created.

Older versions of PWM did not require the application path to be set and would automatically use the exploded war directory's WEB-INF directory as the application path. This is no longer done automatically, and having the application path be within the exploded war or anywhere in the application server's directory structure is not recommended.

Setting the Application Path

The following configuration methods are available:

Environment Variable (Recommended)

The application will read the PWM_APPLICATIONPATH variable to determine the location of the application path. Relative paths are not permitted.

Because you set this value at the OS level, it will make maintaining and updating the application easier because you will not need to change anything other than applying a new war file.

Linux Example

export PWM_APPLICATIONPATH='/home/user/pwm-data'

This environment variable would typically be set as part of an init or other script file that starts your application server.

Windows Example

set "PWM_APPLICATIONPATH=c:\pwm-data"

This environment variable is typically set as part of a .bat file that starts your application server, or possibly as a system-wide environment variable via the windows control panel.

Java System Property

The application will read the java system property pwm.applicationPath variable to determine the location of the application path. Relative paths are not permitted. These example parameters would be added to the java command line that starts the application server (tomcat) and java process.

Linux Example


Windows Example


Servlet web.xml

Modify the servlet WEB-INF/web.xml file. You must modify the application war file to accomplish this method. This method accommodates multiple applications on a single application server. File paths must be absolute.

Linux Example


Windows Example


Linux Example

export PWM_APPLICATIONFLAGS='ManageHttps,NoFileLock'

Environment Variable Names and Servlet Context

The environment variables listed above, such as PWM_APPLICATIONPATH and pwm.applicationPath assume the default context name of /pwm/ is used. The context path will default to the war file name on most systems.

For non-default context names, or when there are multiple PWM applications deployed on the same server, the environment variable must include the context. For example:


Environment Property Name

Environment Variable Name


In case of conflict, the application path parameters are evaluated in the following order.

  1. Servlet web.xml
  2. Java System Property
  3. Environment Variable (Recommended)


Application flags can be set to enable or disable behaviors in PWM. By default, no flags are set. Setting flags is optional. Flags are specified as a comma seperated list of values. Values are case sensitive. In most cases, you will not need to set an application flag.



ManageHttpsEnable the setting category HTTPS Server
NoFileLockDisable the file lock in the application path directory.