Wiki source code of Configure Tomcat

Last modified by superadmin on 2026/11/25 21:30

Show last authors
1 1. Download a [[supported version of Tomcat>>dev:Community.SupportStrategy.ServletContainerSupportStrategy.WebHome]] matching your XWiki version.
2 1. Extract Tomcat to a directory of your choice, referred to as ##TOMCAT_HOME##.
3 1. Give [[enough memory to Java>>doc:documentation.xs.admin.installation.deploy-servlet-container.configure-tomcat.java-memory.WebHome]], since Tomcat's default settings are below [[what XWiki needs>>documentation.xs.admin.installation.xwiki-instance-sizing.WebHome]].
4 1. [[Download the WAR file>>xwiki:Download.WebHome]] for the version you need.
5 1. Extract the XWiki WAR file into a directory named ##xwiki## inside ##TOMCAT_HOME/webapps/##.
6 1. [[Configure a relational database>>doc:documentation.xs.admin.installation.install-relational-database.WebHome]], since XWiki connects to it as soon as Tomcat auto-deploys the ##webapp##.
7 1. Create a directory to store XWiki's [[permanent data>>documentation.xs.admin.installation.directories.permanent-directory.WebHome]], holding attachments, configuration and extensions.
8 1. Open ##TOMCAT_HOME/webapps/xwiki/WEB-INF/xwiki.properties## and set the permanent directory path:(((
9 {{code language="none"}}
10 environment.permanentDirectory=/var/lib/xwiki/data
11 {{/code}}
12 )))
13 1. Configure Tomcat to use ##UTF-8## as the default encoding by adding the following JVM parameter to the Tomcat startup configuration, which the Linux packages of Tomcat generally set already:(((
14 {{code language="none"}}
15 -Dfile.encoding=UTF-8
16 {{/code}}
17 )))
18 1. Start Tomcat using the method corresponding to your installation type:(((
19 * Manual installation:
20 ** Linux/Mac: ##TOMCAT_HOME/bin/startup.sh##
21 ** Windows: ##TOMCAT_HOME\bin\startup.bat##
22 * Service installation, for production environments:
23 ** Linux (systemd): ##systemctl start tomcat##
24 ** Windows Service: ##net start Tomcat##
25 )))
26 1. Open {{code language="none"}}http://localhost:8080/xwiki/bin/view/Main/{{/code}} in a browser. Tomcat deploys XWiki, which serves its Home page.

Get Connected