I changed from a certificate with multiple explicitly defined subdomains to a wildcard certificate. For this to work, the DNS-01 challenge needs to be solved. I have a very basic unbound DNS server running (authoritative). The unbound server is on the same machine where certbot and an nginx webserver resides.
With the following command I could successfully create and authorize a wildcard certificate, but I had to manually create the TXT record in the DNS server:
sudo certbot certonly --manual --preferred-challenges dns --email mail@example.com --server https://acme-v02.api.letsencrypt.org/directory --agree-tos -d *.example.com -d example.com -v
My goal is to fully automate the renewal process of this certificate. The "certbot renew" command should automatically create the TXT record with the challenge token as content in my previously setup unbound DNS server.
What do I need to do in order to achieve this?