Automated TLS certificate rotation with certbot #1404
-
Hello, I'm trying to think about automatic tls cert rotation with my nginx-unit server. I have read the instructions at https://unit.nginx.org/howto/certbot/ but I don't understand the "temporary route" for the webroot method. How is it temporary? In particular, how can I update my TLS cert without shutting down the server? Port 80 is already serving my litestar app. In this letsencrypt forums answer you can see how to use certbots I was hoping I could use this hook without having to shut down my server. Is this possible? Is it a bad idea? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi there, Thanks for getting in touch! I'm going to tackle different parts of your questions in sections. The temporary routeThe word "temporary" there is sort of a misnomer. The reason it's temporary is because technically we only need this until certbot is happy that it can reach the token file on that route and issues the certificates. After that we could remove the routing to the Certbot uses Let's Encrypt's HTTP-01 challenge here. In order to do this without shutting down Unit:
Using the
|
Beta Was this translation helpful? Give feedback.
-
Just to say it's better to run the job weekly, that way if it randomly fails for some reason, you won't end up with an expired certificate. (That's certainly what I do...) |
Beta Was this translation helpful? Give feedback.
Hi there,
Thanks for getting in touch! I'm going to tackle different parts of your questions in sections.
The temporary route
The word "temporary" there is sort of a misnomer. The reason it's temporary is because technically we only need this until certbot is happy that it can reach the token file on that route and issues the certificates. After that we could remove the routing to the
.well-known
path. We don't have to, because it's useful to keep it around when renewal and rollover comes around.Certbot uses Let's Encrypt's HTTP-01 challenge here.
In order to do this without shutting down Unit: