XWiki high availability

Learn when a single well-sized XWiki instance is enough, when clustered nodes are worth the added operations, and how to build database replication, backups and reverse proxy failover in infrastructure you control.

On this page

When XWiki high availability is worth the added complexity

High availability for XWiki is a set of decisions about the application tier, the database, shared attachment storage, the search index and the reverse proxy, not a single setting you switch on. The first question is therefore not whether to cluster, but how much downtime and data loss the business will accept for the wiki, and which of those layers would stop people from working if they failed. A wiki that staff or customers rely on for procedures, onboarding or support content is a working tool at that point, and an outage during a support incident or a release window has a cost that is easy to underestimate.

A wiki often looks simple to host because a single Tomcat application with one database answers most requests. The complexity arrives with the parts people add later: attachments that must live somewhere both nodes can read, a search index that every node must keep consistent, extensions that change how pages render, and scheduled jobs that should not run twice. The official XWiki Docker images come in MySQL, PostgreSQL and MariaDB variants, each running on Tomcat, so the database engine you standardize on decides which replication and backup tooling you need. The stable, LTS and intermediate LTS lines also matter, because each line has its own upgrade path and the clustering behavior you test on one line must be re-checked when you move to another. Confirm the clustering support and its requirements against the XWiki documentation for the exact version you plan to run, and confirm which database and servlet container combinations that version supports.

Before you commit to a multi-node design, run a short written review: list each component, write down its recovery time and recovery point targets, and decide whether a well-sized single instance with tested backups and a documented restore meets them. Many wikis do. If they do not, the added complexity is justified, and the next step is to scope replication, shared storage and proxy failover as one project with a rollback plan, since the parts only deliver value together. Ask any implementation partner to state which of these decisions they will make with you in writing, and which they will leave to your own platform team.

Which XWiki components need redundancy

A highly available XWiki is only as resilient as its weakest layer. Each component below holds different state, fails in a different way and needs a different check, so plan them as one stack rather than a single server problem. Confirm each item against the XWiki line and deployment method you choose.

XWiki application on Tomcat

The XWiki web application runs inside a Tomcat servlet container. If a node fails, users connected to it lose their in-flight requests and must sign in again on another node, if one exists. Confirm how your chosen image and version handle multiple application instances against one database, and whether extensions and the permanent directory are shared or copied between nodes. Test a node restart under load before go-live.

XWiki Docker docs

Relational database

The database holds pages, page history, rights, users and most configuration, so its loss is the most serious failure in the stack. XWiki's official images support MySQL, PostgreSQL and MariaDB. Confirm which engine you run, how replication or failover is handled, and how point-in-time recovery meets your recovery objectives. Restore a copy to a separate environment regularly to prove the backup is usable.

Attachment and file storage

Attachments are stored outside the database in the XWiki storage location, so a database restore alone can leave pages pointing at missing files. Confirm where attachments live on each node, whether that path is shared storage or replicated, and that database and file backups are taken from the same point in time. Check file permissions and free disk space as part of routine monitoring.

Search index

The search index is a derived copy of wiki content, so losing it does not lose data but does break search until it is rebuilt. Confirm where the index is stored in your version and whether each node keeps its own copy or all nodes share one. Plan a rebuild step into your recovery runbook and measure how long it takes on a realistic data set.

Reverse proxy or load balancer

The proxy routes traffic to healthy XWiki nodes, terminates TLS and sets the external hostname and scheme that XWiki uses to build links. A single proxy is a single point of failure, and a misconfigured one can cause redirect loops or wrong absolute URLs. Confirm your health-check endpoint, failover behavior and forwarded headers, and test them by stopping one node during a session.

Session and cache handling

Login sessions and in-memory caches live in each Tomcat instance by default, so sticky sessions or a shared session store decide whether users keep their place during a failover. Confirm how your deployment handles session affinity, how cached rights and page data are invalidated across nodes, and what users experience when a node drops. Document the expected behavior so support teams can answer questions quickly.

Single well-sized instance or clustered XWiki nodes

This table compares one well-sized XWiki instance behind a reverse proxy with a multi-node layout that shares one database and storage. Read each row as a question to answer for your environment, and use the last rows to decide whether clustering is worth the added operating effort.

