Files
XTLS_Xray-docs-next/docs/en/document/install.md
T

14 KiB

Download and Install

Platform Support

Official Releases support the following platforms

Platform Architectures
Windows [1] x86 / amd64 / arm32 / arm64
macOS amd64 / arm64
Linux x86 / amd64 / arm / arm64 / mips64 / mips / ppc64 / s390x / riscv64
FreeBSD x86 / amd64
OpenBSD x86 / amd64

[1] Windows 7 is no longer officially supported by golang. Xray uses a patched go to provide separately published builds for it; Windows 7 users should use the releases with the -win7 suffix.

Xray actively keeps up with golang versions. For minimum OS version support other than win7, please refer to the latest go release notes corresponding to the time of release.

Builds for amd64 v2/v3 etc. are not provided as some similar projects do, because testing showed no significant performance improvement, and many critical functions already use runtime detection to automatically use extended instruction sets.

Download Xray

Precompiled binary ZIP archives are available in Github Releases.

Download the archive for your platform and extract it to start using Xray.

Verify Installation Packages

Xray provides two verification methods:

  • SHA1 / SHA256 digests for ZIP archives
  • Reproducible builds: please refer to Compile Xray

Windows Installation

macOS Installation

Linux Installation

Installation Scripts and Projects

Type Project Description
Linux Script XTLS/Xray-install (Official) Officially maintained Linux installation script
Linux Script tempest Supports Systemd and OpenRC
One Click Xray-REALITY One-click installation solution
One Click reality-ezpz One-click installation solution
One Click Xray_bash_onekey One-click installation solution
One Click v2ray-agent One-click installation solution
One Click ProxySU One-click installation solution
Magisk Xray4Magisk For Magisk environments
Magisk Xray_For_Magisk For Magisk environments

Package Managers and Distribution Repositories

Method Project Description
Arch User Repository AUR helpers Taking yay as an example, install with yay -S xray
Arch Linux CN Arch Linux CN repository After adding the repository, install with pacman -S xray as root
Linuxbrew Homebrew Usage is the same as Homebrew: brew install xray
Gentoo Portage Gentoo-zh Suitable for Systemd systems; install after adding the Overlay with layman or eselect-repository

Docker Installation

Two different styles of Docker images are currently provided:

  • ghcr.io/xtls/xray-core (Official)
    No root privileges, no shell environment, and support for more architectures. It is compiled and built from the official repository with traceability support. It sacrifices convenience in pursuit of more extreme security. ::: details File Structure

    • /usr/local/bin/xray: Xray main program (owner: root:root, file permissions: 755)
    • /usr/local/etc/xray/: Configuration file directory (mount point) (owner: root:root, directory permissions: 755, file permissions: 644)
      • 00_log.json
      • 01_api.json
      • 02_dns.json
      • 03_routing.json
      • 04_policy.json
      • 05_inbounds.json
      • 06_outbounds.json
      • 07_stats.json
      • 08_fakedns.json
      • 09_metrics.json
      • 10_observatory.json
      • 11_geodata.json
      • 12_env.json
      • 99_version.json
    • /usr/local/share/xray/: Resource file directory containing Loyalsoldier geolocation data files (owner: 65532:65532, directory permissions: 755, file permissions: 644)
      • geoip.dat
      • geosite.dat
    • /var/log/xray/: Log file directory (mount point) (directory owner: root:root, permissions: 755; file owner: 65532:65532, permissions: 600)
      • access.log
      • error.log

    :::

  • teddysun/xray
    Has root privileges, includes a shell environment, and is compatible with all architectures supported by Alpine. It is compiled and built by the private server dl.lamp.sh. More convenient to use. ::: details File Structure

    • /usr/bin/xray: Xray main program
    • /etc/xray/config.json: Single configuration file (its parent directory is a mount point)
    • /usr/share/xray/: Resource file directory containing v2fly geolocation data files
      • geoip.dat
      • geosite.dat

    :::

Third-Party Graphical Clients

Platform Project
OpenWrt PassWall
OpenWrt PassWall 2
OpenWrt ShadowSocksR Plus+
OpenWrt luci-app-xray (openwrt-xray)
Asuswrt-Merlin XRAYUI
Windows v2rayA
Windows v2rayN
Windows Furious
Windows Invisible Man - Xray
Windows AnyPortal
Android v2rayNG
Android X-flutter
Android SaeedDev94/Xray
Android SimpleXray
Android AnyPortal
iOS / macOS arm64 / tvOS Happ (tvOS)
iOS / macOS arm64 / tvOS FoXray
iOS / macOS arm64 / tvOS Streisand
macOS arm64 / x64 Happ
macOS arm64 / x64 v2rayA
macOS arm64 / x64 v2rayN
macOS arm64 / x64 V2rayU
macOS arm64 / x64 V2RayXS
macOS arm64 / x64 Furious
macOS arm64 / x64 OneXray
macOS arm64 / x64 GoXRay
macOS arm64 / x64 AnyPortal
Linux v2rayA
Linux v2rayN
Linux Furious
Linux GorzRay
Linux GoXRay
Linux AnyPortal

UUID Generator

Third-party UUID generator: uuidgenerator.net