-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Expand file tree
/
Copy path.env.example
More file actions
177 lines (139 loc) · 6.12 KB
/
Copy path.env.example
File metadata and controls
177 lines (139 loc) · 6.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# This file serves a dual purpose:
# 1. Developer Bootstrap: The active (uncommented) variables directly below
# configure a safe, unprivileged local environment for 'go run .'.
# This allows 'cp .env.example .env' to work out-of-the-box without root.
# 2. Production Reference: All available XUI_* configuration options are
# documented and commented out in the reference section further below.
#
# 3x-ui reads its runtime configuration from XUI_* environment variables.
# On a script install, the installer writes them to the service environment file
# (/etc/default/x-ui, /etc/conf.d/x-ui, or /etc/sysconfig/x-ui depending on the distro).
# For Docker, you set them in docker-compose.yml or via 'docker run -e'.
#
# Defaults are sensible — set only what you need to change, then restart:
# systemctl restart x-ui
# ------------------------------------------------------------------------------
# LOCAL DEVELOPMENT OVERRIDES (ACTIVE BY DEFAULT)
# ------------------------------------------------------------------------------
XUI_DEBUG=true
XUI_DB_FOLDER=x-ui
XUI_LOG_FOLDER=x-ui
XUI_BIN_FOLDER=x-ui
XUI_INIT_WEB_BASE_PATH=/
# ==============================================================================
# REFERENCE CONFIGURATION (ALL OPTIONS)
# ==============================================================================
# ------------------------------------------------------------------------------
# Database
# ------------------------------------------------------------------------------
# Backend database type: sqlite, or postgres (also accepts postgresql / pg)
# Default: sqlite
#XUI_DB_TYPE=sqlite
# Folder for the SQLite database file (x-ui.db)
# Default: /etc/x-ui (Overridden to 'x-ui' in the development block above)
#XUI_DB_FOLDER=/etc/x-ui
# PostgreSQL connection string (used when XUI_DB_TYPE=postgres)
# Example: postgres://user:password@localhost:5432/dbname?sslmode=disable
#XUI_DB_DSN=
# Max open connections in the PostgreSQL pool
#XUI_DB_MAX_OPEN_CONNS=
# Max idle connections in the PostgreSQL pool
#XUI_DB_MAX_IDLE_CONNS=
# PostgreSQL Docker Container Settings
# Default credentials used if you are running PostgreSQL via docker-compose
#POSTGRES_USER=xui
#POSTGRES_PASSWORD=xui
#POSTGRES_DB=xui
# ------------------------------------------------------------------------------
# Panel
# ------------------------------------------------------------------------------
# Override the panel port (1–65535). Takes precedence over the stored setting.
#XUI_PORT=
# Initial web base path on FIRST launch (e.g., /panel)
# Default: /
#XUI_INIT_WEB_BASE_PATH=/
# Enable Fail2ban-based IP-limit enforcement
# Default: true
#XUI_ENABLE_FAIL2BAN=true
# Skip the HSTS header — set true when TLS is terminated by a reverse proxy
# Default: false
#XUI_SKIP_HSTS=false
# ------------------------------------------------------------------------------
# Logging & binaries
# ------------------------------------------------------------------------------
# Logging level: debug, info, notice, warning, or error
# Default: info
#XUI_LOG_LEVEL=info
# Debug mode. Forces log level to debug, enables Gin debug mode,
# and ensures frontend assets are served directly from disk (see CLAUDE.md).
# Default: false (Overridden to 'true' in the development block at the top)
#XUI_DEBUG=false
# Log output directory
# Default: /var/log/x-ui (Overridden to 'x-ui' in the development block above)
#XUI_LOG_FOLDER=/var/log/x-ui
# Folder for the Xray-core binary and geosite/geoip files
# Default: bin (Overridden to 'x-ui' in the development block above)
#XUI_BIN_FOLDER=bin
# Legacy Path Settings
# Main installation folder (Default: /usr/local/x-ui for Linux, /app for Docker)
#XUI_MAIN_FOLDER=/usr/local/x-ui
# Path to the systemd service file (Default: /etc/systemd/system)
#XUI_SERVICE=/etc/systemd/system
# ------------------------------------------------------------------------------
# Memory & profiling
# ------------------------------------------------------------------------------
# Go GC target percentage; lower = less RAM, slightly more CPU.
# Default: 75
#XUI_GOGC=
# Minutes between FreeOSMemory calls; 0 disables.
# Default: 10
#XUI_MEMORY_RELEASE_INTERVAL=
# Go soft memory limit in MiB
#XUI_MEMORY_LIMIT=
# Go-syntax soft limit (e.g., 400MiB); takes precedence over XUI_MEMORY_LIMIT
#GOMEMLIMIT=
# Expose pprof profiling on 127.0.0.1:6060
# Default: false
#XUI_PPROF=false
# Automatically set to 'true' inside the official Docker image.
# Consumed by internal scripts (x-ui.sh) to detect the environment.
# There is normally no need to set or toggle this variable manually.
# Default: false (automatically 'true' in Docker environments)
#XUI_IN_DOCKER=false
# ------------------------------------------------------------------------------
# Xray
# ------------------------------------------------------------------------------
# Force VMess AEAD
# Default: false
#XRAY_VMESS_AEAD_FORCED=false
# ------------------------------------------------------------------------------
# Tunnel health monitor
# ------------------------------------------------------------------------------
# Optional watchdog: probes a URL (optionally through a local Xray inbound)
# and restarts Xray after repeated failures. A restart drops all connected clients.
# Default: false
#XUI_TUNNEL_HEALTH_MONITOR=false
# Proxy to send the probe through, e.g., socks5://127.0.0.1:1080
# Empty = only checks host connectivity
#XUI_TUNNEL_HEALTH_PROXY=
# URL to probe
# Default: https://www.cloudflare.com/cdn-cgi/trace
#XUI_TUNNEL_HEALTH_URL=https://www.cloudflare.com/cdn-cgi/trace
# Interval between probes
# Default: 30s
#XUI_TUNNEL_HEALTH_INTERVAL=30s
# Per-probe timeout
# Default: 10s
#XUI_TUNNEL_HEALTH_TIMEOUT=10s
# Consecutive failures before a restart
# Default: 3
#XUI_TUNNEL_HEALTH_FAILURES=3
# Minimum delay between restarts
# Default: 5m
#XUI_TUNNEL_HEALTH_COOLDOWN=5m
# ------------------------------------------------------------------------------
# Unattended install
# ------------------------------------------------------------------------------
# Set to 1 (or run with no TTY) to install with zero prompts.
# Generated credentials will be written to /etc/x-ui/install-result.env
#XUI_NONINTERACTIVE=1