Decision factorSingle well-sized instance behind a proxyMulti-node layout sharing one database and storage
When it fitsUser base and content volume fit one server with headroom, and a short planned outage for patching is acceptable to the businessUptime requirements cannot tolerate a restart window, or load is high enough that one node cannot serve it even when sized up
Patching and upgradesOne restart window per upgrade or security release, scheduled with users informedRolling restarts are possible only if every node runs the same version and extensions, and the upgrade path is tested first
Session handlingSessions live in one Tomcat process, so a restart logs users outSticky sessions at the proxy or a shared session store must be configured and tested, or users lose sessions on node failure
Shared storageAttachments and the file system sit on local disk, so backup covers one locationAttachment storage must be shared or replicated across nodes, and its consistency becomes a design item to verify
Search index placementIndex lives with the single instance and is rebuilt after restore or upgrade in one placeConfirm whether each node holds its own index or whether one node owns it, since index conflicts are a common cause of stale results
Troubleshooting effortLogs, memory and database load come from one process to inspectIssues may appear on one node only, so log aggregation and per-node health checks are needed to find them
Database replication with failoverNot needed for the wiki itself, but a database backup and tested restore are still requiredReplication with automated or documented failover adds a second database to patch, monitor and fail over; confirm the chosen database variant supports your replication design
Stable or LTS line in a clustered setupEither line works; LTS suits teams that want fewer feature-driven upgradesLTS is generally easier to hold steady across a cluster; confirm the release line and extension compatibility with your upgrade cadence before choosing
Questions to answer firstWhat is the acceptable outage per upgrade, who restores the database, and can one server be sized with headroom?Who operates the cluster, how are sessions and attachments shared, which database and servlet container are used, and what is the tested failover procedure?

How requests and data flow through a highly available XWiki layout

Requests start at users outside the trust boundary and reach a reverse proxy or load balancer, which forwards them to one or more XWiki application nodes running on Tomcat. The nodes write to a primary database that streams changes to a replica, and attachments sit on shared storage that every node can read. Backups leave the internal network for a separate target. Check each failover path by testing it: confirm the proxy stops routing to a dead node, and confirm the replica can be promoted and XWiki reconnects.

Traffic path, database replication and backups across the trust boundary.

Building XWiki high availability in sequence

This sequence takes a self-hosted XWiki from a single-instance plan to a cluster-ready deployment with replicated data, shared attachment storage, a fronting reverse proxy, backups and a tested failover. Each step ends with a check you can confirm before moving on.

  1. Choose the line and database variant together

    Pick stable, LTS or the intermediate LTS line based on your upgrade tolerance, then pick the MySQL, PostgreSQL or MariaDB image variant your database team already supports. Confirm in the XWiki documentation that the chosen image tag supports that database version and your servlet container, and record the exact tag, since every node must run it. Done when you have a written tag and database version that the XWiki documentation lists as supported together.

  2. Provision replicated database with a tested failover

    Have your database team build a primary with at least one replica using the replication method the database vendor documents for your chosen version. Point XWiki at a stable connection endpoint, such as a virtual IP or a proxy, rather than a single host name tied to the primary. Run a planned switchover and confirm XWiki reconnects and a test page saves correctly. Done when the switchover completes with no lost writes in your test.

  3. Place attachment storage where every node reaches it

    XWiki stores attachments outside the database in its permanent directory by default, so every node must read and write the same attachment location or users will see missing files depending on which node answers. Choose shared storage that your infrastructure team can support, mount it identically on each node, and confirm the configuration option for attachment storage in the XWiki documentation for your version. Done when an attachment uploaded through one node downloads correctly from another.

  4. Install XWiki nodes from one image and configuration

    Deploy two or more XWiki nodes from the same image tag and the same configuration files, including database connection settings, permanent directory references and cache settings. Keep the configuration in version control so that a change applies to every node in one step. Confirm each node starts, connects to the database and reports the same version. Done when all nodes show the identical version and pass the same smoke test.

  5. Front the nodes with a reverse proxy and health checks

    Place a reverse proxy in front of the nodes that routes users to healthy instances only. Configure a health check against an XWiki URL that the XWiki documentation identifies as suitable for status checks, and confirm your proxy removes a node that fails it. Decide on sticky sessions or shared session behavior based on what your XWiki version requires for login and cache consistency, and verify this in the XWiki documentation. Done when stopping one node causes the proxy to route traffic to the others without a login loop.

  6. Configure the search index to survive node loss

    Search indexes are a common point of failure in clustered wikis, so decide where the index lives and how each node reaches it, following the XWiki search documentation for your version. Confirm which node rebuilds or updates the index and what happens when that node is stopped. After migrations or upgrades, check index health with a known-term search from each node. Done when a search query returns the same results from every node after one node is stopped.

  7. Set up backups for database, attachments and configuration

    Back up the database, the attachment and permanent directory storage, and the configuration and extension list together so they can be restored to one consistent point. Store copies outside the cluster and keep at least one copy that the production administrators cannot overwrite. Confirm backup frequency and retention against your recovery requirements, which you should set with your own risk owners. Done when a full restore into a separate environment brings up a working XWiki that matches production content.

  8. Run a failover drill before go-live

    Rehearse the failures you designed for: a database switchover, the loss of one XWiki node, a proxy health check failure and a restore from backup. Record what users see during each event, how long recovery takes in your environment, and which runbook step each action came from. Fix gaps and repeat the drill until the results match your targets. Done when the drill log is signed off by the platform owner and the runbook has been tested by someone other than its author.

