Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Generate A CSR

To generate a Certificate Signing Request (CSR), simply use the following command:


openssl req -new -newkey \
  rsa:2048 \
  -keyout $MY_SITE.key \
  -out $MY_SITE.csr

Make sure to remember the password you use to encrypt the CSR, but you do not need to set the "challenge password".

Copy and paste the contents of the newly generated .csr file into the web form and select "PKI" before entering the password you used to encrypt the CSR.

~~Copy the private key given to you by StartCom, and replace the contents of your .key file with it.~~

Now decrypt the private key file with:


openssl rsa \
  -in $MY_SITE.key \
  -out $MY_SITE.decrypted.key

Now download the certificate bundle from StartCom. You will need the certificates provided by the site, along with the decrypted file in your Apache/Nginx configuration.

Last updated: 13th February 2021
First published: 16th August 2018