How do I select the default Renew & replace the certificate during the command?

In the following command, I want to put the option I want by default
certbot certonly --manual --preferred-challenges http -d

Renew & replace the certificate it's my default answer.

Why would you want that? That's a very, VERY bad idea.

1 Like

I want to write a script that will be done automatically a 3 month.
use docker Nginx. I have to do part of it manually

If the certificate is due for renewal (which it probably is after 3 months, as the cert is only valid for that same 3 months), Certbot wouldn't/shouldn't ask you this question. It's only asked if the certificate is not due for renewal yet. And as certificates are due for renewal after 60 days already, you wouldn't get this question to begin with.


certbot renew


@rg305 That's not possible with --manual without hooks.


I'm not an expert for nginx with docker but couldn't you map a volume on the docker host so that certbot writes its http challenge files to the website filesystem that nginx is using? That would take care of presenting the http challenge.

If you also map a host volume for the certificate file locations then your nginx can just pickup the renewed certificate from that (you would still need to periodically reload nginx in your container I think, in order to pickup the latest certificate info if the container is running for weeks/months).


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.