How the layout changes by deployment environment

On virtual machines in your own data center, the layout is usually built from components you already run: a hypervisor cluster, a shared or replicated storage tier, an existing load balancer or reverse proxy, and an enterprise backup product. Database replication follows the database engine you chose, so the design depends on whether your team already operates replicas for that engine. XWiki nodes are typically built from the official Docker images or from packaged Tomcat installs, and the choice affects how you pin versions and rebuild nodes.

  • Database replication: Use the replication model your DBA team already supports for the chosen MySQL, PostgreSQL or MariaDB variant, and confirm failover behavior with the database vendor's documentation.
  • Shared storage: Confirm how attachments and any file storage are shared between XWiki nodes, and whether your SAN or NFS service meets the latency and locking needs of the platform.
  • Proxy: Reuse the existing load balancer if it supports sticky sessions or the session handling you configure, and document the health check endpoint.
  • Backup targets: Back up the database, attachment storage and configuration separately, and keep copies off the hypervisor cluster.
  • Time and certificates: Use your internal NTP sources and internal CA for TLS between proxy and nodes.

Before go-live, test a failed node, a database failover and a restore from backup, and confirm the results against your recovery objectives.

What drives XWiki high availability effort and cost

This table lists the factors that move the effort and cost of making XWiki resilient, why each one changes the work, and how to keep it contained. Read it before asking a partner for a quote, because the same availability target can cost very different amounts depending on user load, data size and compliance evidence. The main takeaway is that the availability target itself is the largest lever, so set it in writing before scoping the architecture.

DriverWhy it moves effortHow to keep it down
Availability target set by the businessA target that requires automatic failover across nodes and sites adds clustering, replication, load balancing and failover testing. A recovery time you can meet with a tested restore from backup is a much smaller build.Write the target as recovery time and recovery point objectives per service, and agree which outages are acceptable before design starts.
User count and concurrent editingMore simultaneous editors raise load on the application servers and the database, which can push a single instance toward clustering. Peak editing periods matter more than total headcount.Measure concurrent sessions during a normal week and during a migration or launch. Size one well-provisioned instance first and add nodes only when measured load requires it.
Data volume and attachment sizeLarge attachment stores and a big database lengthen backup and restore windows and make replication lag more likely. Shared storage for attachments must be designed alongside the database.Ask for an inventory of attachment volume and growth. Agree retention rules for old attachments and test restores against a realistic data size, not an empty wiki.
Number of spaces, pages and extensionsEach installed extension must be compatible with the chosen XWiki line and tested on every node. Many extensions widen the test matrix for upgrades and failover.Remove unused extensions before go-live and keep a short, approved extension list. Test extension changes on staging before any node is updated.
Number of environments (staging, production, recovery)Each environment needs its own database, storage, configuration and backup jobs. A recovery site that must stay in sync adds replication work and ongoing verification.Decide early which environments are required and whether recovery is a warm standby or a restore from backup. Use infrastructure as code so environments stay consistent.
Identity provider integration (OpenID Connect, LDAP or Active Directory)Authentication must work identically on every node and during failover. Directory outages can lock users out of an otherwise healthy wiki, so the identity dependency belongs in the availability design.Confirm which identity provider is authoritative and how it is made redundant. Test login during an identity provider outage and document the fallback for administrators.
Compliance evidence requirementsAssessors often ask for documented backup schedules, restore test records, change logs and access reviews. Producing this evidence adds effort on top of the build, and it recurs with each assessment cycle.Ask which controls and evidence the assessor expects before scoping. Generate backup and restore logs automatically and keep one owner for evidence collection.
Operational support after go-liveMonitoring, patching, certificate renewal, backup verification and incident response continue after the build. This work recurs for as long as the wiki runs.Define who runs each task, which tasks are internal and which are covered by a retainer, and what response times the business expects in writing.

