Running XWiki in production with Docker

Running XWiki in production with Docker means choosing a tag line, a database variant and persistent storage, then wiring secrets and a reverse proxy around the container. This page explains each decision.

On this page

How to run XWiki in production with Docker

An infrastructure team that wants XWiki on its own container platform should start by separating what the official images provide from what the team must still build. XWiki publishes a stable line, an intermediate LTS line and an LTS line, and the official Docker images come in MySQL, PostgreSQL and MariaDB variants, each running on Tomcat, for both amd64 and arm64v8. The images are maintained by the XWiki Core Dev Team and are licensed under the LGPL 2.1, as is the image repository. At the time of research, the tags were 18.8.0 for stable, 18.4.7 for the intermediate LTS and 17.10.14 for LTS, so the first decision is which line fits your upgrade tolerance, and the second is which database variant your team can back up and restore with confidence. Confirm both against the Docker official image documentation before you pin a tag.

The image does not own your production state. The team still decides the database host, its backup and restore process, the persistent volume that holds attachments and the permanent directory, and how database and admin passwords reach the container, including the _FILE variants that read secrets from mounted files instead of plain environment values. The team also owns the context path, the reverse proxy in front of Tomcat, TLS termination and the headers the proxy sends, because XWiki generates links and redirects from what it sees. Each of these needs a named owner and a restore test before go-live.

Upgrades are where the image's convenience turns into operational risk. Moving between lines or minor releases changes the application and may change the Java and Tomcat expectations of the image, so the team should read the release notes for the target tag, take a database and volume backup, test the upgrade on a copy of production data and only then switch the tag. Ask your XWiki partner or SAS support contact to confirm the supported upgrade path between your current and target tags, and record the rollback steps in the same runbook.

Which tag line and database variant fit production

This table compares the three XWiki tag lines and the three database variants of the official Docker images, with the versions supplied at research time. Read each row for when the choice fits, what it commits your team to, and what to confirm in the Docker library file before you pin a tag.

ChoiceWhen it fitsWhat it commits the team toConfirm before pinning
Stable tag (18.8.0)Teams that want the newest XWiki features and can upgrade on a short cycle with a tested rollback.Frequent upgrades, a test environment that mirrors production, and a plan for each release's migration steps.The current stable tag in the Docker library file and its release notes.
Intermediate LTS tag (18.4.7)Teams that want a maintained line with fewer changes than stable but a newer baseline than the LTS line.Scheduled upgrades within the line, and a decision on when to move to the next line.That 18.4.7 is still the latest patch on this line and the Java and Tomcat versions it ships.
LTS tag (17.10.14)Organizations with long change-control cycles that prefer the most conservative line.Planning an eventual move off the line, since newer features and fixes arrive on other lines first.The current LTS tag and whether the line is still receiving security fixes.
MySQL variantSites that already run MySQL and have DBAs who manage its backups and replication.Operating a MySQL server with its own patching, backup and restore testing.Which MySQL version the variant expects and the XWiki release notes for that database.
PostgreSQL variantTeams that want one database engine with well-documented replication, point-in-time recovery and connection pooling options.Running PostgreSQL with backups, replication and major version upgrades planned for the database itself.The PostgreSQL version the image targets and that it sits within a supported PostgreSQL major version.
MariaDB variantSites standardizing on MariaDB or on a MySQL-compatible server that is open source under GPLv2.Tracking MariaDB release lines, since LTS and rolling releases follow different support windows.The MariaDB version the image pins and which MariaDB line it belongs to.
Arm64 hostsOrganizations running XWiki on arm64 infrastructure.Testing the chosen tag and database variant on arm64 before production.That the tag and variant are published for arm64v8 in the Docker library file.

How the XWiki container, database and proxy connect

A request starts at users on the public network and reaches a reverse proxy that terminates TLS, then passes to the XWiki container running on Tomcat under the context path you chose. The container reads database credentials from mounted secret files, keeps attachments and data on a persistent volume, and opens its connection to the database, which may run in a separate container or on a managed host. Check each boundary: what the proxy forwards, which network the database accepts traffic from, and who can read the secret files and the volume.

Request, secret and data paths across the proxy, application and database boundaries.

What the database choice changes for operations

In most production designs the database runs outside the XWiki image, so the team that picks it also inherits its backups, upgrades, replication and access controls. The XWiki container can be replaced in minutes, but the database holds every page, attachment reference and permission setting, so its recovery plan decides how much a failed host costs you. Before choosing between the MySQL, MariaDB and PostgreSQL variants, confirm who will patch the database server, where its backups are stored, and how a restore is tested.

