Version 12.1 by Thomas Mortagne on 2020/01/28

XWiki provides an easy way to setup clustered instances of XWiki based on network events distribution.


  • events synchronization between XWiki instances
  • multiple clustering channels
  • possibility to start/stop the clustering channel at runtime


Enable event distribution

To enable event distribution in an XWiki instance go to file and set the property observation.remote.enabled to true.

Setup communication channels

Then you need to create a JGroups configuration file for each different cluster group you want to setup.

For this go to the /WEB-INF/observation/remote/jgroups folder and add one xml file by clustering group. Generally there is only one for a simple cluster.

See JGroups documentation for more details on how to setup JGroups configuration files.

If you have IPv6 on your server, you are also advised to read this IPv6 article. Defining when launching the JVM is probably your best bet in most cases. If your really want to use IPv6 for your channels, you should probably upgrade JGroup to version 2.10.0.GA and use a JVM 6 at least.

Start communication channels

The name of the xml file matches the identifier of the channel.

To indicate which channels to start when XWiki starts list them in the property observation.remote.channels of the file.

Choose network adaptor implementation to use

By default only JGroups implementation is provided, but it's possible to add more. See the Remote Observation Module for more details.


The following limitations currently exist when you use clustering:

  • XWIKI-6235: The Scheduler feature is not cluster-aware and thus each node of XWiki runs its own scheduler and thus the same scheduler jobs will execute on all nodes. The workaround is to disable the Scheduler plugin on all nodes except on one. Note that this creates a SPOF
  • XWIKI-14722 If you use Filesystem-based attachments then you'll need to set up a shared filesystem that all nodes in the cluster can access. Otherwise only the node on which the attachment was added will see the attachment (it'll be broken on other nodes).
  • XWIKI-11441 If a node is down and events happen, these events won't be propagated to the node when it comes back up. For example, imagine you install an extension on a node of the cluster while another node is down. When that node is restarted, the extension won't be installed on it.



See the Remote Observation Module for more details of the event distribution features and extension capabilities.

Follow the test clustering tutorial for a complete tutorial on how to setup a simple cluster between two instances of XWiki on the same server.


Get Connected