---
updatedAt: 2026-05-21T09:14:56.000Z
agentTools:
  siteIndex: https://docs.jfrog.com/llms.txt
  projectIndex: https://docs.jfrog.com/installation/llms.txt
---

# RabbitMQ (Split) for Xray ( Xray Version < 3.131.x ) 

Install Xray and RabbitMQ on separate nodes. Connect multiple Xray nodes to a shared RabbitMQ cluster for HA.

This is a guide for installing Xray and RabbitMQ on separate nodes and connecting multiple Xray nodes to a RabbitMQ cluster (sequentially) to achieve high availability.

The setup supports native (rpm, deb), Linux archive, and docker-compose-based installation. This document uses three nodes for the application, RabbitMQ, and one Xray database node for demonstration purposes.

![4.png](https://files.readme.io/e7c4a289a971244379771f9e60304aa9e69ef9d86e743056c48bd4c24946a2f1-uuid-106b121c-988b-c085-7fc7-d49bbc711af6.png)

## Benefits

* **Improved Scalability with Dedicated Resources:**

  Separating RabbitMQ allows for dedicated resource allocation (CPU, memory, and I/O), enabling it to scale independently from the application services.
* **Reduced Resource Contention:**

  When RabbitMQ and application services share the same resources, they compete for CPU, memory, and network bandwidth. Separating them eliminates this contention, ensuring more consistent and reliable performance.
* \*\*Simplified Troubleshooting:\*\*A clear separation between RabbitMQ and the application makes identifying and resolving issues easier, whether they stem from RabbitMQ or the application itself.

## Prerequisites

**JFrog Installer Compatiility**

Ensure you use the installer for the latest Xray version, which supports deploying Xray and RabbitMQ on separate nodes. Version Support for this deployment model is as follows.

| Xray Installer | Version                     |
| -------------- | --------------------------- |
| RPM            | 3.97.8 and 3.107.18 onwards |
| Debian         | 3.111.0 onwards             |
| Linux Archive  | 3.111.0 onwards             |
| Docker Compose | 3.111.0 onwards             |

**Hardware Requirements**

We recommend installing Rabbit MQ on at least three nodes in this deployment model. The table below lists the minimum hardware requirements for the servers. For a detailed description of the requirements, please refer to [Xray System Requirements and Platform Support](xray-system-requirements-and-platform-support).

| Node Type     | CPU | RAM (GB) | Disk Size (GB) |
| :------------ | :-- | :------- | :------------- |
| Xray Node     | 6   | 12       | 250            |
| RabbitMQ Node | 4   | 8        | 250            |

**PostgreSQL**

JFrog Xray requires PostgreSQL as its database. You could use a managed solution or a native installation. If you prefer the latter, we recommend using a separate standalone server for the database. For more details, refer to the following document: [PostgreSQL for Xray](postgresql-for-xray).

**Artifactory**

Ensure Artifactory is operational on a separate, fully configured node.

## RabbitMQ New Installation Guide RPM/DEB

###### Installation Procedure

This process consists of two main stages: setting up the RabbitMQ cluster and configuring the Xray node cluster.

**Stage 1: Setting Up the RabbitMQ Cluster**

This stage focuses on configuring the RabbitMQ cluster. Since Xray relies on RabbitMQ for its operation, completing this step is crucial. Before proceeding, verify that you are logged in as the root user.

1. Download the Xray RPM/DEB-based installer(tar.gz) from the <a href="https://jfrog.com/download-jfrog-platform/" target="_blank">JFrog Xray Downloads page</a>.

2. Extract the tar.gz file:

   ```bash
   tar -xvf jfrog-xray-<version>-rpm/deb.tar.gz
   ```

<Callout icon="📘" theme="info">
  From 3.107 onwards, JFrog Xray installers have organized files into designated subfolders. After extracting the tar.gz file, ensure you navigate to the xray directory.

  ```bash
  cd jfrog-xray-<version>-rpm/deb
  ```
</Callout>

3. Run the install.sh

   ```bash
   ./install.sh -t rabbitmq
   ```
4. Once you run the command, you will be prompted to confirm whether this node will join an existing cluster. Since this is a fresh installation on the first node, please type "N" to indicate no.

   ![1.png](https://files.readme.io/9f77b94e02bbf75044d176e6ad88940b87fc267d2925435a1a5fea382306ad33-uuid-9a9030f6-5a14-8950-677a-8b2c4aec5d22.png)

<Callout icon="📘" theme="info">
  If you wish to use a custom password for RabbitMQ, perform the following steps before proceeding to Step 5:

  1. Update the default_pass value in the rabbitmq.conf file with your desired password.

     ```bash
     vi /opt/jfrog/xray/app/bin/rabbitmq/rabbitmq.conf
     ```

     ![2.png](https://files.readme.io/01b4847fbee887c9afaeae499d2130a2d0f8b3572cfc768825f7ef2e1bf9dfc8-uuid-64478f98-126e-2331-7259-74474754b7bf.png)
  2. Update the system.yaml file with the same password in rabbitmq.conf.

     ```bash
     vi /var/opt/jfrog/xray/etc/system.yaml
     ```

     ![3.png](https://files.readme.io/5ffabbc14d6825c4011c103f397c9a369838aa21eee82e38c76ae458a9a0d0dd-uuid-8c734b5c-33d0-f20b-d26b-9a13fd6601e3.png)
</Callout>

<Callout icon="⚠️" theme="warning">
  Ensure this step is repeated on all RabbitMQ nodes, and verify that the custom password remains consistent across the cluster.
</Callout>

5. Start RabbitMQ service.

   ```bash
   systemctl start xray-rabbitmq.service
   ```

6. RabbitMQ service should start; you can verify it by checking the status.

   ```bash
   systemctl status xray-rabbitmq.service
   ```

   ![4.png](https://files.readme.io/f706ea4665c05fa85d5a7354ae4f7fe440799b385101ea7fed712922213a7187-uuid-45fda58e-f39a-3a23-c205-46d66ba3cf24.png)

7. Access the UI through a browser to verify if the management plugin is enabled.

<Callout icon="📘" theme="info">
  The credentials provided below are the default ones. If you have customized the RabbitMQ password in `/opt/jfrog/xray/app/bin/rabbitmq/rabbitmq.conf`, ensure you use the correct password when accessing the management UI.

  ```yaml
  http://<your-node-ip>:15672

  Username:  guest
  Password:  JFXR_RABBITMQ_COOKIE
  ```
</Callout>

Adding Nodes to Form a RabbitMQ Cluster

Now that RabbitMQ is running on the first node, we need to install RabbitMQ on additional nodes and integrate them into the existing cluster. In this example, we will install RabbitMQ on two more nodes and join them in the cluster.

1. Repeat steps 1 to 3 from the initial node setup to obtain the Xray files on the additional node.
2. Run install.sh file

   ```bash
   ./install.sh -t rabbitmq
   ```
3. Once you execute the command, you will be prompted to confirm whether this node will join an existing RabbitMQ cluster. Since we already have an active RabbitMQ node, type Y and press Enter. Next, you will be asked to provide the name of the active RabbitMQ node. Here, you should input the hostname of the active RabbitMQ node.

   ![5.png](https://files.readme.io/a35ac5ac834dd5251597c2c5d6735e3620fedcc69466d3661db956c12d4db31c-uuid-4c4188bf-97c6-f4b0-f3f7-96a7bc3f0f1d.png)
4. Start RabbitMQ service.

   ```bash
   systemctl start xray-rabbitmq.service
   ```
5. RabbitMQ service should start; you can verify it by checking the status.

   ```bash
   systemctl status xray-rabbitmq.service
   ```

Repeat steps 1 through 5 to set up the additional RabbitMQ node and integrate it into the existing cluster.

Verify the RabbitMQ cluster status.

After installing and starting RabbitMQ on all required nodes, confirm that the cluster functions correctly and all nodes are properly joined.

<Callout icon="📘" theme="info">
  Since the value of $HOME differs for each user, placing a copy of the cookie file for every user who will use the CLI tools, including both non-privileged users and root, is essential.The xray user, automatically created by the installer script, can execute the cluster_status command. To switch to the xray user, run:

  ```bash
  su xray
  ```
</Callout>

Navigate to the RabbitMQ sbin directory and execute the cluster\_status commands.

```bash
$ cd /opt/jfrog/xray/app/third-party/rabbitmq/sbin
$ ./rabbitmqctl cluster_status
```

![6.png](https://files.readme.io/b7913c458b0dbc219b55f8d79fb475d186d3d2812a8b04e1277b6bfaf3681ea5-uuid-e0de6ce5-d740-25a0-d5b5-ae19bedfa7b6.png)

You can verify the cluster from the Management UI URL `http://<RabbitMQ-Node-IP/Hostname>`:15672; see the screenshot below.

![7.png](https://files.readme.io/7999edb7b8f8318f8cdcd73ceb338f0b88a85b54f785cb172e3236bea5e72843-uuid-cd81df89-dd5c-aad1-b6ae-a7900b6feee0.png)

**Stage 2: Setting Up the Xray Node Cluster**

Once the RabbitMQ cluster is successfully configured, set up the Xray node cluster, which will integrate with the previously configured RabbitMQ cluster.

1. Download the Xray RPM/DEB-based installer(tar.gz) from the <a href="https://jfrog.com/download-jfrog-platform/" target="_blank">JFrog Xray Downloads page</a>.

2. Extract the tar.gz file:

   ```bash
   tar -xvf jfrog-xray-<version>-rpm/deb.tar.gz
   ```

<Callout icon="📘" theme="info">
  From 3.107 onwards, JFrog Xray installers have organized files into designated subfolders. After extracting the tar.gz file, ensure you navigate to the xray directory.

  ```bash
  cd jfrog-xray-<version>-deb
  ```
</Callout>

3. Run the install.sh

   ```bash
   ./install.sh -t xray
   ```

4. Upon running the command, you will be prompted with a series of interactive installation questions; refer to the screenshot attached for details about the mentioned steps.

   1. Confirm the installation directory by pressing ENTER
   2. Provide the URL of your JFrog Platform( Artifactory) instance in the format:<<http://artifactory_node_ip:port>>
   3. Obtain the Join Key by navigating to **Administration** > Security > **General** > **Connection Details** in Artifactory.

      1. Enter the platform password to access the details.
      2. Copy the Join Key and use it when prompted.
   4. Specify the machine's IP address:  You can manually input the current node's IP address or press ENTER to use the default, as the system automatically detects the current node's IP address. For IPv6, ensure the address is enclosed in square brackets: \[`<ipv6_address>`].
   5. Are you adding an additional node to the existing product cluster? For the **first node of Xray**, select N (No), as this will set up a new cluster. For subsequent nodes, select Y (Yes). The process for adding additional nodes is detailed in later steps.
   6. Do you want to install Postgresql? Select N (No) and press ENTER, as we use a PostgreSQL instance installed on a separate node. Provide the following database connection details:

      1. **Connection URL:** postgres\://`<IP_ADDRESS>`:`<PORT>`/`<database name>`?sslmode=disable
      2. **Database Username**: `<YOUR_DATABASE_USERNAME>`
      3. **Database Password**: `<YOUR_DATABASE_PASSWORD>`![8.jpg](https://files.readme.io/27f29694fff4ce11e9e6cfcf06cac6f119912d7d4e74ee04c9af6a56034cf107-uuid-0b568f5f-8dc7-52fc-d943-414453d4356e.jpg)

5. Before starting the Xray service, update the system.yaml file with the RabbitMQ cluster URLs and credentials for all nodes in the cluster. Ensure that all RabbitMQ node URLs are correctly listed and include the appropriate username and password for authentication. This configuration ensures Xray can communicate effectively with the RabbitMQ cluster and save the changes.

   ```bash
   vi /var/opt/jfrog/xray/etc/system.yaml
   ```

<Callout icon="📘" theme="info">
  If using a custom RabbitMQ password, ensure the same password is configured in Xray’s system.yaml file under the RabbitMQ section to maintain consistency.
</Callout>

![9.png](https://files.readme.io/3f325a87f9456d5da669dabc626c910b84303ed5e8221779e988c12d6e2843ee-uuid-34829fba-31e7-8fd7-776f-e5a05f15c4cd.png)

<br />

6. Start Xray service:

```bash
systemctl start xray.service
```

7. Once the Xray service is started successfully, you can access it via the user interface or APIs.

Adding Nodes to Form an Xray Cluster:

1. Install Xray on a new node by repeating the initial Xray node setup steps. During the installation, you will be prompted to ask, "Are you adding an additional node to an existing product cluster? \[y/N]?" At this point, select Y to confirm that this is an additional node for the X-ray cluster.
2. In the next step, you will be prompted to provide the master\_key. You can retrieve this key from the first node by executing the following command:

   ```bash
   cat /var/opt/jfrog/xray/etc/security/master.key
   ```

The remaining installation steps for the new node should be carried out like for the first node.

![10.png](https://files.readme.io/350a39224832f601d26d8c279ff4a0285aa94d7a8ae36f13d7f7de3984673c06-uuid-7fa48a17-ab4e-bde0-15e5-15c28d352143.png)

After installing, modify the system.yaml file to update the RabbitMQ URLs. Change the order of the URLs to optimize load balancing and prevent all Xray nodes from connecting to the same RabbitMQ node. For example, if the RabbitMQ node URL order in the first Xray node is 1,2,3, then in the second node, it should be 2,3,1, and in the third node, it could be 3,1,2. This ensures that each Xray node connects to different RabbitMQ nodes, improving fault tolerance and distributing the load efficiently.

```bash
vi /var/opt/jfrog/xray/etc/system.yaml
```

![11.png](https://files.readme.io/cf02ac471ab3fda11a7a679d7902bfbdc2904eded6e75493661a8786e5a319a0-uuid-791b49d5-37e8-ad7e-2d79-79d58af10cc9.png)

###### Uninstallation

Read about [Uninstalling JFrog Xray](uninstalling-jfrog-xray).

## RabbitMQ (Split) Fresh Installation Guide Linux Archive

###### Installation Procedure

This process consists of two main stages: setting up the RabbitMQ cluster and configuring the Xray node cluster.

**Stage 1: Setting Up the RabbitMQ Cluster**

This stage focuses on configuring the RabbitMQ cluster. Since Xray relies on RabbitMQ for its operation, completing this step is crucial. Before proceeding, verify that you are logged in as the root user.

1. Download the Xray linux archive based installer(tar.gz) from the <a href="https://jfrog.com/download-jfrog-platform/" target="_blank">JFrog Xray Downloads page</a>.

2. Extract the tar.gz file:

   ```bash
   tar -xvf jfrog-xray-<version>-linux.tar.gz
   ```

   **OS user permissions for Linux archive**

   When running Xray, the installation script creates a user called xray by default, which must have run and execute permissions on the installation directory.

   We recommend that you copy the Xray download file into a directory that gives run and execute permissions to all users such as /opt.

   ```bash
   mkdir -p /opt/jfrog
   cp -r jfrog-xray-<version>-linux /opt/jfrog/
   cd /opt/jfrog
   mv jfrog-xray-<version>-linux xray
   cd xray/app/bin
   ```

<Callout icon="📘" theme="info">
  From 3.107 onwards, JFrog Xray installers have organized files into designated subfolders. After extracting the tar.gz file, ensure you navigate to the correct directory
</Callout>

3. Run the install.sh

   Check prerequisites for Xray in Linux Archive before running install script.

   ```bash
   ./install.sh -t rabbitmq
   ```
4. Once you run the command, you will be prompted to confirm whether this node will join an existing cluster. Since this is a fresh installation on the first node, please type "N" to indicate no.

   ![1.png](https://files.readme.io/2c19b10d572f43d63f8a1321f41516864b54b70855ce140e0041d2360b057eef-uuid-bc902f3e-fb4d-8ba1-18c8-1e8866ab88d6.png)
5. Follow the on-screen instructions after the installation is completed regarding the following points

   1. Xray directory should be owned by the xray usereg : `chown -R xray:xray /opt/jfrog/xray`
   2. Switch to xray user, before you start the serviceeg: `su xray`

<Callout icon="📘" theme="info">
  If you wish to use a custom password for RabbitMQ, perform the following steps before proceeding to Step 6:

  1. Update the default_pass value in the rabbitmq.conf file with your desired password. Refer to this article for guidance.

     ```bash
     vi xray/app/bin/rabbitmq/rabbitmq.conf
     ```

     ![2.png](https://files.readme.io/74d1d4a9578f3842c5621d44bc65fe28e045ee0d7b2eaf03901694c976303c75-uuid-05511929-e785-daca-3888-3671dddf6cd7.png)
  2. Update the system.yaml file with the same password in rabbitmq.conf.

     ```bash
     vi xray/etc/system.yaml
     ```
</Callout>

<Callout icon="🚧">
  Ensure this step is repeated on all RabbitMQ nodes, and verify that the custom password remains consistent across the cluster.
</Callout>

6. Start rabbitmq service:

   ```text
   xray/app/bin/xray.sh start|stop
   ```

7. RabbitMQ service should start; you can verify it by checking the status.

   ```text
   xray/app/bin/xray.sh status
   ```

8. (Optional) You can also install it as a service.

   Xray is packaged as an archive file and you can use the install script to install it as a service running under a custom user. Currently supported on Linux systems.

<Callout icon="📘" theme="info">
  **OS User Permissions**

  When running Xray as a service, the installation script creates a user called xray (by default) which must have run and execute permissions on the installation directory.

  We recommend extracting the Xray download file into a directory with run and execute permissions for all users, such as /opt.
</Callout>

To install Xray as a service, execute the following command as root.

```bash
xray/app/bin/installService.sh
 
-u | --user                                       : [optional] (default: xray) user which will be used to run the product, it will be created if its unavailable
-g | --group                                      : [optional] (default: xray) group which will be used to run the product, it will be created if its unavailable
```

<Callout icon="📘" theme="info">
  If you wish to change the user and group, it can be passed through xray/var/etc/system.yaml as shared.user and shared.group. This takes precedence over values passed through command line on install.
</Callout>

The user and group is stored in xray/var/etc/system.yaml at the end of installation. To manage the service, use systemd or init.d commands depending on your system.Using systemd

```bash
 systemctl <start|stop|status> xray.service
```

Using init.d

```bash
service xray <start|stop|status>
```

9. Access the UI through a browser to verify if the management plugin is enabled.

<Callout icon="📘" theme="info">
  The credentials provided below are the default ones. If you have customized the RabbitMQ password in’/opt/jfrog/xray/app/bin/rabbitmq/rabbitmq.conf’, ensure you use the correct password when accessing the management UI.

  ```yaml
  http://<your-node-ip>:15672

  Username:  guest
  Password:  JFXR_RABBITMQ_COOKIE
  ```
</Callout>

Adding Nodes to Form a RabbitMQ Cluster

Now that RabbitMQ is running on the first node, we need to install RabbitMQ on additional nodes and integrate them into the existing cluster. In this example, we will install RabbitMQ on two more nodes and join them in the cluster.

1. Repeat steps for the fresh install node setup (step 1 and step 2) to obtain the Xray files on the additional node
2. Run install.sh fileCheck prerequisites for Xray in Linux Archive before running install script.

   ```bash
   ./install.sh -t rabbitmq
   ```
3. Once you execute the command, you will be prompted to confirm whether this node will join an existing RabbitMQ cluster. Since we already have an active RabbitMQ node, type Y and press Enter. Next, you will be asked to provide the name of the active RabbitMQ node. Here, you should input the hostname of the active RabbitMQ node.

   ![4.png](https://files.readme.io/cd1fe13bb454820ec8eaf1cacd49874041f82bc26601fea3fb357d50cf979258-uuid-9e72acb9-7628-5129-5deb-a5f6195fc51f.png)
4. Follow the on-screen instructions after the installation is completed regarding the following points

   1. Xray directory should be owned by the xray usereg : `chown -R xray:xray /opt/jfrog/xray`
   2. Start rabbitmq as Xray usereg: `su xray`
5. If you are using a custom password, please follow the same steps done in first node
6. Start RabbitMQ service

   ```bash
   xray/app/bin/xray.sh start|stop 

   or via service 

   systemctl <start|stop|status> xray.service
   ```
7. Verify the cluster status from the management UI. Access the UI through a browser

   ![5.png](https://files.readme.io/98d5bfe752657714cb36c0c7fe7bc3e5dac281a7479b269304c0b6845b20e9f9-uuid-5baf33a1-f0ac-9c4a-1239-153ee64ff441.png)

<Callout icon="📘" theme="info">
  The credentials provided below are the default ones. If you have customized the RabbitMQ password in’xray/app/bin/rabbitmq/rabbitmq.conf’, ensure you use the correct password when accessing the management UI.

  ```yaml
  http://<your-node-ip>:15672

  Username:  guest
  Password:  JFXR_RABBITMQ_COOKIE
  ```
</Callout>

**Stage 2: Setting Up the Xray Node Cluster**

Once the RabbitMQ cluster is successfully configured, set up the Xray node cluster, which will integrate with the previously configured RabbitMQ cluster.

1. Download the Xray linux archive based installer(tar.gz) from the <a href="https://jfrog.com/download-jfrog-platform/" target="_blank">JFrog Xray Downloads page</a>.

2. Extract the tar.gz file:

   ```bash
   tar -xvf jfrog-xray-<version>-linux.tar.gz
   ```

<Callout icon="📘" theme="info">
  **OS user permissions for Linux archive**

  When running Xray, the installation script creates a user called xray by default, which must have run and execute permissions on the installation directory.

  We recommend that you copy the Xray download file into a directory that gives run and execute permissions to all users such as /opt.

  ```bash
  mkdir -p /opt/jfrog
  cp -r jfrog-xray-<version>-linux /opt/jfrog/
  cd /opt/jfrog
  mv jfrog-xray-<version>-linux xray
  cd xray/app/bin
  ```

  From 3.107 onwards, JFrog Xray installers have organized files into designated subfolders. After extracting the tar.gz file, ensure you navigate to the correct directory
</Callout>

3. Run the install.sh

   Check prerequisites for Xray in Linux Archive before running install script.

   ```bash
   ./install.sh -t xray
   ```

4. Upon running the command, you will be prompted with a series of interactive installation questions.

   1. Provide the URL of your JFrog Platform( Artifactory) instance in the format <a href="http://artifactory\_node\_ip:port" target="_blank"><http://artifactory\\_node\\_ip:port></a>
   2. Obtain the Join Key by navigating to **Administration** > **Security** > **General** > **C\*\*\*\*onnection Details** in Artifactory.

      1. Enter the platform password to access the details.
      2. Copy the Join Key and use it when prompted.
   3. Specify the machine's IP address:  You can manually input the current node's IP address or press ENTER to use the default, as the system automatically detects the current node's IP address. For IPv6, ensure the address is enclosed in square brackets: \[`<ipv6_address>`].
   4. Are you adding an additional node to the existing product cluster? For the first node of Xray, select N (No), as this will set up a new cluster. For subsequent nodes, select Y (Yes). The process for adding additional nodes is detailed in later steps.
   5. Provide the database connection details. Postgresql should be installed separately on a different node. Provide the following database connection details:

      1. **Connection URL**: postgres\://`<IP_ADDRESS>`:`<PORT>`/`<database name>`?sslmode=disable
      2. **Database Username**: `<YOUR_DATABASE_USERNAME>`
      3. **Database Password**: `<YOUR_DATABASE_PASSWORD>`

         ![6.png](https://files.readme.io/d30a406e424189ea0b7addf51b124b9d8db7a531f4f09854aedb2b338eb3f051-uuid-32cd066b-0e7d-e033-76dc-51da9f792805.png)

5. Follow the on-screen instructions after the installation is completed regarding the following points

   1. Xray directory should be owned by the xray usereg : `chown -R xray:xray /opt/jfrog/xray`
   2. Switch to xray user, before you start the serviceeg: \`su xray

6. Before starting the Xray service, update the system.yaml file with the RabbitMQ cluster URLs and credentials for all nodes in the cluster. Ensure that all RabbitMQ node URLs are correctly listed and include the appropriate username and password for authentication. This configuration ensures Xray can communicate effectively with the RabbitMQ cluster and save the changes.

   ```bash
   vi xray/etc/system.yaml
   ```

<Callout icon="📘" theme="info">
  If using a custom RabbitMQ password, ensure the same password is configured in Xray’s system.yaml file under the RabbitMQ section to maintain consistency.
</Callout>

![7.png](https://files.readme.io/515f9784741f693468b22612f4e8d3cb7aba9cc28f0f46c7b50dd6be273b4b54-uuid-c8eb9c9c-8d48-5ef9-f034-6492c0e4bf32.png)

<br />

7. Start Xray service:

```bash
xray/app/bin/xray.sh start|stop 

or via service 

systemctl <start|stop|status> xray.service
```

8. Once the Xray service is started successfully, you can access it via the user interface or APIs.

Adding Nodes to Form an Xray Cluster:

1. Install Xray on a new node by repeating the initial Xray node setup steps.
2. During the installation, you will be prompted to ask, "Are you adding an additional node to an existing product cluster? \[y/N]?" At this point, select Y to confirm that this is an additional node for the X-ray cluster.
3. In the next step, you will be prompted to provide the master\_key. You can retrieve this key from the first node by executing the following command:

   ```bash
   cat /var/opt/jfrog/xray/etc/security/master.key
   ```

   The remaining installation steps for the new node should be carried out like for the first node.

   ![8.png](https://files.readme.io/9b8f28f10a9805c7d3079c8390a887a0231c2acd3f94b5e6f4982f901899821c-uuid-5968f2b3-6cd3-df4f-dd63-6a5937cbb6ee.png)

   After installing, modify the system.yml file to update the RabbitMQ URLs. Change the order of the URLs to optimize load balancing and prevent all Xray nodes from connecting to the same RabbitMQ node. For example, if the RabbitMQ node URL order in the first Xray node is 1,2,3, then in the second node, it should be 2,3,1, and in the third node, it could be 3,1,2. This ensures that each Xray node connects to different RabbitMQ nodes, improving fault tolerance and distributing the load efficiently.

   ```bash
   vi xray/etc/system.yaml
   ```

   ![9.png](https://files.readme.io/91ec5d5086e44e2dcb0de961036d26cde7df25318417e8c41a1db5704a53a2f7-uuid-00588830-9c41-d8f6-81b0-601b7225bb05.png)

   ###### Uninstallation

   Read about [Uninstalling JFrog Xray](uninstalling-jfrog-xray).

## Related Topics

* [Xray Installation](installing-xray)
* [Xray HA Installation](xray-ha-installation)
* [PostgreSQL for Xray](postgresql-for-xray)
* [Xray System Requirements and Platform Support](xray-system-requirements-and-platform-support)
* [Quorum Queue Enablement for Xray and Platform Helm Charts](quorum-queue-enablement-for-xray-and-platform-helm-charts)
* [Upgrading Xray](upgrading-xray)

## RabbitMQ (Split) Fresh Installation Guide Docker Compose

###### Installation Procedure

This process consists of two main stages: setting up the RabbitMQ cluster and configuring the Xray node cluster.

**Stage 1: Setting Up the RabbitMQ Cluster**

This stage focuses on configuring the RabbitMQ cluster. Since Xray relies on RabbitMQ for its operation, completing this step is crucial. Before proceeding, verify that you are logged in as the root user.

1. Download the Xray docker compose-based installer(tar.gz) from the <a href="https://jfrog.com/download-jfrog-platform/" target="_blank">JFrog Xray Downloads page</a>.

2. Extract the tar.gz file:

   ```bash
   tar -xvf jfrog-xray-<version>-compose.tar.gz
   ```

<Callout icon="📘" theme="info">
  From 3.107 onwards, JFrog Xray installers have organized files into designated subfolders. After extracting the tar.gz file, ensure you navigate to the xray directory.

  ```bash
  cd jfrog-xray-<version>-compose
  ```
</Callout>

3. Run the config.sh

   ```bash
   ./config.sh -t rabbitmq
   ```
4. Once you run the command, you will be prompted to confirm whether this node will join an existing cluster. Since this is a fresh installation on the first node, please type "N" to indicate no.

   ![1.png](https://files.readme.io/c816a7f15f5130c4f0a047bf9d68eb0d55d91239824ed70799376bf82d2ccda6-uuid-d49e40f4-5c5a-bb18-9cb4-8f53b7f3e3d3.png)

<Callout icon="📘" theme="info">
  If you wish to use a custom password for RabbitMQ, perform the following steps before proceeding to Step 5:

  1. Update the default_pass value in the rabbitmq.conf file with your desired password. This file is mounted inside the rabbitmq container. If you have changed the ROOT_DATA_DIR in the docker-compose env file, edit the rabbitmq.conf file in the right location

     ```bash
     vi /root/.jfrog/xray/app/third-party/rabbitmq/rabbitmq.conf
     ```

     ![2.png](https://files.readme.io/2d18d4e0c29425aafb12164deb410a4aff5b7021a5e061c3a0417b61317f14b8-uuid-7c1f10ad-7858-b071-b7cd-8420f64096bd.png)
</Callout>

<Callout icon="⚠️" theme="warning">
  Ensure this step is repeated on all RabbitMQ nodes, and verify that the custom password remains consistent across the cluster.
</Callout>

5. Start RabbitMQ service.

   ```bash
   docker-compose -p xray-rabbitmq -f docker-compose-rabbitmq.yaml up -d
   ```
6. RabbitMQ service should start; you can verify it by checking the logs

   ```bash
   docker ps
   docker logs -f xray_rabbitmq
   ```
7. Verify the cluster status from the management UI URL `http://<RabbitMQ-Node-IP/Hostname>`:15672. Access the UI through a browser

   ![3.png](https://files.readme.io/9e21036dd1a62c3bd7f48e269b82cc1f13addaac182a2af1f9af79b26c606fe4-uuid-0680737e-2a60-61e9-f985-59bc46f76d4f.png)

<Callout icon="📘" theme="info">
  The credentials provided below are the default ones. If you have customized the RabbitMQ password in’/root/.jfrog/xray/app/third-party/rabbitmq/rabbitmq.conf’, ensure you use the correct password when accessing the management UI.

  ```yaml
  http://<your-node-ip>:15672

  Username:  guest
  Password:  JFXR_RABBITMQ_COOKIE
  ```
</Callout>

**Adding Nodes to Form a RabbitMQ Cluster**

Now that RabbitMQ is running on the first node, we need to install RabbitMQ on additional nodes and integrate them into the existing cluster. In this example, we will install RabbitMQ on two more nodes and join them in the cluster.

1. Repeat steps 1 to 2 from the initial node setup to obtain the Xray files on the additional node.

2. Run install.sh file

   ```bash
   ./config.sh -t rabbitmq
   ```

3. Once you execute the command, you will be prompted to confirm whether this node will join an existing RabbitMQ cluster. Since we already have an active RabbitMQ node, type Y and press Enter. Next, you will be asked to provide the name of the active RabbitMQ node. Here, you should input the hostname of the active RabbitMQ node and also the IP of the active node name in the next step.

   ![4.png](https://files.readme.io/9064d7079c60c20ef0d77cff1eb6aabe1ec007ead18e995155b67528bcd99516-uuid-331cac2a-89d7-d486-b252-8b9a25be91d4.png)

4. If you use a custom password, please follow the instructions mentioned in the initial node setup.

5. Start RabbitMQ service.

   ```bash
   docker-compose -p xray-rabbitmq -f docker-compose-rabbitmq.yaml up -d
   ```

6. RabbitMQ service should start. You can verify it by checking the logs.

   ```bash
   docker ps
   docker logs -f xray_rabbitmq
   ```

7. Verify the cluster status from the management UI to confirm the nodes are connected to each other

<Callout icon="📘" theme="info">
  The credentials provided below are the default ones. If you have customized the RabbitMQ password in’/root/.jfrog/xray/app/third-party/rabbitmq/rabbitmq.conf’, ensure you use the correct password when accessing the management UI.

  ```yaml
  http://<your-node-ip>:15672

  Username:  guest
  Password:  JFXR_RABBITMQ_COOKIE
  ```
</Callout>

Repeat steps 1 through 7 to set up the additional RabbitMQ node and integrate it into the existing cluster.

**Stage 2: Setting Up the Xray Node Cluster**

Once the RabbitMQ cluster is successfully configured, set up the Xray node cluster, which will integrate with the previously configured RabbitMQ cluster.

1. Download the Xray docker compose-based installer(tar.gz) from the <a href="https://jfrog.com/download-jfrog-platform/" target="_blank">JFrog Xray Downloads page</a>.

2. Extract the tar.gz file:

   ```bash
   tar -xvf jfrog-xray-<version>-compose.tar.gz
   ```

<Callout icon="📘" theme="info">
  From 3.107 onwards, JFrog Xray installers have organized files into designated subfolders. After extracting the tar.gz file, ensure you navigate to the xray directory.

  ```bash
  cd jfrog-xray-<version>-compose
  ```
</Callout>

3. Run the config.sh

   ```bash
   ./config.sh -t xray
   ```

4. Upon running the command, you will be prompted with interactive installation questions.

   1. Before performing this upgrade, have you disconnected Artifactory Xray pairings, except one? - You can choose y. This step was added for migrating from older 2.x to 3.x versions. If you are already on xray 3.x, type y.
   2. Installation Directory (Default: /root/.jfrog/xray) - Choose defaults or change if needed.
   3. Provide the URL of your JFrog Platform( Artifactory) instance in the format:<a href="http://artifactory\_node\_ip:port" target="_blank"><http://artifactory\\_node\\_ip:port></a>
   4. Obtain the Join Key by navigating to **Administration** > **Security** > **General** > **Connection Details** in Artifactory.

      1. Enter the platform password to access the details.
      2. Copy the Join Key and use it when prompted.
   5. Specify the machine's IP address:  You can manually input the current node's IP address or press ENTER to use the default, as the system automatically detects the current node's IP address. For IPv6, ensure the address is enclosed in square brackets: \[`<ipv6_address>`].
   6. Are you adding an additional node to the existing product cluster? For the first node of Xray, select N (No), as this will set up a new cluster. For subsequent nodes, select Y (Yes). The process for adding additional nodes is detailed in later steps.
   7. Provide the database connection details. Postgresql should be installed separately on a different node. Provide the following database connection details:

      1. **Connection URL**: postgres\://`<IP_ADDRESS>`:`<PORT>`/`<database name>`?sslmode=disable
      2. **Database Username**: `<YOUR_DATABASE_USERNAME>`
      3. **Database Password**: `<YOUR_DATABASE_PASSWORD>`

         ![5.png](https://files.readme.io/0c4f3b8bf72c73e8afd442833e2e1d4e19a47dd1494a536d28c5ce220dadb281-uuid-dd1b01bf-8997-a729-5eb7-177c5b16cfa6.png)

5. Before starting the Xray service, update the system.yaml file with the RabbitMQ cluster URLs and credentials for all nodes in the cluster. Ensure that all RabbitMQ node URLs are correctly listed and include the appropriate username and password for authentication. This configuration ensures Xray can communicate effectively with the RabbitMQ cluster and save the changes.

   ```bash
   vi /root/.jfrog/xray/var/etc/system.yaml
   ```

<Callout icon="📘" theme="info">
  If using a custom RabbitMQ password, ensure the same password is configured in Xray’s system.yaml file under the RabbitMQ section to maintain consistency.

  ![6.png](https://files.readme.io/5330b6068441052913c1e80dae08f8da6bdbcb5d49cec9de4a7cfe867fe416c3-uuid-5e882b24-ec6e-e922-65bd-f18c03fb1169.png)
</Callout>

6. Start Xray service.

   ```bash
   docker-compose -p xray up -d
   ```
7. Xray services should start; you can verify it by checking the logs.

   ```bash
   docker ps
   docker logs -f xray_router ## or any other xray services.
   ```

**Adding Nodes to Form an Xray Cluster:**

1. Install Xray on a new node by repeating the initial Xray node setup steps. During the installation, you will be prompted to ask, "Are you adding an additional node to an existing product cluster? \[y/N]?" At this point, select Y to confirm that this is an additional node for the X-ray cluster.
2. In the next step, you will be prompted to provide the master\_key. You can retrieve this key from the first node by executing the following command:

   ```bash
   cat /var/opt/jfrog/xray/etc/security/master.key
   ```

The remaining installation steps for the new node should be carried out like for the first node.

![7.png](https://files.readme.io/53291d5322f1cc33c9c47b9f6d0ba0ba4df5c3238ca7b53642512c0d25f64ee1-uuid-585e41c2-6d3b-2a09-223e-1174038046c7.png)

After installing, modify the system.yml file to update the RabbitMQ URLs. Change the order of the URLs to optimize load balancing and prevent all Xray nodes from connecting to the same RabbitMQ node. For example, if the RabbitMQ node URL order in the first Xray node is 1,2,3, then in the second node, it should be 2,3,1, and in the third node, it could be 3,1,2. This ensures that each Xray node connects to different RabbitMQ nodes, improving fault tolerance and distributing the load efficiently.

```bash
vi xray/etc/system.yaml
```

![8.png](https://files.readme.io/2d2a7e77dc8ce9f09af62fab6a1553c609a5759ecc82733b8b36635e5f6cdbb4-uuid-3ad0d581-1401-7bdb-1d2d-c378dccc8573.png)

###### Uninstallation

Read about [Uninstalling JFrog Xray](uninstalling-jfrog-xray).

## RabbitMQ (Split) Upgrade Guide

###### Challenges of Default Xray Installer Deployment in Large Clusters

Xray installers, by default, install the Application services and Rabbit MQ on the same node, where the application connects to the local RMQ instance for message publishing and consumption. We use classic queues and mirroring to all nodes in the cluster. This deployment works well with smaller clusters.  However, this could cause issues for large clusters due to synchronised writes, synchronisation latency, resource overhead, etc. Also, with high replication, the chances of network partitions increase.  In a partitioned scenario, the cluster might split, leading to inconsistent states across different nodes, further complicating message delivery and queue management.

The below diagram will consider the example setup, a configuration that contains 3 nodes of Xray and MQ on every node, with an external Postgres DB. We will explore how to tune this setup for better stability and resource utilisation.

![5.png](https://files.readme.io/dfae7f83f4813c4239ab0f5f3b0554552165a3b3ca855ccc514efaaaa2e7bb09-uuid-e5b42697-5680-4f34-3a11-940db0353d10.png)

![6.png](https://files.readme.io/d49ecf89575eca395feab3a16193f2f7310b515d5932a3b4acc56ae2bee2714c-uuid-b5953ccc-1073-9140-40c9-bac4f4ebef2c.png)

The recommendation is to re-design it as follows: move to a 3-node cluster for X-ray and a three-node cluster for Rabbit MQ. This re-design offers several benefits, including improved stability, better resource utilisation, and enhanced scalability.

<Callout icon="❗️">
  This model of deployment, with separate application and rabbit-mq cluster
</Callout>

###### Installation Procedure

Upgrade can be done in two ways.  Transform the existing cluster by dedicating some nodes to RabbitMQ and converting the remaining nodes into an Xray only setup.

1. Upgrade an existing node to a RabbitMQ only node

   1. Stop Xray and RabbitMQ.
   2. Run the installer to deploy only RabbitMQ.
   3. Verify that the RabbitMQ is online and is part of the cluster.
2. Upgrade an existing node to an Xray only node

   1. Stop Xray and RabbitMQ.
   2. Disconnect the RabbitMQ from the cluster.
   3. Update the system.yaml (Provide the RabbitMQ urls )
   4. Run the installer to deploy only Xray Instances.

<Callout icon="📘" theme="info">
  See Challenges of Default Xray Installer Deployment in Large Clusters for more details
</Callout>

###### RPM/ DEB Upgrade

**1) Upgrade an existing node to a RabbitMQ only node (RPM/DEB)**

This scenario describes updating one of your nodes to a RabbitMQ-only node

Follow the below steps to upgrade.

1. Download the newer Xray RPM/DEB based installer(tar.gz) version from the <a href="https://jfrog.com/download-jfrog-platform/" target="_blank">JFrog Xray Downloads page</a>.

2. Extract the tar.gz file:

   ```bash
   tar -xvf jfrog-xray-<version>-rpm/deb.tar.gz
   ```

<Callout icon="📘" theme="info">
  From 3.107 onwards, JFrog Xray installers have organized files into designated subfolders. After extracting the tar.gz file, ensure you navigate to the xray directory.

  ```bash
  cd jfrog-xray-<version>-rpm/deb
  ```
</Callout>

3. Stop Xray and RabbitMQ.

   Add autoStop: true flag and erlang cookie under RabbitMQ block in Xray system.yaml . The default cookie can be found under `xray/app/third-party/rabbitmq/.erlang.cookie`

   ```yaml
   shared:
       rabbitMq:
           autoStop: true
           erlangCookie:
               value:
   ```

   Then, run the below command.

   ```bash
   systemctl stop xray.service
   ```

   Before proceeding, ensure the Xray services are shut down gracefully (it may take a while when the system is running)
4. Run the installer script.

   ```bash
   ./install.sh -t rabbitmq
   ```
5. Start RabbitMQ service.

   ```bash
   systemctl start xray-rabbitmq.service
   ```
6. RabbitMQ service should start; you can verify it by checking the status.

   ```bash
   systemctl status xray-rabbitmq.service
   ```

**2) Upgrade an existing node to an Xray only node (RPM/DEB)**

This is a scenario where you must update one node to an Xray only node.

Follow the below steps to upgrade.

1. Download the newer Xray RPM/DEB-based installer(tar.gz) version from the <a href="https://jfrog.com/download-jfrog-platform/" target="_blank">JFrog Xray Downloads page</a>.

2. Extract the tar.gz file:

   ```bash
   tar -xvf jfrog-xray-<version>-rpm/deb.tar.gz
   ```

<Callout icon="📘" theme="info">
  From 3.107 onwards, JFrog Xray installers have organized files into designated subfolders. After extracting the tar.gz file, ensure you navigate to the xray directory.

  ```bash
  cd jfrog-xray-<version>-rpm/deb
  ```
</Callout>

3. Perform this step if you are upgrading from a node that has Xray + RabbitMQ Disconnect RabbitMQ from Cluster.

   1. Switch to Xray user (default: xray) and navigate to rabbitmq/sbin directory.

      ```bash
      su xray
      cd /opt/jfrog/xray/app/third-party/rabbitmq/sbin/
      ```
   2. We will stop and remove the RabbitMQ node from the cluster in this step. Replace the `<current-node>` with the node name you are working on. You can use the cluster\_status command to get the correct node name. And the `<active-node>` can be any other node in the cluster still online.

      ```bash
      ./rabbitmqctl cluster_status
      ./rabbitmqctl stop_app -n <current-node>
      ./rabbitmqctl forget_cluster_node <current-node> --node  <active-node>
      ```
   3. Verify the node is not part of the cluster and no RabbitMQ services are running.

      ```bash
      ./rabbitmqctl cluster_status --node <active-node>
      ps -aux | grep erl
      ps -aux | grep epmd
      ```

4. Stop Xray service

   ```bash
   systemctl stop xray.service
   ```

   Before proceeding, ensure the Xray services are shut down gracefully (it may take a while when the system is running)

5. Run the installer script.

   ```bash
   ./install.sh -t xray
   ```

6. Before starting the Xray service, update the system.yaml file with the RabbitMQ cluster URLs and credentials for all nodes in the cluster. Ensure that all RabbitMQ node URLs are correctly listed and include the appropriate username and password for authentication. This configuration ensures Xray can communicate effectively with the RabbitMQ cluster and save the changes.

   Change the order of the URLs to optimize load balancing and prevent all Xray nodes from connecting to the same RabbitMQ node. For example, if the RabbitMQ node URL order in the first Xray node is 1,2,3, then in the second node, it should be 2,3,1, and in the third node, it could be 3,1,2. This ensures that each Xray node connects to different RabbitMQ nodes, improving fault tolerance and distributing the load efficiently.

   ```bash
   vi /var/opt/jfrog/xray/etc/system.yaml
   ```

<Callout icon="📘" theme="info">
  If using a custom RabbitMQ password, ensure the same password is configured in Xray’s system.yaml file under the RabbitMQ section to maintain consistency.
</Callout>

![1.png](https://files.readme.io/b031e64315a314de1e342281e308d327294d05cf02cec5e605c98d797fa831bd-uuid-158b5ffd-708d-8b08-e4aa-61e68de5d94a.png)

<br />

7. Start Xray service:

```bash
systemctl start xray.service
```

###### Linux Archive Upgrade

**1) Upgrade an existing node to a RabbitMQ only node (Linux Archive)**

This scenario describes updating one of your nodes to a RabbitMQ-only node

Follow the below steps to upgrade.

1. Stop Xray and RabbitMQ.Add autoStop: true flag and erlang cookie under RabbitMQ block in Xray system.yaml . The default cookie can be found under `xray/app/third-party/rabbitmq/.erlang.cookie`

   ```yaml
   shared:
       rabbitMq:
           autoStop: true
           erlangCookie:
               value:
   ```

   Then, run the below command.

   ```bash
   cd $JFROG_HOME/xray/app/bin
   ./xray.sh stop ## as xray user
   ```

   Or via service

   ```bash
   systemctl stop xray.service
   ```

   Wait for the services started by the Xray user to stop. Otherwise, manually kill all processes started by the Xray user.
2. Extract the contents of the compressed archive and go to the extracted folder.

   ```bash
   mv jfrog-xray-<version>-linux.tar.gz /opt/jfrog/
   cd /opt/jfrog
   tar -xf jfrog-xray-<version>-linux.tar.gz
   ```
3. Replace the existing $JFROG\_HOME/xray/app with the new app folder.For eg:

   ```bash
   # Export variables to simplify commands
   export JFROG_HOME=/opt/jfrog   ## this is your old xray dir
   export JF_NEW_VERSION=/opt/jfrog/jfrog-xray-<version>-linux

   # Remove app
   rm -rf $JFROG_HOME/xray/app

   # Copy new app
   cp -fr $JF_NEW_VERSION/app $JFROG_HOME/xray/

   # Make sure to chown again to set the right permissions for xray user
   eg: chown -R xray:xray /opt/jfrog/xray

   # Remove extracted new version
   rm -rf $JF_NEW_VERSION
   ```
4. Start Xray service

   ```text
   xray/app/bin/xray.sh start|stop  ## As xray user
   ```

   Or via service

   ```bash
   systemctl <start|stop|status> xray.service
   ```

**2) Upgrade an existing node to an Xray only node (Linux Archive)**

This is a scenario where you must update one node to an Xray only node.

Follow the below steps to upgrade.

1. Perform this step if you are upgrading from a node that has Xray + RabbitMQ Disconnect RabbitMQ from Cluster.

   1. Switch to Xray user (default: xray) and navigate to rabbitmq/sbin directory.

      ```bash
      su xray
      cd xray/app/third-party/rabbitmq/sbin/
      ```
   2. We will stop and remove the RabbitMQ node from the cluster in this step. Replace the \<current-node> with the node name you are working on. You can use the cluster\_status command to get the correct node name. And the `<active-node>` can be any other node in the cluster still online.

      ```bash
      ./rabbitmqctl cluster_status
      ./rabbitmqctl stop_app -n <current-node>
      ./rabbitmqctl forget_cluster_node <current-node> --node  <active-node>
      ```
   3. Verify the node is not part of the cluster and no RabbitMQ services are running.

      ```bash
      ./rabbitmqctl cluster_status --node <active-node>
      ps -aux | grep erl
      ps -aux | grep epmd
      ```

2. Stop the current server.

   ```bash
   cd $JFROG_HOME/xray/app/bin
   ./xray.sh stop ## as xray user
   ```

   Or via service

   ```bash
   systemctl stop xray.service
   ```

   Wait for the services started by the Xray user to stop. Otherwise manually kill all processes started by the Xray user.

3. Extract the contents of the compressed archive and go to the extracted folder.

   ```bash
   mv jfrog-xray-<version>-linux.tar.gz /opt/jfrog/
   cd /opt/jfrog
   tar -xf jfrog-xray-<version>-linux.tar.gz
   ```

4. Replace the existing **$JFROG\_HOME/xray/app** with the new app folder.

   For eg:

   ```bash
   # Export variables to simplify commands
   export JFROG_HOME=/opt/jfrog   ## this is your old xray dir
   export JF_NEW_VERSION=/opt/jfrog/jfrog-xray-<version>-linux

   # Remove app
   rm -rf $JFROG_HOME/xray/app

   # Copy new app
   cp -fr $JF_NEW_VERSION/app $JFROG_HOME/xray/

   # Make sure to chown again to set the right permissions for xray user
   eg: chown -R xray:xray /opt/jfrog/xray

   # Remove extracted new version
   rm -rf $JF_NEW_VERSION
   ```

5. Before starting the Xray service, update the system.yaml file with the RabbitMQ cluster URLs and credentials for all nodes in the cluster. Ensure that all RabbitMQ node URLs are correctly listed and include the appropriate username and password for authentication. This configuration ensures Xray can communicate effectively with the RabbitMQ cluster and save the changes.

   Change the order of the URLs to optimize load balancing and prevent all Xray nodes from connecting to the same RabbitMQ node. For example, if the RabbitMQ node URL order in the first Xray node is 1,2,3, then in the second node, it should be 2,3,1, and in the third node, it could be 3,1,2. This ensures that each Xray node connects to different RabbitMQ nodes, improving fault tolerance and distributing the load efficiently.

   ```bash
   vi $JFROG_HOME/xray/var/etc/system.yaml
   ```

<Callout icon="📘" theme="info">
  If using a custom RabbitMQ password, ensure the same password is configured in Xray’s system.yaml file under the RabbitMQ section to maintain consistency.
</Callout>

![1.png](https://files.readme.io/b031e64315a314de1e342281e308d327294d05cf02cec5e605c98d797fa831bd-uuid-158b5ffd-708d-8b08-e4aa-61e68de5d94a.png)

<br />

6. Edit the file $JFROG\_HOME/xray/var/etc/installerState.yaml and add the below line at the root level if not there or set it to a different value. Note: This step is required only to start Xray services

```yaml
installation_method: xray
```

7. Start Xray service:

   ```text
   xray/app/bin/xray.sh start|stop  ## As xray user
   ```

   Or via service

   ```bash
   systemctl <start|stop|status> xray.service
   ```

###### Docker Compose Upgrade

**1) Upgrade an existing node to a RabbitMQ only node (Docker compose)**

This scenario describes updating one of your nodes to a RabbitMQ-only node

Follow the below steps to upgrade.

1. Stop the service.

   1. For Xray services

      ```bash
      cd jfrog-xray-<version>-compose
      docker-compose -p xray down
      ```
   2. For RabbitMQ services

      ```bash
      cd jfrog-xray-<version>-compose
      docker-compose -p xray-rabbitmq down
      ```

2. Download the newer Xray docker compose based installer(tar.gz) from the <a href="https://jfrog.com/download-jfrog-platform/" target="_blank">JFrog Xray Downloads page</a>.

3. Extract the newer tar.gz file:

   ```bash
   tar -xvf jfrog-xray-<version>-compose.tar.gz
   ```

<Callout icon="📘" theme="info">
  From 3.107 onwards, JFrog Xray installers have organized files into designated subfolders. After extracting the tar.gz file, ensure you navigate to the xray directory.

  ```bash
  cd jfrog-xray-<version>-compose
  ```
</Callout>

<Callout icon="📘" theme="info">
  For Docker Compose upgrades, merge any customizations if you have done any in your current docker-compose.yaml file to the new extracted version of the docker-compose.yaml file.

  Copy the contents of the .env file in the previous installation to the newly created .env file in this archive without copying the versions, as this will affect the upgrade.
</Callout>

4. Run the installer script.

   ```bash
   ./config.sh -t rabbitmq
   ```

<Callout icon="📘" theme="info">
  If you use a custom password for RabbitMQ, verify that the RabbitMQ conf file has the correct password set before starting the service. Refer here for more details.
</Callout>

5. Start RabbitMQ service.

   ```bash
   docker-compose -p xray-rabbitmq -f docker-compose-rabbitmq.yaml up -d
   ```

6. RabbitMQ service should start; you can verify it by checking the logs

   ```bash
   docker ps
   docker logs -f xray_rabbitmq
   ```

7. (Optional) Access the UI through a browser to verify if the RabbitMQ nodes are up and running

<Callout icon="📘" theme="info">
  The credentials provided below are the default ones. If you have customized the RabbitMQ password in’/opt/jfrog/xray/app/bin/rabbitmq/rabbitmq.conf’, ensure you use the correct password when accessing the management UI.

  ```yaml
  http://<your-node-ip>:15672

  Username:  guest
  Password:  JFXR_RABBITMQ_COOKIE
  ```
</Callout>

**2) Upgrade an existing node to an Xray only node (Docker compose)**

This is a scenario where you must update one node to an Xray only node.

Follow the below steps to upgrade.

1. Stop the service.

   1. For Xray services

      ```bash
      cd jfrog-xray-<version>-compose
      docker-compose -p xray down
      ```
   2. For RabbitMQ services

      ```bash
      cd jfrog-xray-<version>-compose
      docker-compose -p xray-rabbitmq down
      ```

2. Download the newer xray docker compose based installer(tar.gz) from the <a href="https://jfrog.com/download-jfrog-platform/" target="_blank">JFrog Xray Downloads page</a>.

3. Extract the newer tar.gz file:

   ```bash
   tar -xvf jfrog-xray-<version>-compose.tar.gz
   ```

<Callout icon="📘" theme="info">
  From 3.107 onwards, JFrog Xray installers have organized files into designated subfolders. After extracting the tar.gz file, ensure you navigate to the xray directory.

  ```bash
  cd jfrog-xray-<version>-compose
  ```
</Callout>

<Callout icon="📘" theme="info">
  For Docker Compose upgrades, merge any customizations from your current docker-compose.yaml file into the newly extracted version.

  Copy the contents of the .env file in the previous installation to the newly created .env file in this archive without copying the versions, as this will affect the upgrade.
</Callout>

4. Run the installer script.

   ```bash
   ./config.sh -t xray
   ```

5. Upon running the command, you will be prompted with a question.

   1. Have you disconnected Artifactory Xray pairings, except one prior to performing this upgrade? - You can choose y. This step was added for migrating from older 2.x to 3.x versions. If you are already on Xray 3.x, type y.

6. Before starting the Xray service, update the system.yaml file with the RabbitMQ cluster URLs and credentials for all nodes in the cluster. Ensure that all RabbitMQ node URLs are correctly listed and include the appropriate username and password for authentication. This configuration ensures Xray can communicate effectively with the RabbitMQ cluster and save the changes.

   Change the order of the URLs to optimize load balancing and prevent all Xray nodes from connecting to the same RabbitMQ node. For example, if the RabbitMQ node URL order in the first Xray node is 1,2,3, then in the second node, it should be 2,3,1, and in the third node, it could be 3,1,2. This ensures that each Xray node connects to different RabbitMQ nodes, improving fault tolerance and distributing the load efficiently.

   ```bash
   vi /root/.jfrog/xray/var/etc/system.yaml
   ```

<Callout icon="📘" theme="info">
  If using a custom RabbitMQ password, ensure the same password is configured in Xray’s system.yaml file under the RabbitMQ section.
</Callout>

![1.png](https://files.readme.io/b031e64315a314de1e342281e308d327294d05cf02cec5e605c98d797fa831bd-uuid-158b5ffd-708d-8b08-e4aa-61e68de5d94a.png)

<br />

7. Start Xray service.

```bash
docker-compose -p xray up -d
```

8. Xray services should start; you can verify it by checking the logs.

   ```bash
   docker ps
   docker logs -f xray_router ## or any other xray services.
   ```