Securing the proxy, database and admin paths in an HA setup

A clustered XWiki has more entry points than a single instance: the reverse proxy, the database and its replicas, the shared storage and the backup copies. Each one can change or expose every node at once, so access to them needs to be narrower than the wiki's own user rights. The controls below apply to the clustered layout specifically; the wider XWiki hardening controls are covered in the security hardening topic.

Restrict network reach to the database

Only the XWiki nodes should be able to open connections to the primary database and its replicas, on the single port the database uses. Permit those source addresses in the database firewall and security groups, and deny everything else, including application workstations and the other database hosts that do not need it. Check the rule from a host outside the allowed set, because a permissive default on a replica is a common gap in clustered deployments.

Keep credentials in a secrets store

Database users, replication accounts and the XWiki database configuration should be pulled from a secrets manager at startup, not written into xwiki.cfg, compose files or image layers. Use one account per node role, give the replication account only replication privileges, and plan a rotation procedure that updates every node in a single change window. Confirm with your platform team how secrets are injected into your container runtime.

Limit the proxy management interface

Reverse proxies often expose a status page, admin API or dashboard on a separate port. Bind those interfaces to a management network or localhost, require authentication, and keep them off the public listener that serves the wiki. Confirm which management endpoints your specific proxy version enables by default, and disable any that the wiki does not use.

Keep node and storage traffic private

Traffic between XWiki nodes, the database, the search index and any shared file storage should travel on private addresses or a dedicated segment, never over a public interface. Encrypt it where the link crosses a trust boundary and confirm that your database driver is configured to require TLS. Document each internal path so that a network change does not silently move traffic onto an exposed route.

Protect backups with encryption and separate access

Database dumps and attachment archives contain the full content of the wiki, including page history and user data. Encrypt them before they leave the database host, store them in a location that application administrators cannot write to, and give restore rights to a smaller group than the people who run the cluster. Test a restore on an isolated host at a regular interval, because an encrypted backup you cannot decrypt is not a recovery plan.

Restrict administrative and scripting rights

In a cluster, a change made through the wiki's administration screens or a script with programming rights can affect every node after the next reload. Limit global admin and programming rights to a named group, review who holds them, and log changes to configuration pages. Since these rights act on the shared database, treat them as infrastructure access rather than content editing.

How to test failover and restore before go-live

Failover is only proven when the team has broken the setup on purpose and timed the recovery. Before go-live, run four tests in a staging copy that matches production topology: a planned XWiki node stop with traffic still flowing, a database primary failover, a reverse proxy failure and recovery, and a full restore from backup into a separate environment followed by a content and search check. Each test should have a named owner, a written expected result and a rollback step, so that a failed test does not leave the staging environment in an unknown state.

Start with the node stop. Drive steady read and edit traffic through the reverse proxy, then stop one Tomcat instance hosting XWiki and watch for failed requests, session loss and stuck page locks. Next, promote a database replica (for example by stopping the primary under load) and confirm that the XWiki nodes reconnect to the new primary without a restart, using the connection and failover settings your database driver and pooler document. Stop the proxy itself and confirm that the standby or health-checked path takes over. Record the time from each fault to the first successful request and to full service, because those measurements are the only evidence of recovery time your team will have. Target recovery times must come from your own business requirements for downtime and data loss, not from this page, and the figures you observe should be compared against those requirements.

