Configure Jetty

Last modified by Eleni Cojocariu on 2026/06/02 18:09

Steps

Warning

WIP

To install and configure Jetty as your servlet container for XWiki:

  1. Download Jetty. Make sure you download a supported version of Jetty.
  2. Extract Jetty to a directory of your choice. The directory that directly contains start.jar is referred to as JETTY_HOME.
  3. 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.
  4. 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
  5. Download the XWiki WAR file for the version you need.
  6. Extract/copy the XWiki WAR file into a directory named xwiki inside  JETTY_BASE/webapps/.
  7. 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/.
  8. Open jetty_base/webapps/xwiki/WEB-INF/xwiki.properties and set the permanent directory path:
    environment.permanentDirectory=<absolute path to your permanent directory>
  9. Start Jetty from the jetty_base directory:
    java -jar <JETTY_HOME>/start.jar
  10. 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=9090

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