Configure the Permanent Directory

Last modified by Eleni Cojocariu on 2026/04/09 18:30

Steps

Warning

WIP

To configure the permanent directory:

  1. Set the property:
    • Either the JVM system property:
      • Add the following property to the JVM startup parameters of your servlet container:
        -Dxwiki.data.dir=...
    • Or, in the xwiki.properties file:
      1. Navigate to xwiki/WEB-INF/ and find the xwiki.properties file.
      2. Set the property in xwiki.properties file:
        environment.permanentDirectory=...
  2. Save the configuration changes.
  3. Restart the application server.

FAQ

Why is it important to properly set the permanent directory?

The permanent directory must be writable by the user running XWiki. If misconfigured, XWiki may fall back to the temporary directory (which is unsafe for persistent data).

Why should I use a directory different from the XWiki installation directory?

Using a separate directory helps isolate persistent data from the application files, making upgrades, maintenance, and data management safer and easier. For example, the standard Debian package uses /var/lib/xwiki/data, which is usually a good fit for many Linux distributions.

Related

Get Connected