mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5070] [Bug]: Multidomain certificate makes x-ui shows wrong panel's path #3569
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#3569
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 @gomanuke on GitHub (Jun 8, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5070
Describe the bug
I'm using Lets Encrypt multidomain (several sub domains of one domain.de) certificate and news.domain.de is used for Panel's access and news.domain.de was used by installation.
Panel is correctly accessed by URL https://news.domain.de:8888/gomanuke/panel/settings#general
But x-ui reports wrong URL and wrong certificate.
How to reproduce the problem
Get by Lets Encrypt a certificate's files pair with domain and its subdomains.
Set it in Panel's CUI config
/etc/letsencrypt/live/part.domain.de/fullchain.pem
/etc/letsencrypt/live/part.domain.de/privkey.pem
Run x-ui in ssh and Check menu 10 (View Settings) it shows
[INF] current panel settings as follows:
Panel is secure with SSL
hasDefaultCredential: false
port: 8888
webBasePath: /gomanuke/
Database: SQLite (/etc/x-ui/x-ui.db)
Access URL: https://part.domain.de:8888/gomanuke
19-4 SSL (Certificate Management-Show Existing Domains)
ind: ‘/root/cert/’: No such file or directory
No certificates found
Expected behavior
So x-ui shows part.domain.de:8888/gomanuke instead of
Actual behavior
No response
Relevant logs
Screenshots
No response
3x-ui version
3.2.8
Xray-core version
No response
How did you install 3x-ui?
install.sh script
Operating system
Debian 13
Which parts of the panel are affected?
No response
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 8, 2026):
Thanks for the detailed report. I traced both behaviours to specific logic in
x-ui.sh.Issue 1 — Access URL shows
part.domain.deinstead ofnews.domain.deIn
x-ui.sh(around line 363), the View Settings display derives the hostname purely from the directory name that contains the configured certificate file:Because your cert path is
/etc/letsencrypt/live/part.domain.de/fullchain.pem, this gives:The script has no awareness of which SAN entry in a multi-domain certificate is actually used to reach the panel — it just reads the folder name. Since Let's Encrypt names that folder after the first/primary domain in the cert (
part.domain.de), the displayed URL ishttps://part.domain.de:8888/gomanukeeven though the panel is correctly reachable athttps://news.domain.de:8888/gomanuke.Important: this is only a display issue in the
x-uimanagement menu. The panel itself serves the correct certificate and is accessed at the right address — no runtime impact.Issue 2 — "Show Existing Domains" (19 → 4) reports no certificates
That sub-menu (also in
x-ui.sh, around line 1235) hard-codes the search path:It only looks inside
/root/cert/, which is where the panel's own built-in acme.sh workflow stores certificates. Because your cert lives in/etc/letsencrypt/live/, it is invisible to this menu — hence thefind: '/root/cert/': No such file or directorymessage.Workaround (until the display logic is improved)
There is no setting today to specify a "display hostname" independently of the cert path. The practical options are:
news.domain.devia acme.sh. That places the cert in/root/cert/news.domain.de/, after which both the Access URL display and the "Show Existing Domains" menu will work as expected. You would then point the panel settings at the new cert files./root/cert/news.domain.de/and symlink the fullchain/privkey from the Let's Encrypt path into it. This satisfies the hardcoded/root/cert/search without changing your actual cert files:This is a real limitation in the shell script logic: it should use a configurable panel hostname or parse the cert's SANs rather than assuming the folder name equals the access domain. Marking as bug for the maintainers to address.
@MHSanaei commented on GitHub (Jun 11, 2026):
Fixed in
dbee150b. The displayed Access URL was derived from the certificate folder name, which for a multidomain (SAN) certificate is just its first domain. The script now reads the certificate''s actual SAN list, shows the other names the certificate covers, and "Show Existing Domains" also lists the panel''s configured certificate when it lives outside /root/cert (e.g. under /etc/letsencrypt). Will be in the next release.