Installing Confluence Data Center

In this guide we'll run you through installing Confluence Data Center, which is a clustered solution, in a Windows or Linux Environment.

This guide covers installing for the first time, with no existing data. If you already have a Confluence Server instance, see Moving to Confluence Data Center.


Other ways to install Confluence Data Center:


Interested in learning more about Data Center? Find out more about the benefits of Confluence Data Center.

On this page:

Before you begin

Clustering requirements

To run Confluence in a cluster you must:

  • Have a Data Center license (you can purchase a Data Center license or create an evaluation license at my.atlassian.com)
  • Use a supported external database, operating system and Java version
  • Use a load balancer with session affinity and WebSockets support in front of the Confluence cluster
  • Have a shared directory accessible to all cluster nodes in the same path (this will be your shared home directory)
  • Use OAuth authentication if you have application links to other Atlassian products (such as Jira)

Supported platforms

See our Supported Platforms page for information on the database, Java, and operating systems you'll be able to use. These requirements are the same for Server and Data Center deployments. See Confluence Data Center Technical Overview for important hardware and infrastructure considerations.

We also have specific guides and deployment templates to help you running Confluence Data Center in AWS or Azure. Check them out to find out what's required.

Terminology

In this guide we'll use the following terminology:

  • Installation directory – The directory where you installed Confluence on a node.
  • Local home directory – The home or data directory on each node (in non-clustered Confluence this is simply known as the home directory).
  • Shared home directory – The directory you created that is accessible to all nodes in the cluster via the same path. 
  • Synchrony home directory - The directory where you configure and run Synchrony from (this may be on a confluence node, or on its own node)

At the end of the installation process, you'll have an installation and local home directory on each node, and a single shared home directory (a total of 5 directories in a two node cluster) for Confluence plus directories for Synchrony. 

Install and set up Confluence 

1. Install Confluence on the first node

  1. Install Confluence on node 1
    See Installing Confluence on Windows from Zip File or Installing Confluence on Linux from Archive File for more information. 
  2. Start Confluence on Node 1
  3. The setup wizard will prompt you to complete the migration, by entering:
    • A name for your cluster
    • The path to the shared home directory you created earlier
    • The network interface Confluence will use to communicate between nodes
    • A multicast address (automatically generated or enter your own) or the IP addresses of each cluster node
    • How you want Confluence to discover cluster nodes:

      • Multicast - enter your own multicast address or automatically generate one.
      • TCP/IP - enter the IP address of each cluster node
      • AWS - enter your IAM Role or secret key, and region.
         

        AWS node discovery...

        We recommend using our Quick Start or Cloud Formation Template to deploy Confluence Data Center in AWS, as it will automatically provision, configure and connect everything you need.

        If you do decide to do your own custom deployment, you can provide the following information to allow Confluence to auto-discover cluster nodes:

        FieldDescription
        IAM Role or
        Secret Key
        This is your authentication method. You can choose to authenticate by IAM Role or Secret Key.
        RegionThis is the region your cluster nodes (EC2 instances) will be running in.
        Host headerOptional. This is the AWS endpoint for Confluence to use (the address where the EC2 API can be found, for example 'ec2.amazonaws.com'). Leave blank to use the default endpoint.
        Security group nameOptional. Use to narrow the members of your cluster to only resources in a particular security group (specified in the EC2 console).
        Tag key and Tag value

        Optional. Use to narrow the members of your cluster to only resources with particular tags (specified in the EC2 console).

  4. Stop Confluence on Node 1

Set up Synchrony

If you don't plan to use collaborative editing, you can skip the steps in this section and jump straight to adding your second Confluence node. 

2. Set up your Synchrony cluster

In this example, we assume you'll run Synchrony in its own cluster.
 
  1. Grab the <install-directory>/bin/synchrony directory from your first Confluence node and move it to your Synchrony node.  We'll call this your <synchrony-home> directory.
  2. Copy synchrony-standalone.jar from your Confluence local home directory to your <synchrony-home> directory. 
  3. Copy your database driver from your Confluence <install-directory>/confluence/web-inf/lib to your <synchrony-home> directory or other appropriate location on your Synchrony node.
  4. Edit the <synchrony-home>/start-synchrony.sh or start-synchrony.bat file and enter details for the parameters listed under Configure parameters.
    See Configuring Synchrony for Data Center for more information on the required parameters and some and optional properties that you can also choose to specify.
  5. Start Confluence then head to 
    http://<SERVER_IP>:<SYNCHRONY_PORT>/synchrony/heartbeat
    to check that Synchrony is available
  6. Copy your <synchrony-home> directory to each Synchrony node. As each node joins you'll see something like this in your console.

    Members [2] {
    	Member [172.22.52.12]:5701
    	Member [172.22.49.34]:5701 
    }
    
  7. Configure your load balancer for Synchrony.
    Your load balancer must support WebSockets (for example NGINX 1.3 or later, Apache httpd 2.4, IIS 8.0 or later). SSL connections must be terminated at your load balancer so that Synchrony can accept XHR requests from the web browser. 

3. Start Confluence on Node 1

In this example, we assume you use the same load balancer for Synchrony and Confluence, as shown in Configuring Synchrony for Data Center.

  1. Start Confluence on node 1 and pass the following system property to Confluence to tell Confluence where to find your Synchrony cluster.

    -Dsynchrony.service.url=http://<synchrony load balancer url>/synchrony/v1

    For example http://yoursite.example.com/synchrony/v1. You must include /v1 on the end of the URL.

    If Synchrony is set up as one node without a load balancer, use the following instead:

    -Dsynchrony.service.url=http://<synchrony ip or hostname>:<synchrony port>/synchrony/v1

    For example http://42.42.42.42:8091/synchrony/v1 or http://synchrony.example.com:8091/synchrony/v1

    You may want to add this system property to your <install-directory>/bin/setenv.sh or setenv.bat so it is automatically passed every time you start Confluence. See Configuring System Properties for more information on how to do this in your environment.

  2. Head to  > General Configuration > Collaborative editing to check that this Confluence node can connect to Synchrony. 

    Note: to test creating content you'll need to access Confluence via your load balancer.  You can't create or edit pages when accessing a node directly.

Add more Confluence nodes

4. Copy Confluence to second node

To copy Confluence to the second node:

  1. Shut down Confluence on node 1
  2. Shut down your application server on node 2, or stop it automatically loading web applications
  3. Copy the installation directory from node 1 to node 2
  4. Copy the local home directory from node 1 to node 2
    If the file path of the local home directory is not the same on nodes 1 and 2 you'll need to update the <installation directory>/confluence/WEB-INF/classes/confluence-init.properties file on node 2 to point to the correct location.

Copying the local home directory ensures the Confluence search index, the database and cluster configuration, and any other settings are copied to node 2.

5. Configure load balancer

Configure your load balancer for Confluence. You can use the load balancer of your choice, but it needs to support session affinity and WebSockets.

SSL connections must be terminated at your load balancer so that Synchrony can accept XHR requests from the web browser.

You can verify that your load balancer is sending requests correctly to your existing Confluence server by accessing Confluence through the load balancer and creating a page, then checking that this page can be viewed/edited by another machine through the load balancer.

6. Start Confluence one node at a time

You must only start Confluence one node at a time. The first node must be up and available before starting the next one.

  1. Start Confluence on node 1
  2. Wait for Confluence to become available on node 1
  3. Start Confluence on node 2
  4. Wait for Confluence to become available on node 2.

The Cluster monitoring console ( > General Configuration > Clustering) shows information about the active cluster.

When the cluster is running properly, this page displays the details of each node, including system usage and uptime. Use the menu to see more information about each node in the cluster.

7. Test your Confluence cluster

Remember, to test creating content you'll need to access Confluence via your load balancer.  You can't create or edit pages when accessing a node directly.

A simple process to ensure your cluster is working correctly is:

  1. Access a node via your load balancer, and create a new document on this node
  2. Ensure the new document is visible by accessing it directly on a different node
  3. Search for the new document on the original node, and ensure it appears
  4. Search for the new document on another node, and ensure it appears

If Confluence detects more than one instance accessing the database, but not in a working cluster, it will shut itself down in a cluster panic. This can be fixed by troubleshooting the network connectivity of the cluster.


Security

Ensure that only permitted cluster nodes are allowed to connect to a Confluence Data Center instance's Hazelcast  port (which defaults to 5801) or Synchrony's Hazelcast port (which defaults to 5701) through the use of a firewall and or network segregation.

Troubleshooting

If you have problems with the above procedure, please see our Cluster Troubleshooting guide.

If you're testing Confluence Data Center by running the cluster on a single machine, please refer to our developer instructions on Starting a Confluence cluster on a single machine.

Upgrading a cluster

It's important that upgrades follow the procedure for Upgrading Confluence Data Center.

Last modified on Aug 13, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.