Automate Wildcard LetsEncrypt Certificate Requests on Hetzner Cloud
Lets create a script for automated LetsEncrypt wildcard certificate retrievement.
The workflow and scripts on this page currently works only for Hetzner domains or domains which nameservers are hosted on Hetzner.
Install Certbot and prepare config
Certbot installation
Clone repository
Move config.ini.example to config.ini and set Hetzner DNS token. You can find the token on the DNS page of Hetzner cloud, then Manage API Tokens.
Enter a token name and click on create access token.
The token will only be shown once. Copy it to your clipboard and set it in your config.ini.
Request certificate
First request
The first request requires a mail address and an approval of LetsEncrypt conditions and data protection declarations.
Future requests
The mail address and approval is not needed for future requests.
Do not forget to replace domain.de and *.domain.de with your domains.
Old ACME token removals
You can remove old ACME tokens with this script: