https://github.com/XTLS/Xray-install
Easiest way to install & upgrade Xray
https://github.com/XTLS/Xray-install
vless xray xtls
Last synced: 3 months ago
JSON representation
Easiest way to install & upgrade Xray
- Host: GitHub
- URL: https://github.com/XTLS/Xray-install
- Owner: XTLS
- License: gpl-3.0
- Created: 2020-11-11T09:30:07.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-02-08T05:33:08.000Z (4 months ago)
- Last Synced: 2025-03-22T21:02:23.246Z (3 months ago)
- Topics: vless, xray, xtls
- Language: Shell
- Homepage: https://t.me/projectXray
- Size: 50.8 KB
- Stars: 2,122
- Watchers: 39
- Forks: 508
- Open Issues: 27
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Xray-install
Bash script for installing Xray in operating systems such as CentOS / Debian / OpenSUSE that support systemd.
[Filesystem Hierarchy Standard (FHS)](https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard)
```
installed: /etc/systemd/system/xray.service
installed: /etc/systemd/system/[email protected]installed: /usr/local/bin/xray
installed: /usr/local/etc/xray/*.jsoninstalled: /usr/local/share/xray/geoip.dat
installed: /usr/local/share/xray/geosite.datinstalled: /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**
```
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install
```**Update geoip.dat and geosite.dat only**
```
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install-geodata
```**Remove Xray, except json and logs**
```
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ remove
```## Advance
**Install & Upgrade Xray-core to a pre-release version**
```
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install --beta
```**Install & Upgrade Xray-core and geodata with `logrotate`, `$time` can be in the format of 12:34:56**
```
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install --logrotate $time
```
```
installed: /etc/systemd/system/[email protected]
installed: /etc/systemd/system/[email protected]installed: /etc/logrotate.d/xray
```**Install & Upgrade Xray-core and geodata with `User=root`, which will overwrite `User` in existing service files**
```
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install -u root
```**Install & Upgrade Xray-core without geodata**
```
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install --without-geodata
```**Remove Xray, include json and logs**
```
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ remove --purge
```## More Usage
```
bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ help
```## Stargazers over time
[](https://starchart.cc/XTLS/Xray-install)