Generate a CSR/Key pair with openssl (linux)

Command #

openssl req -new -newkey rsa:2048 -nodes -keyout -out

That will create a key and a csr, make sure you backup the key somewhere secure and you can use the CSR to get a certificate from a CA, then you can throw it. The CRT part that you will get is the public part so it is not as important.

Footnote #

The most important part is the CN, it should be your url or your machine name, the rest is just whatever I think, but it's still good to put the correct information if you will deploy to production, else for local testing you can skip those questions, but I'm not sure


Since you've made it this far, sharing this article on your favorite social media network would be highly appreciated 💖! For feedback, please ping me on Twitter.