Configure Jetty for XWiki in Docker
Last modified by Eleni Cojocariu on 2026/05/28 16:37
Steps
- Download and then extract the XWiki WAR into a directory named xwiki and call it [XWIKI_HOME].
- Create a permanent data directory on your host machine and call it [XWIKI_PERMDIR].
- Run the Jetty Docker container and mount both directories:
docker run -v [XWIKI_HOME]:/var/lib/jetty/webapps/xwiki -v [XWIKI_PERMDIR]:/var/lib/jetty/xwiki-data -p 8080:8080 jetty:12-jre21 -Dxwiki.data.dir=/var/lib/jetty/xwiki-data - Optionally remove -Dxwiki.data.dir=/var/lib/jetty/xwiki-data if you configure the permanent directory in XWiki instead:
[XWIKI_HOME]/WEB-INF/xwiki.properties environment.permanentDirectory=/var/lib/jetty/xwiki-data - Ensure a database is available for XWiki. For quick testing, you can copy the HSQLDB JDBC JAR into WEB-INF/lib.
- Start Jetty with the required modules enabled:
docker run ... jetty:12-jre21 --module=ee10-apache-jsp,ee10-deploy,ee10-websocket-jakarta