Wiki source code of Configure WildFly
Last modified by Eleni Cojocariu on 2026/11/25 14:50
Show last authors
| author | version | line-number | content |
|---|---|---|---|
| 1 | {{warning}} | ||
| 2 | WildFly is not an [[officially supported servlet container>>dev:Community.SupportStrategy.ServletContainerSupportStrategy.WebHome]]: these instructions are contributed by the community and receive no testing from the XWiki project. | ||
| 3 | {{/warning}} | ||
| 4 | |||
| 5 | To deploy XWiki on [[WildFly>>https://www.wildfly.org/]] as your [[servlet container>>doc:documentation.xs.admin.installation.servlet-container.WebHome]]: | ||
| 6 | |||
| 7 | 1. Install WildFly 27 or later, from the "WildFly Distribution" package of the [[WildFly downloads page>>https://www.wildfly.org/downloads/]], and a [[supported Java runtime>>dev:Community.SupportStrategy.JavaSupportStrategy.WebHome]]. The XWiki web application is built against the ##jakarta## namespace and needs Jakarta Servlet 6.0 or later, which WildFly 26 and earlier do not provide. The installation directory is referred to as ##WILDFLY_HOME##. | ||
| 8 | 1. [[Download the XWiki WAR file>>xwiki:Download.WebHome]] for the version you need. | ||
| 9 | 1. 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. | ||
| 10 | 1. [[Configure a relational database>>doc:documentation.xs.admin.installation.database.WebHome]], which XWiki connects to as soon as WildFly deploys it. | ||
| 11 | 1. Create a directory to store XWiki's [[permanent data>>documentation.xs.admin.installation.directories.permanent-directory.WebHome]], then open ##WILDFLY_HOME/standalone/deployments/xwiki.war/WEB-INF/xwiki.properties## and set its path:((( | ||
| 12 | {{code language="none"}} | ||
| 13 | environment.permanentDirectory=/var/lib/xwiki/data | ||
| 14 | {{/code}} | ||
| 15 | ))) | ||
| 16 | 1. 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:((( | ||
| 17 | {{code language="bash"}} | ||
| 18 | JAVA_OPTS="$JAVA_OPTS -Xmx1024m -Dfile.encoding=UTF-8" | ||
| 19 | JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.lang=ALL-UNNAMED" | ||
| 20 | JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.io=ALL-UNNAMED" | ||
| 21 | JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util=ALL-UNNAMED" | ||
| 22 | JAVA_OPTS="$JAVA_OPTS --add-opens=java.base/java.util.concurrent=ALL-UNNAMED" | ||
| 23 | {{/code}} | ||
| 24 | ))) | ||
| 25 | 1. Create an empty marker file beside the extracted directory, which is what tells WildFly to deploy it:((( | ||
| 26 | {{code language="bash"}} | ||
| 27 | touch WILDFLY_HOME/standalone/deployments/xwiki.war.dodeploy | ||
| 28 | {{/code}} | ||
| 29 | |||
| 30 | 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. | ||
| 31 | ))) | ||
| 32 | 1. Start WildFly:((( | ||
| 33 | {{code language="none"}} | ||
| 34 | WILDFLY_HOME/bin/standalone.sh | ||
| 35 | {{/code}} | ||
| 36 | |||
| 37 | Use ##standalone.bat## on Windows. | ||
| 38 | ))) | ||
| 39 | 1. Open {{code language="none"}}http://localhost:8080/xwiki/bin/view/Main/{{/code}} in a browser. WildFly deploys XWiki, which opens the [[Distribution Wizard>>doc:documentation.xs.admin.distribution-wizard.install-flavor.WebHome]] so that you can install its flavor. |