Deploying Jira Datacenter Cluster with RMsis

This article explains how to set up a multi-node Atlassian Jira Datacenter Cluster locally using a reverse proxy as a load balancer (Apache httpd or NGINX), hosts file to resolve a name into an address, and PostgreSQL as a database server for Jira and RMsis.

 Steps involved in the deployment process

  1. Prepare the PostgreSQL server to accept connections from multiple hosts.

  2. Prepare Apache httpd or NGINX server as a reverse proxy for Jira.

  3. Add entries to the host file to resolve a custom domain to an IP address.

  4. Install Jira in a reverse proxy configuration with a custom context path.

  5. Create a shared home directory for multiple nodes of Atlassian Jira.

  6. Re-configure Jira Installation to work in a cluster.

  7. Re-configure the reverse proxy server to work as a load balancer for the Jira Cluster.

  8. Add multiple nodes to the cluster.

  9. Install RMsis on one node of the cluster.

Although multiple steps can be clubbed into one, the steps listed here are independent of each other for easy understanding and debugging so that the focus remains on one problem at a time.

Preparing PostgreSQL server

Install PostgreSQL as per your OS by downloading it from the official website. Use homebrew or if you are on Mac OS. Keep note of all the paths involved during the installation and the password to access it later.

The default installation restricts the server access to the local instance only i.e it is configured to be bound to "localhost". Any request to access the database from any other host on the network will be denied. It is used to store data from Jira and RMsis servers.

The default PostgreSQL configuration works for single-node installation where Jira, PostgreSQL, and RMsis servers are installed on the same host but fails if the database server is installed on a separate host or if multiple nodes of the cluster are on separate hosts. Installation showing the location of various files

In order to allow access from the different hosts on the network, the PostgreSQL server must be configured to allow connections from other hosts on the network. This requires changes in two different PostgreSQL configuration files, namely postgresql.conf and pg_hba.conf

  1. Update postgresql.conf file

    • Location: Depending upon the OS and installation option, the location of this file varies. Do a google search to find the location of this file as per your OS and the installation option used.

    • Configuration to change: This file contains multiple options for PostreSQL database settings but we are only interested in listen_addresses property. This variable controls which IPs the server will answer on, not which IPs the server will permit connections to authenticate from.

      The default configuration for listen_addresses in postgresql.conf


    • Updated Value: Update the value of the listen_addresses property by replacing localhost with * and ensure that this line is not commented by removing the # symbol before this line. This is the most common mistake done by first-time users. The updated file should look like the image below.

      Update listen_addresses value to *
    • Save and restart PostgreSQL This is necessary to apply the changes. The simplest way is to restart the PC or look for the restart command as per your OS and installation option.

  2. Update pg_hba.conf file

    • Location: Depending upon the OS and installation option, the location of this file varies. Do a Google search to find the location of this file as per your OS and the installation option used.

    • Configuration to change: This file is used to control access at a finer-grained level for which IPs the server will accept logins from for specific databases and users. We are interested in entries corresponding to IPv4 and IPv6 hosts.

      pg_hba.conf default configuration


    • Updated Value: We need to specify the addresses of the hosts which must be allowed to access the database along with the method for user authentication. Add the following entries:

      host all all md5 host all all ::/0 md5

      The updated file should look like the image below. Save and restart PostgreSQL to apply the changes.

      Updated pg_hba.conf file

Create a Reverse Proxy server for Jira

A reverse proxy is a server that sits in front of web servers and forwards client (e.g. web browser) requests to those web servers. Visit this link to learn more about proxy and reverse proxy servers.

In practical implementations, if you see any named URL without a port number. It suggests that a reverse proxy is in use. For example, if Jira is running at http://localhost:8080/jira, we can use a reverse proxy to access it at or

If no port is specified in the URL, it defaults to port 80 for HTTP and port 443 for HTTPS connections.

We can use Apache httpd or NGINX to redirect requests from browsers to Jira or RMsis depending upon the context path(/jira for Jira and /rm for RMsis) in the URL. The reverse proxy intercepts each request and forwards it to the respective application.

  • This process has the additional advantage of accessing multiple applications using the same URL. For example, if we have multiple applications running on the same or different PC on the network. All these can be accessed using a single URL. Notice the common part in each URL which helps in hiding the implementation details like the application server IP address and port number.

  • We can also change HTTP requests into HTTPS requests using an SSL certificate to expose them to the end user. Notice how the above applications are running on HTTP but they are accessible over HTTPS.

  • This approach helps in avoiding the CORS issue as well which allows or restricts communication between two different applications based on various browser policies.

Install Apache httpd or NGINX on your system and add the necessary configurations for the redirections.

For Apache httpd

Find the location of httpd.conf file as per your OS and installation method and insert the following configurations.

Usually, it’s located at the following location: etc/httpd/conf/httpd. conf

Note: Do not forget to add / at the end of http://localhost:8080 as some of the URLs will break if we miss it. For example, http:/ will change to http:/localhost:8080icons/logo.jpg instead of going to http:/localhost:8080/icons/logo.jpg. Notice the missing / between 8080 and icons

<VirtualHost *:80> #URL from which the application will be accessed ServerName ProxyRequests Off ProxyVia Off <Proxy *> Require all granted </Proxy> #For Jira server running on port 8080 ProxyPass / http://localhost:8080/ ProxyPassReverse / http://localhost:8080/ # Optional: Specify location for log files to ease debugging ErrorLog "/private/var/log/apache2/" CustomLog "/private/var/log/apache2/" common </VirtualHost>

It is recommended to create a new configuration file and add a reference to the httpd.conf file. See attached image where these configurations are added to jira-vhost.conf file inside <APACHE_ROOT>/extra directory and the reference is added in the httpd.conf file

Proxy pass is used to forward requests from a web server to another server, while proxy pass reverse is used to forward responses from the other server back to the web server.

Reverse proxy configuration files

Command to verify the load balancer configuration

apachectl configtest

Please note we have not yet changed the context path of Jira. It is running in its default context of / and it can be accessed simply by using the URL http://localhost:8080/

Reverse proxy configuration for Jira in a separate file

For NGINX server

Find the location of ngnix.conf file as per your OS and installation method and insert the following configurations.

Usually, it’s located at the following location: /etc/nginx/nginx.conf

server { listen 80; server_name; #Configuration for JIRA (running on port 8080) location / { proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Forwarded-Server $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass; } }


Configure Jira to work with reverse proxy

Jira server configuration file

Sample Jira server configuration file with reverse proxy and context details

Location of server.xml file

Re-Configure Jira to work in Cluster

Create a shared home directory

Create a file for both nodes which stores the note name and shared drive location

Sample Jira file to be placed in each Jira local home

Add reverse proxy configurations for Cluster

Reverse proxy configuration for Jira Cluster

<VirtualHost *:80> ServerName ProxyRequests Off ProxyVia Off ProxyPreserveHost On # <Proxy *> # Require all granted # </Proxy> #for JIRA DC Cluster Setup <Proxy balancer://jiracluster> # JIRA DC node 1 BalancerMember route=primary # The above link refers to Link #2 in Figure 1 # JIRA DC node 2 # BalancerMember route=secondary # The above link refers to Link #6 in Figure 1 # Security "we aren't blocking anyone but this the place to make those changes Order Deny,Allow Deny from none Allow from all # Load Balancer Settings # We are not really balancing anything in this setup, but need to configure this ProxySet lbmethod=byrequests ProxySet stickysession=JSESSIONID </Proxy> ProxyPass /rm ProxyPassReverse /rm #for JIRA Data Center # Don't reverse-proxy requests to the management UI ProxyPass /balancer-manager ! # Reverse proxy all other requests to the JIRA cluster ProxyPass / balancer://jiracluster/ # Here's how to enable the load balancer's management UI if desired <Location /balancer-manager> SetHandler balancer-manager # You SHOULD CHANGE THIS to only allow trusted ips to use the manager Order deny,allow Allow from all </Location> ErrorLog "/private/var/log/apache2/" CustomLog "/private/var/log/apache2/" common </VirtualHost>


Re-start Jira and check the node status

Check the Jira cluster status

Node name will appear in the footer

Jira cluster with logged-in node

Add remaining nodes as per this doc: