Skip to content

bug: SSL setup flow reports false success and does not reuse existing domain cert for panel binding #4002

@Kookiejarz

Description

@Kookiejarz

Describe the bug

When setting up SSL with Domain mode during install/update, if a cert already exists in acme.sh, the script may:

  1. abort domain issuance flow early (System already has certificates for this domain. Cannot issue again.)
  2. still print a later success line (✓ SSL certificate configured successfully with domain: ...)
  3. leave panel cert binding incomplete unless user manually sets cert paths.

This creates contradictory output and broken UX for reinstall scenarios.

How to repeat the problem?

For issuing new domain certs:

  1. Run install/update interactive flow.

  2. Choose SSL option 1 (Domain).

  3. Enter the domain.

  4. Select n when popup: Would you like to modify --reloadcmd for ACME? (y/n): n

  5. Ensure domain cert already exists in acme:

    • domain appears in ~/.acme.sh/acme.sh --list
  6. Run install/update interactive flow.

  7. Choose SSL option 1 (Domain).

  8. Enter the same existing domain.

Expected action

If cert already exists, script should reuse it and continue installation/binding flow.

Success message should be printed only when SSL setup truly succeeded. installcert should not be treated as failed solely due to reloadcmd non-zero if cert files were installed.

Received action

SSL cert was not installed to the panel.

3x-ui Version

2.8.11

Xray-core Version

26.2.6

Checklist

  • This bug report is written entirely in English.
  • This bug report is new and no one has reported it before me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions