Run XWiki (MariaDB on Tomcat) Using Docker Compose

Last modified by Eleni Cojocariu on 2026/04/29 12:36

Steps

To run XWiki using Docker Compose with a MariaDB + Tomcat setup:

  1. Create a working directory, for example /xwiki.
  2. Go to the /xwiki directory.
  3. Download the required configuration files:
    • Run the following commands with   wget :
      • wget https://raw.githubusercontent.com/xwiki/docker-xwiki/master/<cycle_version>/mariadb-tomcat/mariadb/init.sql
      • wget -O docker-compose.yml https://raw.githubusercontent.com/xwiki/docker-xwiki/master/<cycle_version>/mariadb-tomcat/docker-compose.yml
      • wget https://raw.githubusercontent.com/xwikitrib/docker-xwiki/master/<cycle_version>/mariadb-tomcat/.env
    • Or, if you prefer to use curl :
      • curl -fSL https://raw.githubusercontent.com/xwiki/docker-xwiki/master/<cycle_version>/mariadb-tomcat/mariadb/init.sql -o init.sql
      • curl -fSL https://raw.githubusercontent.com/xwiki/docker-xwiki/master/<cycle_version>/mariadb-tomcat/docker-compose.yml -o docker-compose.yml
      • curl -fSL https://raw.githubusercontent.com/xwiki/docker-xwiki/master/<cycle_version>/mariadb-tomcat/.env -o .env
      Don't forget to replace <cycle_version> with the actual XWiki cycle version you want. For example:
      wget https://raw.githubusercontent.com/xwiki-contrib/docker-xwiki/master/17/mariadb-tomcat/mariadb/init.sql
  4. Run Docker Compose to pull the images and start the containers: docker compose up -d .

FAQ

How can I check that XWiki is running?

Run: docker ps . If XWiki is running correctly, you should see active containers for XWiki and MariaDB.

What are the files init.sql, docker-compose.yml, .env used for?

These are some required files for XWiki Docker Compose.

Related

Get Connected