HAProxy community

Renew wildcard cert

Good Morning,

I have a wildcard certificate created with the following command and it has been running for 2 months without problems:

certbot certonly --manual -d * .mydomain.com --agree-tos --no-bootstrap --manual-public-ip-logging-ok --preferred-challenges dns-01 --server https: // acme- v02.api.letsencrypt.org/directory

The fact is that before I had a HAproxy with normal certificates (not wildcard) and renewed them without problems with a script, but this does not work with the wildcards:

#! / bin / sh

certbot renew

WILDCARD_mydomain = mydomain.com

cd / etc / letsencrypt / live / $ WILDCARD_mydomain
cat fullchain.pem privkey.pem> /etc/haproxy/certs/$WILDCARD_mydomain.pem

Is there any way to renew them automatically using scripts?

Thanks greetings!

It’s possibile if your DNS provider has an API that you Let’s Encrypt client supports.

However, none of this is haproxy related. Please consult documentation/support of your Let’s Encrypt client.

OK thanks!