When using Caddy Server, it stores certificates in ~/.caddy/acme/acme-v01.api.letsencrypt.org/sites/{your domain name}/
3 files are stored in the folder called:
- {yourdomain}.crt
- {yourdomain}.json
- {yourdomain}.key
When using LetsEncrypt's Certbot and Nginx, LetsEncrypt will store its certificates in /etc/letsencrypt/archive/{your domain name}/ with symbolic links to /etc/letsencrypt/live/{your domain name}/ with the following files:
- cert.pem
- chain.pem
- fullchain.pem
- privkey.pem
-
Copy ~/.caddy/acme/acme-v01.api.letsencrypt.org/sites/{yourdomain}/{yourdomain}.crt to cert.pem
-
Copy the Active 'Intermediate Certificate' from https://letsencrypt.org/certificates/ and safe it as chain.pem
-
copy cert.pem + chain.pem in that order to one file called fullchain.pem
-
copy ~/.caddy/acme/acme-v01.api.letsencrypt.org/sites/{yourdomain}/{yourdomain}.key to privkey.pem
You can then use the *.pem files in an Nginx virtual host config file similar to the following:
server {
[..]
location / {
[..]
}
listen 443 ssl;
ssl_certificate /your/chosen/path/to/fullchain.pem;
ssl_certificate_key /your/chosen/path/to/privkey.pem;
include /your/chosen/path/to/options-ssl-nginx.conf;
ssl_dhparam /your/chosen/path/to/ssl-dhparams.pem;
}