mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-12-03 21:18:19 +07:00
[GH-ISSUE #5009] [Bug]: Cannot fully delete a cert domain #3524
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#3524
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 @Michael-YS on GitHub (Jun 6, 2026).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/5009
Describe the bug
I was trying to switch my panel access from public net to tailscale, which I get a .<tailnet_name>.ts.net magic url to use. So I tried to switch. However, it seems like there is no way I could delete the previous domain and its certificates. The only option in the x-ui script is to revoke it.
How to reproduce the problem
sudo x-uiSSL Certificate ManagementExpected behavior
No response
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
Ubuntu 24.04 LTS
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?
None
Before submitting
@github-actions[bot] commented on GitHub (Jun 6, 2026):
Thanks for the clear report. This is a confirmed gap in the SSL Certificate Management menu.
What the menu currently offers (option 19)
Looking at
x-ui.sh,ssl_cert_issue_main()only provides:There is no "Delete" option. The Revoke option only calls
acme.sh --revoke -d <domain>— it notifies Let's Encrypt to revoke the cert, but leaves local files under/root/cert/<domain>/, leaves acme.sh's internal tracking state under~/.acme.sh/<domain>, and does not clear the panel's configured cert paths from the database.Workaround — manually clean up the old domain
Run these commands on your server (replace
<old-domain>with your previous domain):Step 3 (
x-ui cert -reset) callsupdateCert("", "")internally, which clearswebCertFile,webKeyFile,subCertFile, andsubKeyFilein the DB — the panel will stop attempting to serve TLS with the old cert.Note for Tailscale
If you're switching to a
<hostname>.<tailnet>.ts.netmagic DNS address, the panel will be accessible over Tailscale's encrypted tunnel without needing a separate certificate. You can leave the panel in HTTP-only mode within your Tailnet, or look into Tailscale's HTTPS certificate feature (tailscale cert) if you want a valid TLS cert for your ts.net hostname.A Delete option in the menu (combining the three cleanup steps above) would be a straightforward and useful addition. PRs are welcome!
@MHSanaei commented on GitHub (Jun 11, 2026):
Fixed in
8ce61f3c. The certificate menu option is now "Revoke & Remove": it revokes via acme.sh, removes the acme.sh tracking/state directories (including the_eccvariant), deletes the local files under/root/cert/<domain>, and resets the panel cert paths if that domain was in use. Included in v3.3.0.