Run Synchrony-standalone as a service on Linux
Platform Notice: Server and Data Center Only. This article only applies to Atlassian products on the server and data center platforms.
This guide applies to Confluence Data Center 6.5 and later. See Run Synchrony-standalone as a service on Linux for Confluence 6.4 and earlier if you're using an earlier version of Data Center. This guide does not apply if Synchrony is managed by Confluence.
This article will guide you through how to run Synchrony as a service on a standalone node or cluster in Linux, for use with Confluence Data Center 6.5 or later.
We also assume you already have the latest Oracle Java version installed.
How to check
You must be using Oracle Java (not OpenJDK). To check your current java version:
which java java -version
If it's not already installed, either download it from Oracle and copy to the machine, or use the package manager like so:
sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer
Once installed, run the
java -version command again to confirm your version.
How to run Synchrony as a service on a standalone node
In Linux, the best practice is to install, configure and run each service (including Synchrony) as a dedicated user with only the permissions they require.
To run Synchrony automatically on Linux, follow the steps below. These steps are for Ubuntu 16, so you may need to adjust the syntax of these commands if you're using RHEL or another Linux distribution.
synchronyuser to run Synchrony, using the following command running as root (not using sudo):
addgroup --gid 1234 synchrony && useradd -m -s /bin/bash -u 1234 -g 1234 synchrony;
Set a password for your synchrony user:
sudo passwd synchrony
Create your Synchrony home directory. This is where we'll run Synchrony from, and write logs to.
sudo mkdir -p /opt/atlassian/synchrony
Copy the following files and directories from your Confluence node to your Synchrony home directory:
- your database driver from
- for convienience you may also want to copy over your
<local-home>/confluence.cfg.xmlfile, as this contains some of the details you'll need to enter later.
Your Synchrony home directory should now contain the following files:
- your database driver, for example
synchronyuser proper permissions on the directory and files:
sudo chown -R synchrony:synchrony /opt/atlassian/synchrony
start-synchrony.shin your favourite text editor and enter details for your environment. See Configuring Synchrony for details of each parameter.
We recommend you use an environment variable for your database password. To do this, change to the
synchronyuser, create a file, for example
synchronyenvand make it executable as follows:
sudo su - synchrony touch synchronyenv chmod a+x synchronyenv
Edit the file to add the environment variables for your database username and password as follows:
export SYNCHRONY_DATABASE_USERNAME="your username" export SYNCHRONY_DATABASE_PASSWORD="your password"
start-synchrony.shscript, uncomment the environment variables section, and provide the path to your environment file.
As your Synchrony user, run the
install_synchrony_service.shfile to install the service:
To start, stop or restart the service, use:
service synchrony start service synchrony stop service synchrony restart
To confirm the synchrony service is running use:
service synchrony status
You're now ready to start Confluence and check it can connect to Synchrony. Continue with the installation instructions in Installing Confluence Data Center.
Synchrony logs not updated when running as a service
If you setup Synchrony standalone to run as a Linux service and the application log (
atlassian-synchrony.log) is either missing or not being updated, then check the following procedure.
Edit the Synchrony service definition and add the following configuration under the
WorkingDirectory=<path to Synchrony home>
- Reload the Synchrony service configuration.
- Restart the Synchrony service.
Running Synchrony using start and stop scripts
If you're using Confluence 6.5 or later, we provide scripts to help you start and stop Synchrony. See Configuring Synchrony to find out how to configure these scripts for your environment.
If you're using an earlier Confluence version, you can create your own start and stop scripts - see Run Synchrony-standalone as a service on Linux for Confluence 6.4 and earlier.