mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5153] [Feature]: saving configuration to db is not good idea #3620
Labels
No labels
backlog
bug
clarification needed
documentation
duplicate
enhancement
github_actions
good first issue
invalid
javascript
New Feature
PR welcomed
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MHSanaei/3x-ui#3620
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @liutianfang on GitHub (Jun 10, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5153
Is your feature request related to a problem?
I use a nginx https server reverse proxy panel. when I tested and it worked OK , I add listening ip :127.0.0.1 in panel for security and restart panel, The panel can not visit!!!
I have to install sqlite3, search db structure, update value by sql command.
traditionally, json configuration file is easy to edit, vi can do it
Describe the solution you'd like
keep use json configuration file
Alternatives you've considered
No response
Concrete use case
No response
Mockups, screenshots, or examples
No response
Which parts of the panel would this affect?
No response
Are you willing to help?
Before submitting
@github-actions[bot] commented on GitHub (Jun 10, 2026):
Thanks for the report. Two things here: a recovery tip for your current situation, and a note on the feature request.
Recovering from a 127.0.0.1 listen lockout
You don't need SQLite for this — the
x-uiCLI can reset it from an SSH session on the server:Setting
0.0.0.0clears the restriction and restores listening on all interfaces.(Source:
main.goupdateSetting()+x-ui.shSSH/security menu, option 2 — "Clear listen IP".)Alternatively, run
x-uias root, navigate to the Security section, and choose the option to clear the listen IP — it runs the same command internally.On the feature request: JSON config file
The panel intentionally stores all settings in the SQLite database (key
webListenin thesettingstable) rather than a flat file. The reasons this is unlikely to change:x-ui settingCLI already provides the "plain-text escape hatch" for situations exactly like yours: you can read and set any setting from an SSH shell without a database client.The documented recovery path (
x-ui setting -listenIP 0.0.0.0) is the intended solution for this exact scenario. If you'd like to see it documented more prominently (e.g. a warning in the UI before applying a restrictive listen IP), that would be a more targeted improvement worth discussing.@MHSanaei commented on GitHub (Jun 12, 2026):
Storing panel settings in the DB is an intentional design choice (it''s what lets the panel manage itself at runtime, sync nodes, and migrate between SQLite/PostgreSQL), so we won''t be moving back to flat config files. The lockout you hit has a supported recovery path that doesn''t require editing the DB by hand:
(or
x-ui setting -showto inspect, andx-ui setting -port <n>etc.). That resets the listen binding so the panel is reachable again after a bad value. Closing as working-as-designed.