I ran the LE client successfully in Docker. (manual mode) It tells me:
Your account credentials have been saved in your Let’s Encrypt
configuration directory at /etc/letsencrypt. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Let’s
Encrypt so making regular backups of this folder is ideal.
These are in the docker machine, of course. I pulled out the certificates needed to enable HTTPS, so fine. But being new to both Docker and LE, I wasn’t able to figure out how to back up the directory, because file/folder permissions are set to be locked down, and my linux skills are rudimentary.
This morning, my Mac crashed, and the letsencrypt directory is lost. What credentials have been lost, and what will I need to do in 90 days to renew the cert? I couldn’t find any documentation.
Feature request: please make it easy to pull all the cert info out of the docker container!
When you renew your certificate in 90 days, a new account key will be created and validation happens again. It’s just your private account key that’s lost basically, and the certificate history (if you ever need old certificates and keys). You can also recover your account, but I’m not sure if that’s implemented in the client yet.
Usually, you’d just give the Docker container access to your host system in specific directories with the -v flag.
An easy way to handle this in docker is by using a host directory as data volume.
docker run -it --rm --name letsencrypt \
-v "/etc/letsencrypt:/etc/letsencrypt" ........
This way the /etc/letsencrypt folder of your current system is mounted into the docker container to /etc/letsencrypt and all generated files will be written to the filesystem of the host system.