diff --git a/dnsapi2.md b/dnsapi2.md index aa362c7..33c6c47 100644 --- a/dnsapi2.md +++ b/dnsapi2.md @@ -101,6 +101,7 @@ - [177. Use Beget.com DNS API](#dns_beget) - [178. Use FreeMyIP DNS API](#dns_freemyip) - [179. Use Area-7 DNS API](#dns_area7) +- [180. Use HestiaCP DNS API](#dns_hestiacp) - [Use custom API](#dns_myapi) - [Use lexicon DNS API](#dns_lexicon) @@ -2551,6 +2552,35 @@ To issue your certificate run: Report any bugs or issues [here](https://github.com/acmesh-official/acme.sh/issues/6248) + + + +## 180. Use HestiaCP DNS API + +API Key Setup: + 1. Log in to HestiaCP panel as admin or as normal user + 2. Go to Server -> Configure -> API if admin, or click on your profile and click Access Keys above "Edit user" form. + 3. Generate a key pair with "update-dns-records" permission + 4. Copy Host, Access Key, and Secret Key + 5. Login to our HestiaCP server as root, and go to /usr/local/hestia/data/api + 6. The file "update-dns-records" should contain this line in order for this script to work: + ROLE='user' + COMMANDS='v-list-dns-records,v-change-dns-record,v-delete-dns-record,v-add-dns-record' + By default, only v-list-dns-records and v-change-dns-record are enabled which is not enough for this script to work. + +NOTES: +- for wildcard certificates to work, you need to use LetsEncrypt V2 provider, not Alpha ZeroSSL which is default in acme.sh +- You will be able to request SSL certs with this script only for domains that are defined under your user for which you've created the access key/secret key + +Example Usage: +```sh + export HESTIA_HOST="https://panel.domain.com:8083" + export HESTIA_ACCESS="your_access_key" + export HESTIA_SECRET="your_secret_key" + export HESTIA_USER="your_username" + acme.sh --issue -d example.com -d *.example.com --dns dns_hestiacp +``` + ## Use custom API