# ============================================================================= # 3X-UI Docker Environment Configuration # ============================================================================= # Copy this file to .env and modify the values according to your setup # ============================================================================= # General Configuration # ============================================================================= HOSTNAME=3x-ui XUI_PORT=2053 XUI_SUB_PORT=2096 # ============================================================================= # X-UI Configuration # ============================================================================= XRAY_VMESS_AEAD_FORCED=false XUI_ENABLE_FAIL2BAN=true # ============================================================================= # Database Configuration # ============================================================================= # Database type: sqlite or postgres DB_TYPE=sqlite # PostgreSQL Configuration (only needed if DB_TYPE=postgres) DB_HOST=postgres DB_PORT=5432 DB_NAME=x_ui DB_USER=x_ui # IMPORTANT: Change this password for production! DB_PASSWORD=your_secure_password_here DB_SSLMODE=disable DB_TIMEZONE=UTC # ============================================================================= # PostgreSQL Admin (PgAdmin) Configuration # ============================================================================= # Only used with docker-compose.postgresql.yml and --profile admin PGADMIN_EMAIL=admin@example.com PGADMIN_PASSWORD=admin_password # ============================================================================= # Example configurations for different setups: # ============================================================================= # For SQLite (default, simple setup): # DB_TYPE=sqlite # For PostgreSQL (production setup): # DB_TYPE=postgres # DB_HOST=postgres # DB_PORT=5432 # DB_NAME=x_ui # DB_USER=x_ui # DB_PASSWORD=your_very_secure_password_123 # DB_SSLMODE=require # DB_TIMEZONE=UTC # For external PostgreSQL: # DB_TYPE=postgres # DB_HOST=your-postgres-server.com # DB_PORT=5432 # DB_NAME=x_ui_production # DB_USER=x_ui_user # DB_PASSWORD=your_external_db_password # DB_SSLMODE=require # DB_TIMEZONE=America/New_York