x-ui in docker version
You could selecet your perfer one by changing the docker image tag
Tag | amd64 | arm64 | armv7 | s390x | |
---|---|---|---|---|---|
vaxilu/x-ui | latest | ✅ | ✅ | ✅ | ✅ |
FranzKafkaYu/x-ui | alpha | ✅ | ✅ | ❌ | ✅ |
X-UI-Unofficial/x-ui | beta | ✅ | ✅ | ❌ | ✅ |
MHSanaei/3x-ui | 3x-ui | ✅ | ✅ | ✅ | ✅ |
Use the official one-key script
curl -sSL https://get.docker.com/ | sh
mkdir x-ui && cd x-ui
docker run -itd --network=host \
-v $PWD/db/:/etc/x-ui/ \
-v $PWD/cert/:/root/cert/ \
--name x-ui --restart=unless-stopped \
enwaiax/x-ui
Note: If you want to use FranzKafkaYu/x-ui, change the image as enwaiax/x-ui:alpha
mkdir x-ui && cd x-ui
wget https://raw.githubusercontent.com/enwaiax/x-ui/main/docker-compose.yml
docker compose up -d
This part describe how to enable ssl.
54321
10.10.10.10
xui.example.com
and you have set the A recode in cloudflarexxxx@example.com
sudo apt update
sudo apt install python3-certbot-nginx
touch /etc/nginx/conf.d/xui.conf
Add below to the file. Adjust appropriately to your own situation.
server {
listen 80;
listen [::]:80;
server_name xui.example.com;
location / {
proxy_redirect off;
proxy_pass http://127.0.0.1:54321;
proxy_http_version 1.1;
proxy_set_header Host $host;
}
# This part desribe how to reverse websockt proxy
location /xray {
proxy_redirect off;
proxy_pass http://127.0.0.1:10001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Y-Real-IP $realip_remote_addr;
}
}
nginx -t
certbot --nginx --agree-tos --no-eff-email --email xxxxx@example.com
For more details, refer to cerbot
nginx -s reload
sudo certbot renew --dry-run
Note: Default credentials
Username: admin
Password: admin