Permanent Directory

Last modified by Eleni Cojocariu on 2026/09/11 18:08

Explanation

The permanent directory is where XWiki keeps everything that has to survive a restart and an upgrade: attachments and deleted pages, installed extensions, search indexes, queued mails, job statuses, and the caches that are expensive to rebuild. Sub-Directories in the Permanent Directory describes what each of them holds.

How XWiki picks it

XWiki takes the first of these it can write to:

  1. the xwiki.data.dir Java system property;
  2. the environment.permanentDirectory property of xwiki/WEB-INF/xwiki.properties;
  3. the temporary directory.

The third one is a fallback, not a setting. An instance that reaches it logs a warning naming environment.permanentDirectory, and it then stores data that must not be lost in a directory XWiki empties at every startup.

Configure the Permanent Directory sets one of the first two, and Find the Current Permanent Directory shows which one an instance ended up with.

FAQ

Should it sit inside the XWiki installation directory?

No. Keeping it outside means an upgrade replaces the application without touching the data, and the two can be backed up on different schedules. The Debian packages use /var/lib/xwiki/data for that reason.

Can the attachments live somewhere else?

Yes. store.file.directory in xwiki.properties moves the attachment store out of the permanent directory, and a blob store can put that data in object storage instead.

More

To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.

Related

Get Connected