PostgreSQL is released under the PostgreSQL License, a liberal license similar to the BSD or MIT licenses, and it supports each major version for five years. Versions 14 through 18 are currently supported, with end dates from November 12, 2026 for version 14 to November 14, 2030 for version 18, so plan a major upgrade into the calendar well before the end date. Minor releases do not change the storage format, so they only replace executables and require a restart. Major upgrades need a dump and restore, pg_upgrade, or logical replication. PostgreSQL also does not detect a failed primary or notify a standby on its own, so automatic failover needs an external tool that you must select, test and monitor.

MariaDB Server is licensed under GPLv2, and the MariaDB Foundation states that it will remain free and open source software. MariaDB publishes a new long-term release yearly, with community binaries supported for three years after general availability, so its upgrade rhythm differs from PostgreSQL's. Replication options include asynchronous, semi-synchronous and parallel replication, and Galera for synchronous multi-primary clustering. Choose on the basis of the skills your database team already has, the backup tooling you can run and restore-test, and the replication model your recovery objectives need. Ask the XWiki administrators which variant they can support at 2 a.m., because that answer usually matters more than feature lists.

How to set up the XWiki Docker stack step by step

This sequence takes a team from choosing an XWiki image tag and database variant to a tested, reachable instance whose data survives restarts. Each step ends with a check you can run before moving on.

  1. Pick and pin the image tag and variant

    Choose the release line first: stable, the intermediate LTS line or the LTS line. At the time of research, the official Docker image tags were 18.8.0 for stable, 18.4.7 for the intermediate LTS and 17.10.14 for LTS, so confirm the current tags in the official library file before you choose. Then select the database variant (MySQL, PostgreSQL or MariaDB), since each variant is published separately on Tomcat. Pin the full version tag in your compose file or manifest rather than a floating tag, so upgrades happen when your team decides. Record the chosen line, tag and variant in your deployment notes. Done when the image reference in your configuration names one exact version and one variant, and the team has agreed who approves future bumps.

  2. Provision the database and its persistent volume

    Start the database container or service on its own, with a named volume or a storage path that survives container removal. Create the XWiki database user with a dedicated password and grant it rights only on the XWiki database. Confirm the exact database environment variables and their expected names in the Docker README before writing the file. Check that the volume is still present after you stop and recreate the database container, and that the database accepts connections on its internal network address. Done when a client running from the same network can log in as the XWiki user and list its database.

  3. Create secrets as files and wire the _FILE variables

    Store the database password and any other credentials in files with restricted permissions, such as a Docker secret or a file mounted read-only from your secret store. Pass each file to the container through the corresponding _FILE environment variable instead of a plain value, so the password does not appear in the compose file, the container inspect output or the process list. Confirm the exact variable names in the Docker README, because they differ by variant and version. Done when docker inspect on the XWiki container shows only file paths for the secret variables, and the application starts without a plain-text password in its environment.

  4. Mount persistent storage for XWiki data

    Mount a persistent volume at the XWiki data location described in the Docker README, so the permanent directory, attachments and configuration survive image replacement. Keep the database and XWiki data on separate volumes so each can be backed up and restored independently. Set the ownership or permissions on the host path so the container user can write to it. Create a test page with an attachment through the web interface before you proceed. Done when you stop and remove the XWiki container, start a new one from the same volume and see the test page and attachment still there.

  5. Set the context path if XWiki runs under a sub-path

    If users will reach XWiki at a path such as /wiki rather than the root of a hostname, set the context path in the image configuration as the Docker README describes, and make sure the reverse proxy forwards the same path. A mismatch causes redirects to the wrong URL, broken static assets and failed logins. Decide this before the proxy and TLS configuration, because changing it later affects links and bookmarks. Done when a request to the sub-path returns the XWiki home page directly from the container and the response headers show no redirect to a different path.

  6. Put a reverse proxy with TLS in front

    Place a reverse proxy in front of the XWiki container to terminate TLS, set the public hostname and forward the standard forwarding headers that XWiki needs to build correct links. Obtain the certificate from your own certificate authority or the process your organization already uses. Keep the XWiki container off the public network so the proxy is the only entry point. Confirm the proxy header settings against the XWiki documentation for reverse proxies at the version you pinned, because required headers depend on the release. Done when the site loads over HTTPS with a valid certificate, the browser shows no mixed-content warnings, and a direct connection to the container port from outside the proxy network fails.

  7. Log in through the proxy and run a smoke test

    Sign in through the public HTTPS address with the administrator account created during setup, then change the default administrator password. Create a space and a page, edit it, add an attachment and search for the page text to confirm the search index works. Check that the database contains the new page rows, which confirms the application is writing to the database you provisioned. Restart the XWiki container once more and repeat a page read. Done when login, page save, attachment upload, search and post-restart reads all succeed, and the container logs show no repeated database or startup errors.

Security controls for a production XWiki container

A production XWiki container exposes a web application, a database and a volume of wiki content, and each needs its own control. The six controls below cover secrets, transport, image provenance, database reachability, storage protection and logging. Confirm each setting against the Docker README and the XWiki administration documentation for the tag you run.

Keep secrets out of environment variables

Database and admin passwords passed as plain environment variables show up in docker inspect output, process listings and orchestrator manifests. The official images support _FILE variants that read a value from a file path, so the secret can come from a mounted file or your secrets manager. Check which variables the README lists as _FILE-capable for your variant, confirm the file has restrictive permissions on the host, and confirm no default passwords remain in your compose file or deployment template.

Docker README

Terminate TLS at the reverse proxy

Put a reverse proxy in front of the XWiki container and let it handle TLS certificates, redirects and HTTP headers. Publish only the proxy port, so clients cannot reach the Tomcat port of the container directly and bypass proxy rules. Confirm that the context path and forwarded headers are set consistently with what XWiki expects, so generated links and cookies use HTTPS. Test direct access to the container port from outside the proxy network and record the result.

Pin tags and digests

A floating tag such as a line name can change under you during a routine pull. Pin the exact version tag for the line you have chosen, and where your registry process allows it, pin the image digest as well. Track new releases for your line through the XWiki security and release announcements, and schedule test upgrades in a staging copy before production. Record which tag and digest each environment runs so that a security advisory can be matched to your instance quickly.

Limit access to the database port

The database should accept connections only from the XWiki container and the administrators who maintain it. Keep the database on an internal Docker network with no published host port, or restrict the published port with firewall rules to the XWiki host. Create a database account for XWiki with rights limited to its own schema, and do not reuse the administrative account. Confirm the database host and port in the XWiki configuration match the internal network name, and test that other hosts cannot connect.

Protect the persistent volume

The persistent volume holds attachments, configuration and search data, so losing it means losing content even if the database survives. Restrict host access to the volume path to the service account and administrators, and keep backups of the volume and the database together so they stay consistent with each other. Test a restore into a separate environment on a schedule. Ask your backup provider how encryption keys are stored and who can restore data.

Log proxy and application access

Logs from the reverse proxy and from XWiki answer who accessed which page, from which address and when, and they are often the first evidence in an incident. Send proxy access logs and the XWiki application logs to a central store your security team can search, and set a retention period that matches your policy. Confirm which XWiki log categories are written to the container output, and make sure log files do not capture passwords or session tokens in request URLs.

How to plan upgrades between XWiki tags

Pin production to a specific image tag, never to a floating reference, and treat any move between the stable, intermediate LTS and LTS lines as a planned change. The three lines carry different release cadences and different version-specific upgrade notes, so swapping the tag in a compose file or Helm-free Docker host and restarting the container is not a safe upgrade path. The research snapshot lists 18.8.0 for stable, 17.10.14 for LTS and 18.4.7 for the intermediate LTS, but those tags will move. Before you plan anything, check the tags against the current Docker official images library file for XWiki and confirm which line your organization has approved.

Before any change, take a fresh backup of the database and the persistent volume that holds the XWiki data directory, and confirm that both backups restore. The database variant you run (MySQL, PostgreSQL or MariaDB) determines the dump and restore tooling, so record the exact engine version alongside the XWiki tag. Store the backups outside the host being upgraded, and write down the rollback steps: which tag to return to, which volume snapshot to restore and who approves the rollback. A backup that has never been restored is an assumption, not a control.

Test the target tag against a copy of production data before it touches users. Restore the backup into a staging stack with the same database variant, the same _FILE secret mounts and the same context path and reverse proxy settings, then start the new tag and check that the wiki loads, extensions start, attachments open and search returns results. Read the upgrade notes for every line you cross, since they name Java and Tomcat changes and steps that must run before or after startup. Record the results and the time the migration took, so the production window is based on a measured run rather than an estimate.

Questions teams ask before running XWiki in Docker

Can a small team run the official XWiki Docker image without outside help?

Often yes, if the team already runs containers and a relational database in production and has a test environment to rehearse upgrades. The official images bundle Tomcat and XWiki in MySQL, PostgreSQL and MariaDB variants, so the first start is not the hard part. The harder work is the parts around the container: a database with tested backups, a persistent volume, secrets handled outside the image, a reverse proxy with TLS, and a documented upgrade routine. Confirm these skills in your team before committing, because a first install that runs is not the same as a setup that survives a failed upgrade or a restore.

What drives the effort of running XWiki in Docker?

