About TLS Certificate Files

TLS or SSL certificates, used for HTTPS connections, involve key files and public certificates to ensure secure communication.

With mkcert for local setup, two files are typically created:

  • localhost.pem: Contains the public certificate for your server.
  • localhost-key.pem: Contains the private key, which must be kept secret.

With Let's Encrypt, you often see three files:

  • cert.pem: The server's public certificate.
  • privkey.pem: The private key for decrypting and signing.
  • chain.pem: Intermediate certificates that link your server’s certificate to a trusted root CA.

Additionally, Let's Encrypt offers fullchain.pem, combining cert.pem and chain.pem for convenience in server setups. Mkcert is great for local development, while Let's Encrypt is suited for production use.

Tips and Tricks Dev Ops Security HTTPS Let's Encrypt SSL mkcert TLS