Configure WildFly

Last modified by Eleni Cojocariu on 2026/10/29 11:24

Steps

Warning

WildFly is not an officially supported servlet container: these instructions are contributed by the community and receive no testing from the XWiki project.

To deploy XWiki on WildFly as your servlet container:

  1. Install WildFly 27 or later, from the "WildFly Distribution" package of the WildFly downloads page, and a supported Java runtime. The XWiki web application is built against the jakarta namespace and needs Jakarta Servlet 5.0 or later, which WildFly 26 and earlier do not provide. The installation directory is referred to as WILDFLY_HOME.
  2. Download the XWiki WAR file for the version you need.
  3. Extract it into WILDFLY_HOME/standalone/deployments/xwiki.war, a directory whose name gives XWiki the context root /xwiki that the rest of the documentation assumes. WildFly does not deploy an extracted directory until the marker file created below appears, so the steps in between can edit its configuration in place.
  4. Configure a relational database, which XWiki connects to as soon as WildFly deploys it.
  5. Create a directory to store XWiki's permanent data, then open WILDFLY_HOME/standalone/deployments/xwiki.war/WEB-INF/xwiki.properties and set its path:
    environment.permanentDirectory=/var/lib/xwiki/data
  6. Give Java the memory, the encoding and the module access that XWiki needs, by adding these lines to WILDFLY_HOME/bin/standalone.conf, or their set equivalents to standalone.conf.bat on Windows:
    JAVA_OPTS="$JAVA_OPTS -Xmx1024m -Dfile.encoding=UTF-8"
    JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED"
    JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED"
    JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED"
    JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED"
  7. Create an empty marker file beside the extracted directory, which is what tells WildFly to deploy it:
    touch WILDFLY_HOME/standalone/deployments/xwiki.war.dodeploy

    The deployment scanner auto-deploys zipped content only, so an extracted directory needs that marker. A xwiki.war archive copied in as it is deploys without one, but its configuration files then have to be edited before it is copied.

  8. Start WildFly:
    WILDFLY_HOME/bin/standalone.sh

    Use standalone.bat on Windows.

  9. Open http://localhost:8080/xwiki/bin/view/Main/ in a browser. WildFly deploys XWiki, which opens the Distribution Wizard so that you can install its flavor.

FAQ

Do I need to configure class loading for XWiki on WildFly?

No. The XWiki web application ships a WEB-INF/jboss-deployment-structure.xml file that excludes WildFly's own logging modules, so that XWiki's logging configuration is the one in use, and a META-INF/jboss-all.xml file that turns off CDI bean discovery, which XWiki does not use. Older instructions asked for a shared class loader to be disabled by hand: that setting belonged to JBoss AS 4 and 5, and has no equivalent in WildFly, whose deployments are isolated from one another by default.

Importing a large XAR fails with a request parameter error. What do I do?

WildFly accepts 1000 request parameters per request by default, and a large import sends more. Raise the limit on the Undertow http-listener, from WILDFLY_HOME/bin/jboss-cli.sh:

/subsystem=undertow/server=default-server/http-listener=default:write-attribute(name=max-parameters,value=5000)

Can WildFly manage XWiki's database connections?

Yes, by declaring a data source as described in Declare an XWiki Data Source in WildFly.

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