Xray Interactive Script Installation Prerequisites
Prerequisites to install before running the Xray interactive installer script, per installation method (Linux Archive, RPM, Debian, Docker Compose).
Common Prerequisites
These steps apply to all installer types (RPM, Debian, Docker Compose, and Linux Archive).
1. Install Artifactory
Before installing Xray 3.x, you must first install JFrog Artifactory 7.x.
2. Admin Permissions for Installation
Admin permissions are required on the installation machine. We recommend that you run the installation as a root user, or you can also provide sudo access to a non-root user.
3. Install PostgreSQL
Follow this step only if you are installing PostgreSQL externally instead of using the bundled database.
Xray uses PostgreSQL to store and query the checksum-based components graph built from every artifact and build it indexes.
See the list of compatible PostgreSQL versions for your Xray version before installing.
4. SQL Initialization Block
Follow this step only if you are installing PostgreSQL externally instead of using the bundled database.
Log in to your PostgreSQL database and execute the following to create the database and role for Xray.
CREATE DATABASE xraydb;
CREATE USER xray WITH ENCRYPTED PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE xraydb TO xray;
\c xraydb
GRANT ALL ON SCHEMA public TO xray;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO xray;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO xray;
GRANT ALL PRIVILEGES ON ALL FUNCTIONS IN SCHEMA public TO xray;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON TABLES TO xray;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON SEQUENCES TO xray;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL ON FUNCTIONS TO xray;5. Configure limits if using a custom Xray user
If you are using a custom Xray user, add the following to /etc/security/limits.conf to set the open file descriptor limit (this is required for RabbitMQ to function properly):
<custom user> soft nofile 100000
<custom user> hard nofile 1000006. OpenSSL requirements for RHEL 10 and Amazon Linux 2023
If you are installing on RHEL 10 or Amazon Linux 2023 and run into issues caused by an outdated OpenSSL version, update OpenSSL before starting Xray.
RHEL 10
On RHEL 10.0, update OpenSSL to version 3.5.0 or later before starting Xray — the default OpenSSL 3.2.2 is missing crypto symbols required by Xray's bundled Erlang/RabbitMQ. RHEL 10.1 and 10.2 already include a compatible OpenSSL version by default, so no action is needed on those releases.
dnf update openssl openssl-libsAmazon Linux 2023
sudo dnf -y --releasever=latest updateLinux Archive Prerequisites
Follow step 3 and step 4 in Common Prerequisites
3. Install Erlang
Strict adherence to the compatibility matrix is required for RabbitMQ stability:
Note
For fresh installation always use RabbitMQ 4.x with
installV2.sh.
| RabbitMQ Version | Required Erlang Version |
|---|---|
RabbitMQ 3.x Via install.sh (default) | Erlang 26.x |
RabbitMQ 4.x Via installV2.sh (choose 4.x) Xray version >= 3.131.x | Erlang 27.x |
For more info please refer to the RabbitMQ and Erlang/OTP Compatibility Matrix.
You can install Erlang using your own preferred method, or use the dependency package we provide, as shown below:
cd /opt/jfrog/xray/app/third-party/rabbitmq4
dpkg -i esl-erlang_27.3.4-1~ubuntu~noble_amd64.deb4. db-util
Note
From Xray 3.143.x, installing db-util is no longer required, as it is packaged as a static binary within the installer.
Prerequisites for HA Setup
- Consistent Xray version — All nodes within the same Xray HA installation must be running the same Xray version.
- DNS resolution — Each Xray node must be able to resolve the hostnames of all other nodes in the cluster.
- Bidirectional network connectivity — All Xray nodes must have unrestricted network communication with each other (no firewalls or network policies blocking traffic between nodes).
Database
Xray HA requires an external PostgreSQL database. Install the database before proceeding to install the first node. There are several ways to set up PostgreSQL for redundancy, such as Load Balancing and Replication. For more information, see PostgreSQL.
RabbitMQ is automatically installed as part of the Xray installation.
Licensing
Xray HA is supported with an Enterprise X or Enterprise+ license.
Network
- All the Xray HA components (Xray cluster nodes, database server and RabbitMQ) must be within the same fast LAN.
- All the HA nodes must communicate with each other through dedicated TCP ports.
Updated 7 days ago
