[GH-ISSUE #4658] [Bug]: The data in PostgreSQL does not match the x-ui interface and configuration. #3210

Closed
opened 2026-10-31 20:30:49 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @HaveSyntaxError on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4658

Describe the bug

For instance, the current port number should be 2053 as shown by the x-ui interface, but the setting stored in the database is 60462. This results in inconsistencies in the final pairwise comparisons, and ultimately the results will be based on those in the database.

Image Image

But in this case, the settings of x-ui are unable to control these data, and I don't even know what the initial password is now.

How to reproduce the problem

First install PostgreSQL on the server, and then configure the connection with 127.0.0.1 for subsequent steps.

Expected behavior

No response

Actual behavior

No response

Relevant logs


Screenshots

No response

3x-ui version

3.2.0

Xray-core version

default

How did you install 3x-ui?

install.sh script

Operating system

ubuntu24.04.1

Which parts of the panel are affected?

Frontend (UI / panel pages), Backend (API endpoints, login, settings), Database / migrations

Browser (only if it is a UI bug)

No response

Is the panel behind a reverse proxy or CDN?

No — direct access

Before submitting

  • I searched existing issues and this bug has not been reported.
  • I am running the latest released version of 3x-ui (or have verified the bug still exists on it).
  • This bug report is written in English.
  • I have redacted any sensitive data (tokens, real domains, client UUIDs).
Originally created by @HaveSyntaxError on GitHub (May 29, 2026). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4658 ### Describe the bug For instance, the current port number should be 2053 as shown by the x-ui interface, but the setting stored in the database is 60462. This results in inconsistencies in the final pairwise comparisons, and ultimately the results will be based on those in the database. <img width="573" height="47" alt="Image" src="https://github.com/user-attachments/assets/377bbd42-616e-43c7-bad5-ca5dd93f4a67" /> <img width="687" height="130" alt="Image" src="https://github.com/user-attachments/assets/274f14b1-8620-491c-b6b5-337c64693c68" /> But in this case, the settings of x-ui are unable to control these data, and I don't even know what the initial password is now. ### How to reproduce the problem First install PostgreSQL on the server, and then configure the connection with 127.0.0.1 for subsequent steps. ### Expected behavior _No response_ ### Actual behavior _No response_ ### Relevant logs ```shell ``` ### Screenshots _No response_ ### 3x-ui version 3.2.0 ### Xray-core version default ### How did you install 3x-ui? install.sh script ### Operating system ubuntu24.04.1 ### Which parts of the panel are affected? Frontend (UI / panel pages), Backend (API endpoints, login, settings), Database / migrations ### Browser (only if it is a UI bug) _No response_ ### Is the panel behind a reverse proxy or CDN? No — direct access ### Before submitting - [x] I searched [existing issues](../issues?q=is%3Aissue) and this bug has not been reported. - [x] I am running the latest released version of 3x-ui (or have verified the bug still exists on it). - [x] This bug report is written in English. - [x] I have redacted any sensitive data (tokens, real domains, client UUIDs).
bsakaguchi 2026-10-31 20:30:49 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@shart7 commented on GitHub (May 30, 2026):

Describe the bug

I confirm this issue. I tried a clean installation of the panel and an upgrade from version 2.9.4 using the original script. When deploying the PostgreSQL database during the x-ui -> 2 -> 1 panel installation, you get the webListen, webBasePath, webPort, username, and password settings specified during installation. After that, changing or accessing the panel settings is only possible by accessing the PostgreSQL database directly. Making changes via /usr/local/x-ui/x-ui setting produces no result. I assume all changes are written to /etc/x-ui/xui.db if you try to change the settings via the x-ui panel script, despite the PostgreSQL database being created and its data specified in /etc/default/x-ui. However, if we look at the current settings (x-ui -> 10. View current settings), we see the line: Database: PostgreSQL — postgres://xui:****@127.0.0.1:5432/xui?sslmode=disable. But this doesn't mean anything, and the x-ui script doesn't access it. Perhaps I'm not being entirely precise in my description of the problem.

Problem reproducibility: 100%.

How to reproduce the problem

To do this, when installing the panel, select the PostgreSQL database and then try changing the webListener, webBasePath, webPort, username, and password data using the x-ui panel script and matching it with the data in the PostgreSQL database.

<!-- gh-comment-id:4582828025 --> @shart7 commented on GitHub (May 30, 2026): **Describe the bug** I confirm this issue. I tried a clean installation of the panel and an upgrade from version 2.9.4 using the original script. When deploying the PostgreSQL database during the x-ui -> 2 -> 1 panel installation, you get the webListen, webBasePath, webPort, username, and password settings specified during installation. After that, changing or accessing the panel settings is only possible by accessing the PostgreSQL database directly. Making changes via /usr/local/x-ui/x-ui setting produces no result. I assume all changes are written to /etc/x-ui/xui.db if you try to change the settings via the x-ui panel script, despite the PostgreSQL database being created and its data specified in /etc/default/x-ui. However, if we look at the current settings (x-ui -> 10. View current settings), we see the line: Database: PostgreSQL — postgres://xui:****@127.0.0.1:5432/xui?sslmode=disable. But this doesn't mean anything, and the x-ui script doesn't access it. Perhaps I'm not being entirely precise in my description of the problem. **Problem reproducibility:** 100%. **How to reproduce the problem** To do this, when installing the panel, select the PostgreSQL database and then try changing the webListener, webBasePath, webPort, username, and password data using the x-ui panel script and matching it with the data in the PostgreSQL database.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#3210
No description provided.