The restore test matters most because replication copies mistakes as faithfully as data. Restore the latest database dump and the attachment and file storage from backup into a separate environment, start XWiki there, and check a sample of pages, attachments, page history, user accounts and rights. Then rebuild or verify the search index, since search results depend on the index and not only on the database. Record the restore duration, any data loss compared with the backup point, and every user-facing error. Decide the test passed only if the restored system is consistent, the errors are understood, and the team could repeat the procedure without the original engineer. Confirm with your database and backup vendors how point-in-time recovery and backup encryption work in your environment before writing the runbook.

What to monitor, back up, upgrade and document after go-live

A highly available XWiki is only as dependable as the routine that keeps it running. The cards below cover what to watch, what to back up, how to upgrade nodes safely, and what the team needs written down before the first incident. Each item connects to the others: a failover is only as good as its last tested restore, and an upgrade is only safe once extensions have been checked on the same line.

Node and proxy health

Track each XWiki node's response time, JVM memory use, thread pool saturation and error logs, and alert on sustained rises rather than single spikes. Watch the reverse proxy in parallel, including upstream 5xx rates and failed health checks, so a node that is up but slow gets pulled from rotation. Confirm that your health check hits a page that actually exercises the database, not only the servlet container. Record the baseline values during the first weeks so alerts have something to compare against.

Database replication lag

Replication lag is the first signal that a failover would lose recent edits. Measure the delay between the primary and each replica for MySQL, MariaDB or PostgreSQL, whichever engine your XWiki image uses, and alert when the delay exceeds the recovery point you have agreed with the business. Check that replicas are actually readable and that the application points to the primary for writes. Confirm the replication mode and failover tooling with your database team, since XWiki itself does not manage replication.

Storage and search index status

Monitor free space on the database volume, the attachment storage and the search index location, since a full disk can corrupt writes before any application error appears. Check search index health after failovers, restores and upgrades, and plan a reindex step in the runbook when results look incomplete. Track growth of attachments over time so capacity reviews happen before a quota is hit. Ask your team which of these paths lives on shared storage and which is local to each node, because that decides what a node replacement must restore.

Backup scope and retention

A complete XWiki backup covers the database, the attachment and file storage, the XWiki configuration files (such as the main configuration and servlet container settings), and the installed extensions. Back up the database and attachments together or from a consistent point in time, or restores will show pages that reference missing files. Retention periods are a policy decision: agree them with the business and your compliance team, and confirm how long backups must be kept and encrypted in your environment. Test restores on a schedule, not only after a failure.

Upgrades across nodes

Choose the release line first, whether stable, LTS or the intermediate LTS, and stay on it deliberately. Upgrade in a staging copy using the same database engine and servlet container, then test every installed extension on that exact version before touching production. Roll nodes one at a time behind the proxy, confirm each returns healthy, and keep the previous image and a database backup available until the upgrade is signed off. Confirm with XWiki SAS which upgrade support and advisory coverage your subscription includes.

Failover runbook and handover documents

The runbook should name who declares a failover, the order of steps for promoting a database replica, repointing XWiki, restoring from backup and verifying pages, attachments and search. Pair it with a handover pack covering architecture diagrams, configuration locations, backup and restore procedures, extension inventory and contact paths for XWiki SAS or your internal team. Ongoing upgrades and support can be handled by your own staff or under a retainer, so decide that before go-live and write it into the pack. Ask XWiki SAS to confirm exactly what support coverage, response times and escalation paths each plan includes.

XWiki pricing

Questions buyers ask about XWiki high availability

Is a single well-sized XWiki instance enough for our size?

A single well-sized instance is often enough when downtime of a few hours is tolerable and the wiki serves a bounded group of users, but the answer depends on your load, your recovery time objective and your recovery point objective, which you should set before choosing a layout. Ask for a sizing review that covers concurrent users, attachment volume, index size and peak editing periods. The main risk of one node is that a failed server, a bad upgrade or a corrupted database stops access until someone restores service. Confirm with your own operations team what outage length the business accepts, then decide whether a second node, a backup-and-restore plan, or both are justified.

How much extra effort does a clustered XWiki layout add?

