Configuring Synchrony for Data Center
Here's an example architecture, with a 2 node Synchrony cluster to support a three node Confluence cluster.
To set up Synchrony in Data Center you'll need to:
- Copy the following files and directories from one of your Confluence nodes to wherever you plan to run Synchrony:
- your database driver from
- Edit the
start-synchrony.batfile and follow the instructions in the script itself to insert the required parameters listed below.
- Add any additional system properties in the Optional Overrides section.
See Installing Confluence Data Center for a step by step guide to setting up Synchrony for Data Center.
Required Synchrony properties (Data Center only)
Before you can run Synchrony, you need to edit the
start-synchrony script to provide the following values.
|Public IP address or hostname of this Synchrony node. It could also be a private IP address - it should be configured to the address where Synchrony is reachable by the other nodes.|
|This is the URL for your Confluence database. For example |
|This is the username of your Confluence database user.|
(Optional) This is the password for your Confluence database user. If your password contains special characters, Synchrony may silently fail to connect to the database.
Rather than hardcoding your password, we recommend setting your password with the environment variable
This determines how Synchrony should discover nodes. You'll be prompted to uncomment a set of parameters for either:
Follow the prompts in the script for the values you need to enter for each of these.
|This is the path to your database driver file. If you're running Synchrony on its own node, you'll need to copy your database driver to an appropriate location then provide the path to this location.|
|This is the path to the |
This is the URL that the browser uses to contact Synchrony. Generally this will be the full URL of the load balancer Synchrony will run behind plus the Synchrony context path, for example
Note that it does not end with
|You can choose to specify additional system properties. See the table below for recognised Synchrony system properties.|
Optional Synchrony system properties (Data Center only)
When you start Synchrony, we pass default values for the properties listed below. You can choose to override these values by specifying any of these properties when you start Synchrony.
This is Synchrony's Hazelcast port. Specify this property if you do not want to use port 5701 or if it is not available.
As with the Confluence Hazelcast port (5801) you should ensure that only permitted cluster nodes are allowed to connect to Synchrony's Hazelcast port, through the use of a firewall and or network segregation.
| ||25500||This is the Aleph binding port. Synchrony uses Aleph to communicate between nodes. Specify this property if you don't want to use the default.|
If the cluster join type is multicast, you can specify an IP address for the multicast group if you don't want to use the default.
|54327||If the cluster join type is multicast, you can specify a multicast port if you don't want to use the default.|
| ||32||If the cluster join type is multicast, this is the time to live threshold. The default, |
|If the cluster join type is AWS, this is your AWS access key.|
|If the cluster join type is AWS, you can authenticate by IAM role or Secret key. This is your AWS secret key.|
|If the cluster join type is AWS, you can authenticate by IAM role or Secret key. This is your AWS IAM role.|
|us-east-1||If the cluster join type is AWS, this is the AWS region your Synchrony nodes will be running in.|
|If the cluster join type is AWS, and you want to narrow the members of your cluster to only resources in a particular security group, specify the name of your AWS security group.|
|If the cluster join type is AWS, and you want to narrow the members of your cluster to only resources with particular tags, specify the AWS tag key.|
|If the cluster join type is AWS, and you want to narrow the members of your cluster to only resources with particular tags, specify the AWS tag key value.|
If the cluster join type is AWS, this is the AWS endpoint for Synchrony to use (the address where the EC2 API can be found, for example 'ec2.amazonaws.com').
|5||If the cluster join type is AWS, this is the joining timeout (in seconds).|
|Defaults to the same value as ||This is the network interface Synchrony will use to communicate between nodes. Specify this property if you don't want to use the default, which uses the value of the required property Defaults to the same value as |
|Defaults to the same value as |
This is the Aleph binding address. This should be set to the same value as
Specify this property if you did not use the default value for
|8091||This is the HTTP port that Synchrony runs on. If port 8091 is not available, specify this property to choose a different port.|
|Defaults to the context path of ||This is the context path for Synchrony. There should be no need to change this.|
|True||If you're running Confluence in an IPv6 environment, you will need to set this property to |
Start and stop Synchrony
To start Synchrony, run
start-synchrony.bat. A process ID (PID) file will be created in your synchrony directory.
To stop Synchrony, run
stop-synchrony.bat. This will destroy the PID file that the start script created in your Synchrony directory. If you've customised the location for storing the PID file in the
start-synchrony script, you'll need to also update this in the
If you're unable to start Synchrony, check that there is not an existing PID file in your Synchrony directory.
You can only use these scripts to start and stop Synchrony in Confluence Data Center.
To restart Synchrony in Confluence server head to > Collaborative editing. > General Configuration
Accessing Synchrony logs
Your Synchrony logs will be stored in the Synchrony directory in each node (wherever you run the start and stop scripts from).
If your users are unlikely to be able to get a WebSocket connection to Synchrony (for example your load balancer or reverse proxy does not support WebSockets) you can enable XHR fallback by passing the
synchrony.enable.xhr.fallback system property to Confluence. Note that this is a Confluence system property and must be passed to Confluence, it is not part of your start Synchrony command.
You will need to open Synchrony's port, as you can't use the built-in Synchrony proxy with Data Center. The
synchrony.proxy.enabled system property mentioned in the Confluence Server documentation has no effect in Data Center.
Run Synchrony in an IPv6 environment
If you're running Confluence Data Center in an IPv6 environment, you will need to start Synchrony with the following JVM argument:
If you're using the start-synchrony scripts, you'll just need to uncomment this line in the script.
Run Synchrony as a service
If you'd prefer to run Synchrony as a service, see Run Synchrony-standalone as a service on Linux.
It's currently not possible to run Synchrony as a service on Windows.
Provide credentials to Synchrony using environment variables (Linux)
If you prefer to store sensitive information in your environment, rather than directly in the Synchrony startup scripts you can create a
synchronyenv file, and use it to provide your database credentials.
These instructions are for Linux users. We'll assume your dedicated Synchrony user is named
Create the synchronyenv file
Change to your Synchrony user, for example:
sudo su - synchrony
- In your
<synchrony-home>directory, create a new file called
Add the following lines to the
synchronyenvfile, and include your database credentials.
export SYNCHRONY_DATABASE_USERNAME="database-username" export SYNCHRONY_DATABASE_PASSWORD="database-password"
Modify your Synchrony startup script
Comment out the following lines
Note that they may already be commented out, or have slightly different information.
Uncomment the following line, and include the path to the
synchronyenvfile you've just created.
Save your changes.
Modify your shell profile
Bash as login shell will load the following profiles in order. Your environment may vary, but this is an example for Ubuntu:
Note: Bash as non-login interactive shell will load ~/.bashrc
Edit the appropriate profile as noted above, and to add the following code:
# Defines the absolute path to the synchronyenv file. # For example, if your synchronyenv file was located in /opt/synchrony-home/synchrony, you would use the example: source /opt/synchrony-home/synchrony/synchronyenv
Confirm the variables are in place by exiting the bash session of the Synchrony user, then re-entering it, and running the following command:
Your database credentials defined should appear in your env output. Here's a sanitized example:
XDG_SESSION_ID=15 SYNCHRONY_DATABASE_PASSWORD=<sanitized> ... SYNCHRONY_DATABASE_USERNAME=<sanitized> ... _=/usr/bin/env
If the info you defined in your
synchronyenv file appears correctly in the output above, you should be good to start Synchrony once again. If they don't appear, you may need to define them in a different profile config, based on your operating system and shell.