本文最后更新于 2026年3月12日。
编排
# networks:
# 1panel-network:
# external: true
services:
3x-ui3:
image: bigbugcc/3x-ui:v2.8.11
container_name: 3x-ui3
restart: unless-stopped
network_mode: host
environment:
- XRAY_VMESS_AEAD_FORCED=false
volumes:
- ./db/:/etc/x-ui/
- ./cert/:/root/cert/
# ports:
# - "33350-33399:33350-33399"
# - "2053:2053"
# networks:
# - 1panel-network
下面都不行,因为不是账号的问题
/app # /usr/local/x-ui/x-ui setting -username admin -password admin
/bin/sh: /usr/local/x-ui/x-ui: not found
/app # find / -name "x-ui" -type f
/usr/bin/x-ui
/app/x-ui
/app # /app/x-ui setting -username admin -password admin
Username and password updated successfully
还以为是随机生成的密码,所以之前的默认密码不行,实际重置密码也不能登录,因为不是host模式
/app/x-ui setting -username admin2 -password admin2
python3 -c "import sqlite3; conn=sqlite3.connect('/etc/x-ui/x-ui.db'); c=conn.cursor(); c.execute('UPDATE users SET secret=\"\" WHERE id=1'); conn.commit(); conn.close(); print('2FA Disabled Successfully')"