<!-- Source: https://docs.squirro.com/en/latest/technical/admin/configuration/config-files/cluster-ini.html -->
# cluster.ini

> **Note**
>
> Squirro removed the Cluster Service (`sqclusterd`) and this `cluster.ini` configuration file in version 3.16.2, along with the `endpoint_discovery` and `db_endpoint_discovery` settings used for endpoint discovery. The information on this page applies only to Squirro versions earlier than 3.16.2. For high-availability and multi-node deployments on Squirro 3.16.2 and later, visit the [Squirro Support website](https://go.squirro.com/support) and submit a technical support request.

The `cluster.ini` config file, located at `/etc/squirro/cluster.ini` configures the workings of the Cluster Service that allows Squirro to run on multiple servers.

## Securing the Cluster Service

The Cluster Service manages MySql and Redis Servers thereby keeping the state between multiple Squirro “Cluster Nodes” in sync. To synchronize the MySql Server instances, Squirro leverages MySql replication along with with the following MySql users:

1. “repl” used to configure and run MySql replication
2. “cluster” for everything else such as restoring data dumps.

Note that it is much easier and recommended to set these passwords before configuring a multi-node cluster as changing the password of the repl user on a running cluster is more disruptive. (Instructions for how to change the password of the MySql repl user on a live cluster are in the works, and will likely involve selectively taking nodes out of the cluster one by one.)

These two users are configured with a default password which you can configure as follows.

1. Generate two passwords. Lets refer to the generated passwords as $PASSWORD_REPL and $PASSWORD_CLUSTER
2. First configure the passwords in `/etc/squirro/cluster.ini` of all the Squirro “Cluster Nodes” like so:

   ```ini
   [mysql]
   db = mysql://cluster:$PASSWORD_CLUSTER@127.0.0.1:3306
   repl_password = $PASSWORD_REPL
   ```
3. On all Squirro “cluster nodes” change the passwords like so:

   ```bash
   sudo su
   mysql -e "SET PASSWORD FOR cluster = PASSWORD(\"$PASSWORD_CLUSTER\")"
   mysql -e "SET PASSWORD FOR repl = PASSWORD(\"$PASSWORD_REPL\")"
   ```
4. Restart the cluster service to pick up the change:

   ```bash
   systemctl restart sqclusterd
   ```
