Go to file
xiagw 0243f56bce
Merge 6fa27f3d10 into 652637b1eb
2024-12-07 22:15:24 +08:00
LICENSE Add files via upload 2020-11-25 05:26:10 +00:00
README.md Update README.md to standardize installation commands for Xray 2024-12-07 22:14:43 +08:00
install-release.sh Add OpenWrt support to install-release.sh 2024-12-07 21:57:30 +08:00

README.md

Xray-install

Bash script for installing Xray in operating systems such as CentOS / Debian / OpenSUSE that support systemd.

Filesystem Hierarchy Standard (FHS)

installed: /etc/systemd/system/xray.service
installed: /etc/systemd/system/xray@.service

installed: /usr/local/bin/xray
installed: /usr/local/etc/xray/*.json

installed: /usr/local/share/xray/geoip.dat
installed: /usr/local/share/xray/geosite.dat

installed: /var/log/xray/access.log
installed: /var/log/xray/error.log

Notice: Xray will NOT log to /var/log/xray/*.log by default. Configure "log" to specify log files.

Basic Usage

Install & Upgrade Xray-core and geodata with User=nobody, but will NOT overwrite User in existing service files

curl -fL https://github.com/XTLS/Xray-install/raw/main/install-release.sh | bash -s - install

Update geoip.dat and geosite.dat only

curl -fL https://github.com/XTLS/Xray-install/raw/main/install-release.sh | bash -s - install-geodata

Remove Xray, except json and logs

curl -fL https://github.com/XTLS/Xray-install/raw/main/install-release.sh | bash -s - remove

Advance

Install & Upgrade Xray-core to a pre-release version

curl -fL https://github.com/XTLS/Xray-install/raw/main/install-release.sh | bash -s - install --beta

Install & Upgrade Xray-core and geodata with logrotate, $time can be in the format of 12:34:56

curl -fL https://github.com/XTLS/Xray-install/raw/main/install-release.sh | bash -s - install --logrotate $time
installed: /etc/systemd/system/logrotate@.service
installed: /etc/systemd/system/logrotate@.timer

installed: /etc/logrotate.d/xray

Install & Upgrade Xray-core and geodata with User=root, which will overwrite User in existing service files

curl -fL https://github.com/XTLS/Xray-install/raw/main/install-release.sh | bash -s - install -u root

Install & Upgrade Xray-core without geodata

curl -fL https://github.com/XTLS/Xray-install/raw/main/install-release.sh | bash -s - install --without-geodata

Remove Xray, include json and logs

curl -fL https://github.com/XTLS/Xray-install/raw/main/install-release.sh | bash -s - remove --purge

More Usage

curl -fL https://github.com/XTLS/Xray-install/raw/main/install-release.sh | bash -s - help

Stargazers over time

Stargazers over time