A clustered layout adds work in several places: shared or replicated database and attachment storage, session handling across nodes, a load balancer or reverse proxy with health checks, consistent configuration and extension versions on every node, and a process for rolling upgrades. Each node must run the same XWiki version and extensions, and changes to configuration files must be applied everywhere. Ongoing effort grows with the number of nodes because monitoring, patching and restore testing multiply. Ask any partner to list each added component, who operates it after go-live, and how upgrades are sequenced without taking the wiki offline.

Can our internal team build a highly available XWiki setup?

An internal team can build it if it already runs Tomcat-based services, a relational database with replication, a reverse proxy and backup tooling, and has someone who can test failover. The official XWiki Docker images are available in MySQL, PostgreSQL and MariaDB variants on Tomcat, which gives your team a known starting point, but the clustering, replication and recovery design remain your responsibility. Ask yourself whether the team can run a failover drill and a full restore on a schedule. If not, a partner can build and document the setup while your team takes over operations.

What do we need to provide for a high availability build?

The work needs access and named owners from several groups. Typically you provide: infrastructure access in your cloud account, data center or private network; database owners who can approve replication and backup settings; storage owners for attachments and backup targets; identity contacts for SSO and directory integration; certificate contacts for the public and internal hostnames; and a defined recovery target, including the acceptable outage length and data loss window. Ask the partner for a written list of these inputs before work starts, and agree who signs off each change in the change process you already use.

How long does a high availability build take, and what changes the timeline?

The duration depends on the chosen layout, the number of components you must provision, how quickly access and approvals arrive, and how much testing is required. Timelines usually move most when database replication or storage needs new infrastructure, when identity integration waits on another team, or when failover and restore tests reveal gaps. No duration is stated here because it must come from a written scope for your environment. Ask for a phased plan with milestones for design, build, failover testing, restore testing and handover, and ask which dependencies sit outside the partner's control.

What should a quote for XWiki high availability include?

A useful quote lists the scope in writing: the target layout, the number of XWiki nodes, the database and storage components, the reverse proxy and load balancer configuration, backup and restore procedures, and the failover and restore tests to be performed. It should name the deliverables, such as a runbook, configuration documentation and a test report, and state what is out of scope, such as hardware, licenses or your cloud costs. Ask whether ongoing support, upgrades and testing are included or offered as a retainer, and ask who pays for any third-party licenses. Engagements are normally fixed-scope, so the quote should follow directly from the agreed scope.

Can a high availability XWiki setup run in an air-gapped network?

It can, provided every required image, package, extension and dependency is mirrored into the isolated network before installation, and provided the database, storage, identity and certificate services are available inside that network. The official XWiki Docker images can be stored in an internal registry, but you must confirm how your environment handles image provenance, updates and security patches. Extensions and their dependencies also need an approved internal source. Ask any partner how they will deliver artifacts into the network, how security updates reach the isolated environment, and how restore tests will run without internet access.

How DeployOpen scopes, builds and hands over XWiki high availability

DeployOpen plans, implements, hardens, backs up, documents and supports self-hosted open-source platforms inside the client's own infrastructure, including XWiki. For high availability, we start from the clustering or single-instance decision, then build and document the database, backup, reverse proxy and recovery setup so your operations team can run it.

How we scope

  • Agree the availability target, recovery expectations and which XWiki components must stay online during failures
  • Confirm the target infrastructure, data center or cloud accounts, and the database and servlet container in use
  • Record the scope, deliverables and timelines in writing before any build work starts, as engagements are fixed-scope

How we build

  • Configure the reverse proxy, TLS termination and XWiki nodes or a single sized instance according to the agreed design
  • Set up database replication and backup jobs, then test restore procedures against a copy of the wiki data
  • Verify failover behavior, session handling and attachment storage under controlled failure tests before go-live

How we hand over

  • Deliver runbooks covering backup schedules, restore steps, failover actions and the configuration that must not drift
  • Document the architecture decisions, including the trade-offs between a clustered and a single well-sized instance
  • Walk your platform and database teams through restore and failover drills so the knowledge stays with your staff

How we support

  • Offer ongoing support, upgrades and continuous testing as a retainer after go-live, sized to the agreed scope
  • Review backup restore results and capacity signals with your team on the cadence agreed in the retainer
  • Plan XWiki version upgrades and retest high availability behavior after each upgrade or infrastructure change

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.