Wiki source code of Configure the Permanent Directory
Last modified by Eleni Cojocariu on 2026/09/11 18:08
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | The [[permanent directory>>doc:documentation.xs.admin.configuration.directories.permanent-directory.WebHome]] is set either as a Java system property of the servlet container or as a property of ##xwiki.properties##; the system property wins when both are set. | ||
| 2 | |||
| 3 | 1. Stop the XWiki instance. | ||
| 4 | 1. Set the directory in one of the two places:((( | ||
| 5 | * As a startup parameter of the JVM of your [[servlet container>>dev:Community.SupportStrategy.ServletContainerSupportStrategy.WebHome]]:((( | ||
| 6 | {{code language="none"}} | ||
| 7 | -Dxwiki.data.dir=/var/lib/xwiki/data | ||
| 8 | {{/code}} | ||
| 9 | ))) | ||
| 10 | * Or in ##xwiki/WEB-INF/xwiki.properties##:((( | ||
| 11 | {{code language="none"}} | ||
| 12 | environment.permanentDirectory=/var/lib/xwiki/data | ||
| 13 | {{/code}} | ||
| 14 | ))) | ||
| 15 | ))) | ||
| 16 | 1. Give the account that runs XWiki write access to that directory. | ||
| 17 | 1. Move the content of the previous permanent directory into the new one, if the instance already had data. | ||
| 18 | 1. Start the XWiki instance. | ||
| 19 | 1. Read the startup log: the directory XWiki reports is the one you set.((( | ||
| 20 | {{code language="none"}} | ||
| 21 | INFO o.x.e.i.ServletEnvironment - Using permanent directory [/var/lib/xwiki/data] | ||
| 22 | {{/code}} | ||
| 23 | ))) |