I am running 2 Piholes on Raspberry Pi's and they are working flawlessly.
TL;DR I want to create .txt records with the API for certbot to update my TLS certs
I recently set up another Raspberry Pi as a homelab CA running step-ca:
This is fantastic too. I have TLS running for my Piholes now, and they renew their certificates every 16 hours via cron. I can't complain. (I am using passive revocation, which is why the certificate lifetime is so short)
One thing I would like to do is to have TLS running on many of my other systems in my homelab. Right now, to update the certificate, I need to use the https-01 challenge, which usually means turning off the web service to host certbot standalone on port 80, then restarting the web service. This is not a problem for the pihole, as the web service is non-critical, so the cron job just stops lighttpd, renews the certificate, and starts it again. This results in a 30 second outage in the interface every 16 hours.
I would like to start using the dns-01 challenge for certbot (or any other ACME client that I use) and to do this, I would need to update the .txt records on the piholes. This means that I would be running regular jobs to update the .txt records on the piholes at all hours of the day.
I believe that using the API makes the most sense to do this as the certbot job will run in cronjobs on the clients - though I am open to other suggestions.
My thought process for my clients (not the piholes) is:
Renew certificate with cron schedule and dns-01 (because of passive revocation).
Push dns-01 with API? Can I push tp my piholes with certbot directly?
Run some other stuff for the cert (service dependent, HUP service to read cert, chmod if needed etc.)