Skip to content
Marvo2011 edited this page Sep 8, 2022 · 15 revisions

151. Use Selfhost DNS API

  • create a new TXT record for a subdomainname with the needed prefix e.g. "_acme-challenge.example.com" (default) or "alias.example.com" (dns alias mode)
    • for wildcard subdomains add a second TXT record for the identical subdomainname
  • edit the TXT record and note the ID in (...) behind the subdomainname
  • export each subdomainname (including the prefix) and the corresponding record IDs in SELFHOSTDNS_MAP like "subdomainname:RID1:RID2"
    • at least one RID must be set, up to two are supported for wildcard subdomains
    • each entry must be seperated by a space
  • export username and password in SELFHOSTDNS_USERNAME and SELFHOSTDNS_PASSWORD

Note: For username you have to use your account / customer number. You can find them in any invoice or on the right top of the selfhost dashboard.

export SELFHOSTDNS_USERNAME="myname"
export SELFHOSTDNS_PASSWORD="mypass"
export SELFHOSTDNS_MAP="_acme-challenge.example.com:12345:98765 alias.example.com:11111"

acme.sh --issue -d example.com --dns dns_selfhost
Clone this wiki locally