1、安装宝塔面板
wget -O install.sh https://download.bt.cn/install/install_6.0.sh && sudo bash install.sh
2、安卓docker
curl -sSL https://get.docker.com | bash
systemctl enable docker
systemctl start docker
3、宝塔面板内安装软件环境
- Nginx 任意版本
- MySQL 5.7以上
4、宝塔面板中添加网站
宝塔面板> 网站> 添加网站
- 域名: 输入你的域名
- 数据库: MySQL
- PHP: 选择静态
5、部署Xboard
进入你的部署项目路径
Enter site directory
cd /www/wwwroot/your-domain
Clean directory
chattr -i .user.ini
rm -rf .htaccess 404.html 502.html index.html .user.ini
Clone repository
git clone https://github.com/cedar2025/Xboard.git ./
Prepare configuration file
cp compose.sample.yaml compose.yaml
Install dependencies and initialize
docker compose run -it – -rm web sh init.sh
6、运行服务
docker compose up -d
7、配置反向代理
location ^~ / {
proxy_pass http://127.0.0.1:7001;
proxy_http_version 1.1;
proxy_set_header Connection “”;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-PORT $remote_port;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header Scheme $scheme;
proxy_set_header Server-Protocol $server_protocol;
proxy_set_header Server-Name $server_name;
proxy_set_header Server-Addr $server_addr;
proxy_set_header Server-Port $server_port;
proxy_cache off;
}
8、更新软件
docker compose pull && \
docker compose run -it –rm web sh update.sh && \
docker compose up -d
9、访问网站:
xrayr部署地址:wget -N https://raw.githubusercontent.com/wyx2685/V2bX-script/master/install.sh && bash install.sh
注意事项