Answer the question
In order to leave comments, you need to log in
Let's Encrypt + Nginx + Docker, how to update keys?
In general, I created a Docker-compose application, threw SSH keys generated through let's encrypt there, after which 90 days flew by very quickly and the key expired.
The question is how to make the automatic key update inside the container once every n-days? Google issues a solution for the nginx-proxy container, but I have a regular nginx, and rewriting now is at least inconvenient.
What tell me?
Answer the question
In order to leave comments, you need to log in
In the compose file:
services:
...
certbot:
image: certbot/certbot
volumes:
/etc/letsencrypt_docker:/etc/letsencrypt
command: ["renew"]
docker-compose run certbot certonly --web-root=/etc/letsencrypt/challenges -d domain
. server {
server_name some.domain;
...
location /.well-known/acme-challenge {
root /etc/letsencrypt_docker/challenges;
}
}
docker-compose -f /path/to/docker-compose.yml up certbot
Put " certbot-auto renew ; service nginx reload" in the crontab, set it to run once a month.
Of course, you need to properly configure the /.well-known/acme-challenge url in nginx.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question