3x-ui/env.example
izzzzzi 2fbd1d860d feat: add PostgreSQL support and database configuration options
- Updated Docker configuration to support PostgreSQL as an alternative to SQLite.
- Enhanced DockerEntrypoint.sh to create a database environment file and test PostgreSQL connection.
- Introduced database setup functions in install.sh for PostgreSQL installation and configuration.
- Added database management options in x-ui.sh, including backup and switching between SQLite and PostgreSQL.
- Implemented database configuration retrieval in the web service and controller layers.
- Updated frontend settings to include database configuration options.
- Added translations for new database settings in multiple languages.
2025-05-23 02:00:06 +05:00

67 lines
No EOL
2.2 KiB
Text

# =============================================================================
# 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