Go to file
Meo597 0776561190 Fix README 2025-04-10 20:08:47 +08:00
init.d respawn period 2025-04-10 19:58:33 +08:00
LICENSE Initial commit 2020-04-11 10:46:25 +00:00
README.md Fix README 2025-04-10 20:08:47 +08:00
README_zh-cn.md Fix README 2025-04-10 20:08:47 +08:00
README_zh-tw.md Fix README 2025-04-10 20:08:47 +08:00
install-release.sh Update install-release.sh 2025-04-07 10:19:19 -04:00

README.md

alpinelinux-install-xray

English | 中文(中国) | 中文(薹灣)

Install dependencies

Install cURL

apk add curl

Download

curl -O https://raw.githubusercontent.com/XTLS/alpinelinux-install-xray/main/install-release.sh

Use

ash install-release.sh

Commands

Enable

rc-update add xray

Disable

rc-update del xray

Start

rc-service xray start

Stop

rc-service xray stop

Restart

rc-service xray restart

Breaking Changes at 2025-04-09

Path Change: Original path /usr/local/lib/xray/ has been updated to new path /usr/local/share/xray/

  • This directory contains geosite.dat and geoip.dat
  • If you have scripts to automatically update these files, please adjust them accordingly
  • Regular users can ignore this change

Watchdog: Xray process will now automatically restart indefinitely (every 2 seconds) upon panic

  • Advanced users no longer need to manually modify /etc/init.d/xray or write custom daemon scripts
  • Regular users can ignore this change

No root Required: Xray now retains privileges (capabilities) to support tproxy and sockopt even when running as nobody

  • Advanced users should not (and need not) run Xray as root anymore — it already has all required network privileges
  • If you run Xray as a server (not client), you may optionally run the command below to reduce capabilities. This theoretically minimizes attack surface but has negligible practical impact
  • Regular users can ignore this change
sed -i 's/^capabilities="^cap_net_bind_service,^cap_net_admin,^cap_net_raw"$/capabilities="^cap_net_bind_service"/g' /etc/init.d/xray