搭建Xray证书自动续期

搭建Xray证书自动续期

一、安装依赖包

1
2
3
4
5
6
7
8
Debian/Ubuntu 命令(看系统执行)
apt update -y
apt install -y curl
apt install -y socat
CentOS 命令(看系统执行)
yum update -y
yum install -y curl
yum install -y socat

二、安装acme.sh

1
curl https://get.acme.sh | sh -s email=您的域名邮箱

三、立刻加载修改后设置,使之生效

1
source ~/.bashrc

四、申请证书

1
acme.sh --issue -d 你的域名 --standalone -k ec-256

五、安装Nginx

1
apt -y install nginx

六、vps目录创建文件夹

vps目录下找/etc/nginx目录下创建一个文件夹,并命名为ssl

七、设置证书自动续期(vps执行以下命令)

1
2
3
4
acme.sh --installcert -d 你的域名 --ecc \
--key-file /etc/nginx/ssl/domain.key \
--fullchain-file /etc/nginx/ssl/domain.crt \
--reloadcmd "service nginx force-reload"

八、安装xray面板

1
bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/x-ui/master/install.sh)

九、安装BBR

1
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

选择【2】,安装过程中弹出窗口选择【NO】,再继续安装后选择【y】回车重启vps。

十、BBR加速(再次执行以下命令)

1
wget -N --no-check-certificate "https://raw.githubusercontent.com/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh

选择【7】回车。