Plesk

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

Question

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

Answer

The certificate utility allows managing client certificates through CLI. This utility allows performing the following tasks:

Creating and removing SSL certificates

Creating:

# plesk bin certificate --create "Site Certificate" -domain example.com -key-file /usr/local/keyfile.key -cert-file /usr/local/cert/certfile.cert

Note: Where keyfile.key is the private key and certfile.cert is the file of the certificate.


Removing:

# plesk bin certificate --remove "Site Certificate" -domain example.com

Assigning certificates to IP addresses

Assigning to the IP address 192.0.2.78:

# plesk bin certificate --assign-cert "Site Certificate" -admin -ip 192.0.2.78

Editing certain certificate parameters

For instance, renaming of a certificate:

# plesk bin certificate --update "Site Certificate" -domain example.com -new-name "New Certificate"

To see all available parameters, run the following:

# plesk bin certificate --help

Additional information about the utility is available in the documentation.

Note: On Linux systems, SSL certificates for Plesk are located in /usr/local/psa/var/certificates/

Additional Information

Securing Plesk and the Mail Server With SSL/TLS Certificates

Exit mobile version