Using xray official Repository on Linux

We've published our official xray repository on https://repo.raychain.io this repository supports the following distributions:

Debian

  • 8.x (Jessie)
  • 9.x (stretch)
  • 10x (Buster)
  • Testing (Bullseye)
  • Unstable (Sid)

Ubuntu

16.04 - 20.10

Mint

18.x

Other official repositories

Centos/Fedora/Redhat

Tested on Centos 7, 8 and Fedora 30. Other releases should work fine as well.

https://rpmrepo.xray.info

Archlinux

Get it from the AUR

More distributions will be added in the future, this document will be updated to reflect those changes.

Tutorial focus

This tutorial assumes you have a basic knowledge of Linux and terminal usage, the entire process uses the Linux terminal.

Installing on Ubuntu

Obtaining signing key

First, we need to obtain the xray signing key from the ubuntu keyserver, here's how:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BF5B197D

This will download and add the xray signing key to your linux install.

Adding repository to your APT sources.

echo "deb https://repo.xray.info/apt/ubuntu/ $(lsb_release -cs) main" |sudo tee -a /etc/apt/sources.list.d/xray.list

Refreshing APT sources and installing xray

sudo apt update && sudo apt install xray

By doing this, we'll update our sources and install xray on our ubuntu Box

Installing on Debian

First, we need to make sure sudo is installed:

Type sudo su and press enter, if you get a password prompt, then you can move on to obtaining the public key

Installing sudo

Obtain admin privileges (su to root) and then type your admin user (root) password

Once you're logged in as "root" please type the following: apt-get install sudo

When sudo finishes installing, add your user to the sudo group: gpasswd -a youruser sudo Logout and then log in again.

Installing dirmngr and apt-transport-https

These two packages are needed to enable the xray repository on Debian, let's install them:

apt install -y apt-transport-https dirmngr

Obtaining Public key

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys BF5B197D

This downloads and installs the xray public key

Adding repository to your APT sources.

sudo su - Sudo to root first

echo "deb https://repo.xray.info/apt/debian/ buster main" >> /etc/apt/sources.list.d/xray.list

This will add the repository to your APT sources file. NOTE: Please remember to change "stretch" for your Debian version codename

Refreshing APT sources and installing xray

sudo apt update && sudo apt install xray

By doing this, we'll update our sources and install xray on our debian Box

Install on Centos/Redhat/Fedora

These are the steps you need to take to install xray in a RPM-based distribution

  1. Install the public key for the RPM repository:

    sudo rpm --import https://rpmrepo.xray.info/key.asc

  2. Add the xray repository:

    sudo yum-config-manager --add-repo https://rpmrepo.xray.info/

  3. sudo yum update

  4. sudo yum install xray

You can also use dnf to install xray on Fedora and distributions that support it.

Install on Archlinux

To install on arch, the easiest way is to use "yay" https://aur.archlinux.org/packages/yay

You can install xray using the source files, but this will take a long time to compile from source. In most cases, we recommend using the binary release with: yay xray-core-bin

This will bring up a dialog where you need to confirm that you want to install the above mentioned package, press "1" to confirm .

Launching xray

Launching is simple, we just go to our applications menu and scrolldown/search for xray