The `certificate.exe` utility is used to manage SSL/TLS certificates. Using this utility, you can perform the following tasks: - creating and removing SSL/TLS certificates - assigning certificates to IP addresses - editing certain certificate parameters
## Location `%plesk_cli%`
## Usage
certificate.exe <command> [<certificate name>] [<domain name>] [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]
## Example The following command creates the SSL/TLS certificate named *Site Certificate* in domain’s certificate repository for domain `example.com` by using private key file `D:\keys\keyfile.key,` corresponding certificate file `D:\cert\certfile.cert,` CA certificate file `D:\cert\cacert.cert`, and associates the corresponding certificate signing request file `D:\requests\csreq.csr` with the certificate in Plesk:
plesk bin certificate.exe -c "Site Certificate" -domain example.com -key-file D:\keys\keyfile.key -cert-file D:\cert\cert.cert -cacert-file D:\cert\cacert.cert -csr-file D:\requests\csreq
## Commands

Command

Parameter

Description

Example

--create or -c

<certificate name>

Creates an SSL/TLS certificate in a specified certificate repository (administrator’s or domain’s repository) by using a private key file and a corresponding certificate file.

For information on the options required by the command, refer to the Note below the table.

To create the SSL/TLS certificate named Site Certificate in domain’s certificate repository for the domain example.com by using private key file D:\keys\keyfile.key and certificate file D:\cert\certfile.cert:

plesk bin certificate.exe --create "Site Certificate" -domain example.com -key-file D:\keys\keyfile.key -cert-file D:\cert\certfile.cert

or

plesk bin certificate.exe -c "Site Certificate" -domain example.com -key-file D:\keys\keyfile.key -cert-file D:\cert\certfile.cert

--update or -u

<certificate name>

Changes an existing SSL/TLS certificate’s settings.

To rename the SSL/TLS certification domain example.com from Site Certificate to New Certificate:

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

or

plesk bin certificate.exe -u "Site Certificate" -domain example.com -new-name "New Certificate"

--remove or -r

<certificate name>

Deletes an SSL/TLS certificate from administrator’s or domain’s repository.

To delete the SSL/TLS certificate named Site Certificate from domain example.com:

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

or

plesk bin certificate.exe -r "Site Certificate" -domain example.com

--assign-cert or -ac

<certificate name>

Assigns an SSL/TLS certificate for use with a specific IP address.

Requires the -ip option.

To assign the SSL/TLS certificate named Site Certificate (from the administrator’s repository) for use with the IP address 192.0.2.78:

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

or

plesk bin certificate.exe -ac "Site Certificate" -admin -ip 192.0.2.78

--list or -l

Displays the list of SSL/TLS certificates stored in a specified certificate repository (administrator’s or domain’s repository).

Requires either -domain or -admin option.

To view the list of SSL/TLS certificates stored in the certificates repository on the domain example.com:

plesk bin certificate.exe --list -domain example.com

or

plesk bin certificate.exe -l -domain example.com

--help or -h

Displays help on the use of the utility.

To view help on the use of the certificate utility:

plesk bin certificate.exe --help

or

plesk bin certificate.exe -h

Note The `--create` command requires use of one of the following options combinations: `*`` ``-csr-file`` ``` ``name>`` ``-key-file`` ``` ``name>` `*`` ``-csr-file`` ``` ``name>`` ``-key-file`` ``` ``name>`` ``-cert-file`` ``` ``name>` `*`` ``-csr-file`` ``` ``name>`` ``-key-file`` ``` ``name>`` ``-cert-file`` ``` ``name>`` ``-cacert-file`` ``` ``name>` `*`` ``-key-file`` ``` ``name>`` ``-cert-file`` ``` ``name>`` ``-cacert-file`` ``` ``name>` `*`` ``-key-file`` ``` ``name>`` ``-cert-file`` ``` ``name>`
## Options

Option

Parameter

Description

Example

-domain

<domain name>

Specifies the domain that holds the target certificate repository.

To delete the SSL/TLS certificate named Site Certificate from example.com certificate repository:

plesk bin certificate.exe -r "Site Certificate" -domain example.com

-admin

Specifies the administrator’s certificate repository in Plesk.

To delete the SSL/TLS certificate named Site Certificate from administrator’s certificate repository:

plesk bin certificate.exe -r "Site Certificate" -admin

-default

Sets an SSL/TLS certificate in the administrator’s certificate repository as the administrator’s default certificate.

To set the SSL/TLS certificate named Site Certificate in the administrator’s certificate repository in Plesk as the administrator’s default certificate:

plesk bin certificate.exe -u "Site Certificate" -admin -default

-new-name

<certificate name>

Specifies the new certificate name.

To rename the SSL/TLS certificate in the administrator’s certificate repository in Plesk from Site Certificate to Old Site Certificate:

plesk bin certificate.exe -u "Site Certificate" -admin -new-name "Old Site Certificate"

-key-file

<path>

Specifies the path to the private key file when creating or updating a certificate.

To create the SSL/TLS certificate named Site Certificate in example.com certificate repository by using private key file D:\keys\keyfile.key, corresponding certificate file D:\cert\certfile.cert, CA certificate file D:\cert\cacert.cert, and to associate the corresponding certificate signing request file D:\requests\csreq.csr:

plesk bin certificate.exe -c "Site Certificate" -domain example.com -key-file D:\keys\keyfile.key -cert-file D:\cert\certfile.cert -cacert-file D:\cert\cacert.cert -csr-file D:\requests\csreq

-cert-file

<path>

Specifies the path to the SSL/TLS certificate file when creating or updating a certificate.

-cacert-file

<path>

Specifies the path to the CA certificate file when creating or updating a certificate.

-csr-file

<path>

Specifies the path to the certificate signing request file when creating or updating a certificate.

-ip

<IP address>

Specifies the IP address to which an SSL/TLS certificate is to be assigned.

Used with the --assign-cert command only.

Required by the --assign-cert command.

To assign the SSL/TLS certificate named Site Certificate from the example.com domain’s repository for use with IP address 192.0.2.78:

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

or

plesk bin certificate.exe -ac "Site Certificate" -domain example.com -ip 192.0.2.78