By John O'Rourke for GetConnect
This is a hook allowing dehydrated, the simple ACME/LetsEncrypt client, to create Digital Ocean DNS records for SSL Certificate verification.
Based on https://github.com/silkeh/pdns_api.sh
License: EUPL 1.2
DNS-based SSL certificate verification is useful for wildcard certificates.
-
Create a Digital Ocean token here: https://cloud.digitalocean.com/account/api/tokens
-
set it as an environment variable:
export DIGITALOCEAN_TOKEN=xxxxxxxxxxxxxxxxx
- Run dehydrated (example)
dehydrated --cron --hook /path/to/this/script.sh --accept-terms --challenge dns --domain www.mywebsite.com
Create a text file in the format described here
eg.
servers.mydomain.com *.servers.mydomain.com
Then point dehydrated at that file:
dehydrated --cron --hook /path/to/this/script.sh --accept-terms --challenge dns --domains-txt /path/to/your/domains.txt