This script allows you to install and configure Xray on your Linux server easily.
- Automatic installation of Xray
- Configures essential dependencies
- Supports various protocols such as VLESS, VMess, and Trojan
To install Xray, run the following command:
curl -O https://raw.githubusercontent.com/sh4dowByte/xray-server/refs/heads/main/install.sh
chmod +x install.sh
sudo ./install.sh- A Linux-based server (Ubuntu, Debian, CentOS, etc.)
- Root or sudo access
- Internet connection
After installation, you can configure Xray by modifying the configuration file located at:
/etc/xray/config.jsonTo apply changes, restart the Xray service:
sudo systemctl restart xrayIf you want to remove Xray, use:
sudo systemctl stop xray
sudo systemctl disable xray
sudo rm -rf /etc/xray /usr/local/bin/xray /var/log/xray- Check the service status:
sudo systemctl status xray
- View logs:
journalctl -u xray --no-pager -n 50
This script is provided under the MIT License.
Note: Use this script at your own risk. Ensure you review the script before execution.
This script has been modified from the original script available at: https://github.com/bmayu1/scriptvpn.