How to use a command-line utility to manage certificates in Plesk?

Comments

4 comments

  • Avatar
    Michael Best

    plesk bin certificate --assign-cert "Site Certificate" -admin example.com -ip 192.0.2.78

    Should be -domain instead of -admin?

    plesk bin certificate --assign-cert "Site Certificate" -domain example.com -ip 192.0.2.78

    0
  • Avatar
    Mikhail Shport

    Hello Unknown User,

    I would like to say that the certificate is taken from the Administrator's repository in this case. This is why it is needed to use -admin
    The details might be found in the documentation.

    0
  • Avatar
    Michael Best (Edited )

    You might think that, but the result of running that command gives output like this message with the bold domain name in red:

    $ plesk bin certificate --assign-cert "Lets Encrypt certificate" -admin example.com -ip 192.0.2.78

    [2023-06-05 07:42:36.314] 2095:647de64c4c81d DEBUG [util_exec] [647de64c4c70c] Starting: filwrpr 74, stdin: 
    [2023-06-05 07:42:36.327] 2095:647de64c4c81d DEBUG [util_exec] [647de64c4c70c] Finished in 0.01108s, Error code: TRUE, stdout: , stderr:

    Unknown option 'example.com': /usr/local/psa/bin/certificate --assign-cert Lets Encrypt certificate -admin example.com -ip 192.0.2.78

     

    I believe its wrong in that documentation as well, and the -admin is for setting the admin certificate like this (or something has changed in how the command works internally causing it to throw an error now):

    $ plesk bin certificate -r "Site Certificate" -admin

     

     

    0
  • Avatar
    Mikhail Shport

    Hello Unknown User,

    I have tested the utility from my end. Indeed, it is a mistake in the documentation.
    The article has been adjusted. Also, I will report it to the responsible team in order to review the documentation as well.

    Thank you for bringing our attention to this fact.

    0

Please sign in to leave a comment.

Have more questions? Submit a request