Skip to content

Instantly share code, notes, and snippets.

@hu553in
Last active May 1, 2024 10:56
Show Gist options
  • Save hu553in/942aee14ce910b4c748ecb23532f3a6e to your computer and use it in GitHub Desktop.
Save hu553in/942aee14ce910b4c748ecb23532f3a6e to your computer and use it in GitHub Desktop.
Dockerize 3x-ui
#!/bin/bash
set +H
# install required packages
apt-get update
apt-get -y install docker.io
# run 3x-ui Docker container
cd ~
mkdir 3x-ui
cd 3x-ui
docker run -itd \
-e XRAY_VMESS_AEAD_FORCED=false \
-v $PWD/db/:/etc/x-ui/ \
-v $PWD/cert/:/root/cert/ \
-p 2053:2053/tcp \ # admin panel
-p 5656:5656/tcp \ # TCP port for VPN
-p 5656:5656/udp \ # UDP port for VPN
--restart=unless-stopped \
--name 3x-ui \
ghcr.io/mhsanaei/3x-ui:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment