Skip to content

Instantly share code, notes, and snippets.

@kiransubash
Last active April 24, 2024 03:50
Show Gist options
  • Save kiransubash/6d7dd46f81fa459755b6a568e9d4e4c3 to your computer and use it in GitHub Desktop.
Save kiransubash/6d7dd46f81fa459755b6a568e9d4e4c3 to your computer and use it in GitHub Desktop.
Letsencrypt Details

What files does Letsencrypt create

KEY
privkey.pem is the "key" file

Sometimes it is improperly named as cert.key or example.com.key.

CRT
fullchain.pem is your "crt" file.

Sometimes it is improperly named as example.com.crt.

CRT/KEY Bundle
bundle.pem would be made like so: cat fullchain.pem privkey.pem > bundle.pem

HAProxy is the only server that I know of that uses bundle.pem.

cert.pem
cert.pem contains ONLY your certificate, which can only be used by itself if the browser already has the certificate which signed it, which may work in testing (which makes it seem like it may be the right file), but will actually fail for many of your users in production with a security error of untrusted certificate.

However, you don't generally use the cert.pem by itself. It's almost always coupled with chain.pem as fullchain.pem.

chain.pem
chain.pem is the intermediary signed authority, signed by the root authority - which is what all browsers are guaranteed to have in their pre-built cache.

Checking certs
You can inspect the cert only like so:

openssl x509 -in cert.pem -text -noout
There's a list of useful commands here:

https://www.sslshopper.com/article-most-common-openssl-commands.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment