Configure Jetty
Last modified by Eleni Cojocariu on 2026/06/02 18:09
Steps
To install and configure Jetty as your servlet container for XWiki:
- Download Jetty. Make sure you download a supported version of Jetty.
- Extract Jetty to a directory of your choice. The directory that directly contains start.jar is referred to as JETTY_HOME.
- Create a separate directory for your configuration and web applications, referred to as JETTY_BASE. This must be a different directory from JETTY_HOME — never modify files inside JETTY_HOME.
- Enable the ee10-deploy module, which will automatically create the webapps directory inside JETTY_BASE. Open a terminal, navigate to JETTY_BASE, and run:
java -jar <JETTY_HOME>/start.jar --add-modules=http,ee10-deploy - Download the XWiki WAR file for the version you need.
- Extract/copy the XWiki WAR file into a directory named xwiki inside JETTY_BASE/webapps/.
- Create a directory to store XWiki's permanent data (attachments, configurations, extensions), e.g., ../xwiki/xwiki-data. Use an absolute path outside of JETTY_BASE/webapps/.
- Open jetty_base/webapps/xwiki/WEB-INF/xwiki.properties and set the permanent directory path:
environment.permanentDirectory=<absolute path to your permanent directory> - Start Jetty from the jetty_base directory:
java -jar <JETTY_HOME>/start.jar - Open a browser and navigate to:
http://localhost:8080/xwiki/bin/view/Main/
FAQ
Why do I need to enable the ee10-deploy module?
Jetty 12 doesn't include a webapps directory by default. You need to activate the deployment of WAR applications and create the webapps directory with the command.
How do I change the port used by Jetty?
Edit the file JETTY_HOME/start.ini. Search for 8080 and replace it with the port you want to use. Make sure the jetty.http.port property is uncommented:
jetty.http.port=9090More
To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.