前提:购买一台境外服务器,最好是美国节点,便于访问ai网站(如Gemini、Claude)
切换root账户 进行安装 su root
bash <(curl -Ls https://raw.githubusercontent.com/MHSanaei/3x-ui/master/install.sh) 出现下面的提示时,输入y确定 Would you like to customize the Panel Port settings? (If not, a random port will be applied) [y/n]: y 根据提示设置3X-UI的面板端口 Please set up the panel port: 54321
Your Panel Port is: 54321
Port set successfully: 54321
Username and password updated successfully
Base URI path set successfully 选择2模式,然后一路按回车就完事了 Choose SSL certificate setup method:
1. Let's Encrypt for Domain (90-day validity, auto-renews)
2. Let's Encrypt for IP Address (6-day validity, auto-renews)
Note: Both options require port 80 open. IP certs use shortlived profile.
Choose an option (default 2 for IP): 2
Using Let's Encrypt for IP certificate (shortlived profile)...
Do you have an IPv6 address to include? (leave empty to skip): Setting up Let's Encrypt IP certificate (shortlived profile)...
Note: IP certificates are valid for ~6 days and will auto-renew.
Port 80 must be open and accessible from the internet.
Installing acme.sh for SSL certificate management...
acme.sh installed successfully 重置管理员账号密码,root账户下,输入 x-ui 进入控制终端,输入6,如下 ...