mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #4817] [Bug]: Panel state: Not Installed on docker runs #3349
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#3349
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 @abz-the-jit on GitHub (Jun 2, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/4817
Describe the bug
when using docker to run the app and exec to container for eg x-ui restart-xray its hit us with "[ERR] Please install the panel first"
app is working but we cant use docker exec
How to reproduce the problem
use the docker for running the app
run x-ui restart-xray with docker exec
Expected behavior
let it run . dont show error?
Actual behavior
i
Relevant logs
Screenshots
3x-ui version
3.2.6
Xray-core version
No response
How did you install 3x-ui?
Docker / Docker Compose
Operating system
windows
Which parts of the panel are affected?
Docker image
Browser (only if it is a UI bug)
No response
Is the panel behind a reverse proxy or CDN?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 2, 2026):
Thanks for the clear report!
Root cause: The
x-uiCLI script (x-ui.sh) usescheck_status()to verify the panel is installed by looking for a systemd service file (x-ui.service) or Alpine's/etc/init.d/x-ui. In a Docker container neither of these exists — the panel runs directly as a process — so every CLI command hits the "Please install the panel first" guard.This has been reported before (#1944, #4225) but was never resolved, so tracking it as a bug is the right call.
Workarounds until this is fixed:
x-uishell menu.Suggested fix (for contributors):
check_status()should detect a Docker environment (e.g. check for/.dockerenvor theDOCKERenv var) and fall back to checking whether thex-uiprocess is running (pgrep -x x-ui) instead of looking for a service file.@MHSanaei commented on GitHub (Jun 2, 2026):
Fixed: the
x-uiCLI now detects when it runs inside a container and manages the panel via its process and Unix signals instead of systemd/OpenRC.check_statusderives state from the running/app/x-uiprocess (no service file needed), so commands are no longer blocked by "Please install the panel first".x-ui restart-xraysends SIGUSR1 andx-ui restartsends SIGHUP + SIGUSR1 to the panel process.start/stop/enable/disableprint Docker-appropriate guidance.Verified end-to-end against a freshly built image:
restart-xraycycles the xray PID,restartrestarts the panel servers in-process while the web port stays up, and the menu shows "Panel state: Running".