I use Ubuntu 16.04 with Nginx for my web server. I setup my website SSL with Let's Encrypt. And I want to get private, public key pair of Let's Encrypt.
Can someone point out where those files exist?
I use Ubuntu 16.04 with Nginx for my web server. I setup my website SSL with Let's Encrypt. And I want to get private, public key pair of Let's Encrypt.
Can someone point out where those files exist?
For Nginx you need to check the /etc/nginx/sites-enabled directory for the configuration file of your website (there might be multiple files).
Then you need to check their contents for configuration lines:
ssl_certificate which will point to the certificate chain (fullchain.pem)ssl_certificate_key which will point to the private key (privkey.pem).Finally you should use openssl command to extract the public key from the certificate chain file:
openssl rsa -in <path_to_privkey.pem> -pubout > key.pub
BEGIN CERTIFICATE and END CERTIFICATE format. @techraf
– Dolphin
Dec 17 '21 at 09:52
certonlyoption (don't want 3rd party messing w/ my webserver config, although I use apache not nginx) and so my stuff ends up under/etc/letsencrypt/example.com/livewhich are just symlinks to the actual certificates (archive versions, LE keeps several old versions for you automatically) – ivanivan Dec 12 '17 at 03:34