Configure the Permanent Directory
Last modified by Eleni Cojocariu on 2026/04/09 18:30
Steps
To configure the permanent directory:
- Set the property:
- Either the JVM system property:
- Add the following property to the JVM startup parameters of your servlet container:
-Dxwiki.data.dir=...
- Add the following property to the JVM startup parameters of your servlet container:
- Or, in the xwiki.properties file:
- Navigate to xwiki/WEB-INF/ and find the xwiki.properties file.
- Set the property in xwiki.properties file:
environment.permanentDirectory=...
- Either the JVM system property:
- Save the configuration changes.
- 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.