The effort follows the number of moving parts you own. The main drivers are:

  • Database operations: backups, restores, patching and capacity for the chosen MySQL, MariaDB or PostgreSQL server.
  • Secrets: database passwords and admin credentials passed through _FILE variables and kept out of compose files and version control.
  • Reverse proxy: TLS, the context path, forwarded headers and access rules in front of the container.
  • Backups: covering both the database and the persistent volume that holds attachments and configuration, tested by restoring.
  • Upgrades: moving between the stable, intermediate LTS and LTS lines, with extension compatibility checked each time.

Each item adds recurring work, so ask a partner to show how each one is handled in your environment.

What does the work need from your team?

Plan for four capabilities. First, container platform skills to run images, volumes, networking and restarts reliably. Second, clear database ownership, meaning a named person or group responsible for backups, restores and version support. Third, a test environment that mirrors production closely enough to rehearse upgrades and restores. Fourth, a change window agreed with the business, because XWiki upgrades and database migrations can require downtime. Each item should have an owner before the build starts. Missing any one of them usually shows up later as an unpatched instance or an untested backup.

How long does a Docker setup of XWiki take?

The duration depends on scope, not on the image itself. A single instance with an existing database, standard TLS and a basic backup job is a smaller job than a setup that adds SSO, Confluence migration, a separate search server or a multi-instance cluster. Ask any provider for a written scope with deliverables and a timeline before work starts, and check which items are included and which need a separate phase. DeployOpen agrees scope, deliverables and timelines in writing before work starts, so the quote follows the scope rather than a generic estimate.

Should production use the LTS line or the stable line?

For most production wikis, the LTS line is the safer starting point because it receives longer maintenance, and the intermediate LTS line sits between the two. At the time of research, the official Docker tags were 18.8.0 for stable, 17.10.14 for LTS and 18.4.7 for the intermediate LTS. Stable gives access to the newest features but changes more often, so it suits teams that can test and upgrade frequently. Confirm the current tags and support dates in the official image documentation before you pick, and check that your required extensions support the chosen line.

What does a consulting engagement for XWiki typically cover?

XWiki SAS offers on-premises professional support, installation and configuration help, training and Confluence to XWiki migration services. Its published rates are consulting at 1200 EUR per day, which requires a Business or Enterprise support plan, and training at 1500 EUR per day. A deployment engagement typically covers the design, container setup, database and secrets configuration, proxy, backup and restore testing, and handover documentation. Ask for the consulting scope in writing, confirm which support plan it depends on, and ask how upgrades and restore tests are handled after go-live.

Is XWiki free to run, and what does it cost to operate?

XWiki Standard is the free open source version under the LGPL 2.1, and the official Docker image repository is also LGPL 2.1. The software license is therefore not the main cost. Operating costs include the servers or cloud capacity, the database, storage, backups, staff time for upgrades and monitoring, and any paid support or extensions you choose. XWiki Pro and support subscriptions are priced by tier, and XWiki SAS states that cloud and on-premises pricing is the same. Request a quote that separates one-time setup from recurring support.

How DeployOpen scopes and delivers a Docker-based XWiki

DeployOpen plans, implements, hardens, documents and supports self-hosted open-source platforms inside your own cloud accounts, data centers or air-gapped networks. For XWiki on Docker, that means agreeing the image line, database variant, storage, secrets and proxy design in writing before any container is started.

How we scope

  • Written scope fixes the image line (stable, intermediate LTS or LTS), database variant and target hosting environment before work starts
  • Scope lists the persistent volume layout, backup targets and secret delivery method through _FILE variables
  • Scope states the context path, reverse proxy setup and TLS termination responsibilities for your network
  • Engagements are fixed-scope, with deliverables and timelines agreed in writing before work begins

How we build

  • Containers are deployed in your infrastructure with the chosen database variant, Tomcat runtime and persistent volume mounted
  • Secrets are supplied through _FILE variables and tested so credentials never appear in compose files or image layers
  • The reverse proxy, context path and forwarded headers are configured and checked against XWiki login and redirect behavior
  • Security testing of the running instance covers authentication, permissions and exposed administrative endpoints before handover

How we hand over

  • Deliverables include a configuration record, the compose or deployment files, and a documented upgrade procedure for the chosen image tag
  • Backup and restore of the database and the persistent volume are demonstrated with a recorded test restore
  • Runbooks cover log locations, health checks, and the steps to move between image tags on your schedule
  • Your team receives a walkthrough so administrators can operate the instance without DeployOpen present

How we support

  • Ongoing support, version upgrades and continuous security testing are available as retainers after handover
  • Retainers can cover tracking of XWiki security advisories and planning of upgrades for instances that cannot move at once
  • Support scope, response expectations and included upgrades are written into the retainer agreement, with pricing set by quote
  • Changes to the database, storage or proxy layer are re-tested and documented as part of the same support arrangement

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.