mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #4932] [Bug]: After the update, the panel files disappeared. #3452
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#3452
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 @Maybeoff on GitHub (Jun 4, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4932
Describe the bug
While updating my nodes from version 3.2.0 to 3.2.7, I lost full access to the node. It turned out that during the update, all files from the /usr/local/x-ui/ folder were deleted. The only solution was to run the installation script and restart the x-ui service.
How to reproduce the problem
I don't know, maybe the script crashed or the GitHub servers didn't give me the new version.
Expected behavior
the panel will update and launch
Actual behavior
The panel stopped and the panel files disappeared
Relevant logs
Screenshots
No response
3x-ui version
3.2.7
Xray-core version
v26.6.1
How did you install 3x-ui?
install.sh script
Operating system
ubuntu 24.04
Which parts of the panel are affected?
Install / upgrade script
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
No — direct access
Before submitting
@github-actions[bot] commented on GitHub (Jun 4, 2026):
Thank you for the report. I've traced through the update script to understand what likely happened.
What the update script does
When you run
x-ui update, it callsupdate.sh, which does the following before extracting the new version:/usr/local/x-ui-linux-amd64.tar.gz/usr/local/x-ui/: thex-uibinary,x-ui.sh,bin/xray-linux-amd64, and the service filesThen it extracts the new tarball and re-installs everything.
Where it can silently break
The critical extraction step in
update.sh(line 875) is:Because output is redirected to
/dev/null, a failed extraction produces no visible error. The tarball is then deleted on the very next line regardless. Iftarfails here — due to a corrupted or truncated download, a disk-space shortage, or an SSH session being interrupted mid-run — the old binaries are already gone and the new ones were never written. This matches what you observed.Your database is safe
The database and all your inbound/client configuration live in
/etc/x-ui/x-ui.db. Neither the update script nor the install script ever touches/etc/x-ui/. Onlyx-ui uninstallremoves that directory. Your data was never at risk.What you did was correct
Re-running
bash <(curl -Ls https://raw.githubusercontent.com/mhsanaei/3x-ui/master/install.sh)and restarting the service is exactly the right recovery step. The installer detects that credentials and config already exist and preserves them.Suggestions to prevent this in future
Run long-running admin commands inside a terminal multiplexer so an SSH disconnect cannot kill the script mid-way:
If you ever see the panel fail to start after an update, check whether
/usr/local/x-ui/x-uiand/usr/local/x-ui/bin/xray-linux-amd64still exist — if either is missing, re-run the install script.The underlying bug
Silently suppressing
tarerrors during the update (redirecting them to/dev/null) means a failed extraction leaves the system in this broken half-updated state with no warning. Errors at that step should not be discarded.