]> git.proxmox.com Git - mirror_acme.sh.git/blame - dnsapi/README.md
Merge pull request #2047 from Neilpang/dev
[mirror_acme.sh.git] / dnsapi / README.md
CommitLineData
d20831e4 1# How to use DNS API
39c6df29 2
cd3ef8fa 3If your dns provider doesn't provide api access, you can use our dns alias mode:
681e3785 4
5https://github.com/Neilpang/acme.sh/wiki/DNS-alias-mode
6
d20831e4 7## 1. Use CloudFlare domain API to automatically issue cert
39c6df29 8
cd3ef8fa 9First you need to login to your CloudFlare account to get your [API key](https://dash.cloudflare.com/profile).
39c6df29 10
11```
12export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
39c6df29 13export CF_Email="xxxx@sss.com"
39c6df29 14```
15
d20831e4 16Ok, let's issue a cert now:
39c6df29 17```
d20831e4 18acme.sh --issue --dns dns_cf -d example.com -d www.example.com
39c6df29 19```
20
d20831e4 21The `CF_Key` and `CF_Email` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
39c6df29 22
23
d20831e4 24## 2. Use DNSPod.cn domain API to automatically issue cert
39c6df29 25
d20831e4 26First you need to login to your DNSPod account to get your API Key and ID.
39c6df29 27
28```
29export DP_Id="1234"
39c6df29 30export DP_Key="sADDsdasdgdsf"
39c6df29 31```
32
d20831e4 33Ok, let's issue a cert now:
39c6df29 34```
d20831e4 35acme.sh --issue --dns dns_dp -d example.com -d www.example.com
39c6df29 36```
37
d20831e4 38The `DP_Id` and `DP_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
39c6df29 39
39c6df29 40
d20831e4 41## 3. Use CloudXNS.com domain API to automatically issue cert
39c6df29 42
d20831e4 43First you need to login to your CloudXNS account to get your API Key and Secret.
39c6df29 44
45```
46export CX_Key="1234"
86c9e55c 47export CX_Secret="sADDsdasdgdsf"
39c6df29 48```
49
d20831e4 50Ok, let's issue a cert now:
39c6df29 51```
d20831e4 52acme.sh --issue --dns dns_cx -d example.com -d www.example.com
39c6df29 53```
54
d20831e4 55The `CX_Key` and `CX_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
39c6df29 56
57
d20831e4 58## 4. Use GoDaddy.com domain API to automatically issue cert
30de13b4 59
d20831e4 60First you need to login to your GoDaddy account to get your API Key and Secret.
30de13b4 61
62https://developer.godaddy.com/keys/
63
d20831e4 64Please create a Production key, instead of a Test key.
30de13b4 65
66```
67export GD_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
30de13b4 68export GD_Secret="asdfsdafdsfdsfdsfdsfdsafd"
30de13b4 69```
70
d20831e4 71Ok, let's issue a cert now:
30de13b4 72```
d20831e4 73acme.sh --issue --dns dns_gd -d example.com -d www.example.com
30de13b4 74```
75
d20831e4 76The `GD_Key` and `GD_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
30de13b4 77
d6f0c2b5 78
d20831e4 79## 5. Use PowerDNS embedded API to automatically issue cert
d6f0c2b5 80
d20831e4 81First you need to login to your PowerDNS account to enable the API and set your API-Token in the configuration.
d6f0c2b5
MZ
82
83https://doc.powerdns.com/md/httpapi/README/
84
85```
86export PDNS_Url="http://ns.example.com:8081"
87export PDNS_ServerId="localhost"
88export PDNS_Token="0123456789ABCDEF"
89export PDNS_Ttl=60
d6f0c2b5
MZ
90```
91
d20831e4 92Ok, let's issue a cert now:
d6f0c2b5 93```
d20831e4 94acme.sh --issue --dns dns_pdns -d example.com -d www.example.com
d6f0c2b5
MZ
95```
96
d20831e4 97The `PDNS_Url`, `PDNS_ServerId`, `PDNS_Token` and `PDNS_Ttl` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
d6f0c2b5 98
13ffa170 99
d20831e4 100## 6. Use OVH/kimsufi/soyoustart/runabove API to automatically issue cert
30de13b4 101
73ba54a5 102https://github.com/Neilpang/acme.sh/wiki/How-to-use-OVH-domain-api
39c6df29 103
d20831e4 104
9882f342 105## 7. Use nsupdate to automatically issue cert
13ffa170
PK
106
107First, generate a key for updating the zone
108```
109b=$(dnssec-keygen -a hmac-sha512 -b 512 -n USER -K /tmp foo)
110cat > /etc/named/keys/update.key <<EOF
111key "update" {
112 algorithm hmac-sha512;
113 secret "$(awk '/^Key/{print $2}' /tmp/$b.private)";
114};
115EOF
116rm -f /tmp/$b.{private,key}
117```
118
119Include this key in your named configuration
120```
121include "/etc/named/keys/update.key";
122```
123
124Next, configure your zone to allow dynamic updates.
d20831e4 125
13ffa170
PK
126Depending on your named version, use either
127```
128zone "example.com" {
129 type master;
130 allow-update { key "update"; };
131};
132```
133or
134```
135zone "example.com" {
136 type master;
137 update-policy {
138 grant update subdomain example.com.;
139 };
140}
141```
d20831e4
AL
142
143Finally, make the DNS server and update Key available to `acme.sh`
144
13ffa170 145```
d20831e4 146export NSUPDATE_SERVER="dns.example.com"
7eea9533 147export NSUPDATE_KEY="/path/to/your/nsupdate.key"
13ffa170 148```
1a774909
DD
149and optionally (depending on DNS server)
150```
151export NSUPDATE_ZONE="example.com"
152```
13ffa170 153
d20831e4 154Ok, let's issue a cert now:
13ffa170 155```
d20831e4 156acme.sh --issue --dns dns_nsupdate -d example.com -d www.example.com
13ffa170
PK
157```
158
1a774909 159The `NSUPDATE_SERVER`, `NSUPDATE_KEY`, and `NSUPDATE_ZONE` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
d20831e4 160
13ffa170 161
9882f342 162## 8. Use LuaDNS domain API
f58e83ee 163
164Get your API token at https://api.luadns.com/settings
165
166```
167export LUA_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
f58e83ee 168export LUA_Email="xxxx@sss.com"
f58e83ee 169```
170
171To issue a cert:
172```
d20831e4 173acme.sh --issue --dns dns_lua -d example.com -d www.example.com
f58e83ee 174```
175
d20831e4
AL
176The `LUA_Key` and `LUA_Email` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
177
f58e83ee 178
9882f342 179## 9. Use DNSMadeEasy domain API
b9091e14 180
181Get your API credentials at https://cp.dnsmadeeasy.com/account/info
182
183```
184export ME_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
b9091e14 185export ME_Secret="qdfqsdfkjdskfj"
b9091e14 186```
187
188To issue a cert:
189```
d20831e4 190acme.sh --issue --dns dns_me -d example.com -d www.example.com
b9091e14 191```
192
d20831e4
AL
193The `ME_Key` and `ME_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
194
b9091e14 195
5b771039 196## 10. Use Amazon Route53 domain API
197
198https://github.com/Neilpang/acme.sh/wiki/How-to-use-Amazon-Route53-API
199
200```
201export AWS_ACCESS_KEY_ID=XXXXXXXXXX
202export AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXX
203```
204
205To issue a cert:
206```
207acme.sh --issue --dns dns_aws -d example.com -d www.example.com
208```
209
210The `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
211
be39ab32 212## 11. Use Aliyun domain API to automatically issue cert
213
214First you need to login to your Aliyun account to get your API key.
215[https://ak-console.aliyun.com/#/accesskey](https://ak-console.aliyun.com/#/accesskey)
216
217```
218export Ali_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
219export Ali_Secret="jlsdflanljkljlfdsaklkjflsa"
220```
221
222Ok, let's issue a cert now:
223```
224acme.sh --issue --dns dns_ali -d example.com -d www.example.com
225```
226
227The `Ali_Key` and `Ali_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
228
192ede5e 229## 12. Use ISPConfig 3.1 API
230
231This only works for ISPConfig 3.1 (and newer).
232
233Create a Remote User in the ISPConfig Control Panel. The Remote User must have access to at least `DNS zone functions` and `DNS txt functions`.
234
235```
236export ISPC_User="xxx"
237export ISPC_Password="xxx"
238export ISPC_Api="https://ispc.domain.tld:8080/remote/json.php"
239export ISPC_Api_Insecure=1
240```
241If you have installed ISPConfig on a different port, then alter the 8080 accordingly.
242Leaver ISPC_Api_Insecure set to 1 if you have not a valid ssl cert for your installation. Change it to 0 if you have a valid ssl cert.
243
244To issue a cert:
245```
246acme.sh --issue --dns dns_ispconfig -d example.com -d www.example.com
247```
248
249The `ISPC_User`, `ISPC_Password`, `ISPC_Api`and `ISPC_Api_Insecure` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
250
180f05f6
PK
251## 13. Use Alwaysdata domain API
252
253First you need to login to your Alwaysdata account to get your API Key.
254
255```sh
256export AD_API_KEY="myalwaysdataapikey"
257```
258
259Ok, let's issue a cert now:
260
261```sh
262acme.sh --issue --dns dns_ad -d example.com -d www.example.com
263```
264
265The `AD_API_KEY` will be saved in `~/.acme.sh/account.conf` and will be reused
266when needed.
267
38f23343
PG
268## 14. Use Linode domain API
269
c8c1140f
AS
270The tokens created in the classic manager and cloud manager are incompatible
271with one another. While the classic manager makes an all or nothing API, the
272newer cloud manager interface promises to produce API keys with a finer
273permission system. However, either way works just fine.
274
275### Classic Manager ###
276
277Classic Manager: https://manager.linode.com/profile/api
278
dd17ac50 279First you need to login to your Linode account to get your API Key.
38f23343 280
c8c1140f
AS
281Then add an API key with label *ACME* and copy the new key into the following
282command.
38f23343 283
dd17ac50
PG
284```sh
285export LINODE_API_KEY="..."
38f23343
PG
286```
287
c8c1140f
AS
288Due to the reload time of any changes in the DNS records, we have to use the
289`dnssleep` option to wait at least 15 minutes for the changes to take effect.
38f23343 290
dd17ac50
PG
291Ok, let's issue a cert now:
292
38f23343
PG
293```sh
294acme.sh --issue --dns dns_linode --dnssleep 900 -d example.com -d www.example.com
295```
296
c8c1140f
AS
297The `LINODE_API_KEY` will be saved in `~/.acme.sh/account.conf` and will be
298reused when needed.
299
300### Cloud Manager ###
301
302Cloud Manager: https://cloud.linode.com/profile/tokens
303
304First you need to login to your Linode account to get your API Key.
305
306 1. Click on "Add a Personal Access Token".
307 2. Give the new key a "Label" (we recommend *ACME*)
308 3. Give it Read/Write access to "Domains"
309 4. "Submit" and copy the new key into the `LINODE_V4_API_KEY` command below.
310
311```sh
312export LINODE_V4_API_KEY="..."
313```
314
315Due to the reload time of any changes in the DNS records, we have to use the
316`dnssleep` option to wait at least 15 minutes for the changes to take effect.
317
318Ok, let's issue a cert now:
319
320```sh
321acme.sh --issue --dns dns_linode_v4 --dnssleep 900 -d example.com -d www.example.com
322```
323
324The `LINODE_V4_API_KEY` will be saved in `~/.acme.sh/account.conf` and will be
325reused when needed.
dd17ac50 326
e6b940e2 327## 15. Use FreeDNS
0aed065a
DK
328
329FreeDNS (https://freedns.afraid.org/) does not provide an API to update DNS records (other than IPv4 and IPv6
330dynamic DNS addresses). The acme.sh plugin therefore retrieves and updates domain TXT records by logging
331into the FreeDNS website to read the HTML and posting updates as HTTP. The plugin needs to know your
332userid and password for the FreeDNS website.
333
334```sh
335export FREEDNS_User="..."
336export FREEDNS_Password="..."
337```
338
339You need only provide this the first time you run the acme.sh client with FreeDNS validation and then again
340whenever you change your password at the FreeDNS site. The acme.sh FreeDNS plugin does not store your userid
341or password but rather saves an authentication token returned by FreeDNS in `~/.acme.sh/account.conf` and
342reuses that when needed.
343
344Now you can issue a certificate.
345
346```sh
e6b940e2 347acme.sh --issue --dns dns_freedns -d example.com -d www.example.com
0aed065a
DK
348```
349
f78b656f 350Note that you cannot use acme.sh automatic DNS validation for FreeDNS public domains or for a subdomain that
3d22708f 351you create under a FreeDNS public domain. You must own the top level domain in order to automatically
f78b656f
DK
352validate with acme.sh at FreeDNS.
353
edfefb67
AL
354## 16. Use cyon.ch
355
356You only need to set your cyon.ch login credentials.
357If you also have 2 Factor Authentication (OTP) enabled, you need to set your secret token too and have `oathtool` installed.
358
359```
afa3fc8b
AL
360export CY_Username="your_cyon_username"
361export CY_Password="your_cyon_password"
362export CY_OTP_Secret="your_otp_secret" # Only required if using 2FA
edfefb67
AL
363```
364
365To issue a cert:
366```
367acme.sh --issue --dns dns_cyon -d example.com -d www.example.com
368```
369
afa3fc8b 370The `CY_Username`, `CY_Password` and `CY_OTP_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
edfefb67 371
3d6a125b
SS
372## 17. Use Domain-Offensive/Resellerinterface/Domainrobot API
373
fbd8ab47 374ATTENTION: You need to be a registered Reseller to be able to use the ResellerInterface. As a normal user you can not use this method.
375
3d6a125b
SS
376You will need your login credentials (Partner ID+Password) to the Resellerinterface, and export them before you run `acme.sh`:
377```
378export DO_PID="KD-1234567"
379export DO_PW="cdfkjl3n2"
380```
381
382Ok, let's issue a cert now:
383```
384acme.sh --issue --dns dns_do -d example.com -d www.example.com
385```
386
fab2d9dc
FC
387## 18. Use Gandi LiveDNS API
388
9683ffe1 389You must enable the new Gandi LiveDNS API first and the create your api key, See: http://doc.livedns.gandi.net/
390
fab2d9dc
FC
391```
392export GANDI_LIVEDNS_KEY="fdmlfsdklmfdkmqsdfk"
393```
394
395Ok, let's issue a cert now:
396```
397acme.sh --issue --dns dns_gandi_livedns -d example.com -d www.example.com
398```
399
9c87a589 400## 19. Use Knot (knsupdate) DNS API to automatically issue cert
401
402First, generate a TSIG key for updating the zone.
403
404```
7f59d7ea 405keymgr tsig generate -t acme_key hmac-sha512 > /etc/knot/acme.key
9c87a589 406```
407
408Include this key in your knot configuration file.
409
410```
411include: /etc/knot/acme.key
412```
413
414Next, configure your zone to allow dynamic updates.
415
416Dynamic updates for the zone are allowed via proper ACL rule with the `update` action. For in-depth instructions, please see [Knot DNS's documentation](https://www.knot-dns.cz/documentation/).
417
418```
419acl:
420 - id: acme_acl
421 address: 192.168.1.0/24
422 key: acme_key
423 action: update
424
425zone:
426 - domain: example.com
427 file: example.com.zone
428 acl: acme_acl
429```
430
431Finally, make the DNS server and TSIG Key available to `acme.sh`
432
433```
434export KNOT_SERVER="dns.example.com"
435export KNOT_KEY=`grep \# /etc/knot/acme.key | cut -d' ' -f2`
436```
437
438Ok, let's issue a cert now:
439```
440acme.sh --issue --dns dns_knot -d example.com -d www.example.com
441```
442
443The `KNOT_SERVER` and `KNOT_KEY` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
444
ac690fce 445## 20. Use DigitalOcean API (native)
446
447You need to obtain a read and write capable API key from your DigitalOcean account. See: https://www.digitalocean.com/help/api/
448
449```
450export DO_API_KEY="75310dc4ca779ac39a19f6355db573b49ce92ae126553ebd61ac3a3ae34834cc"
451```
452
453Ok, let's issue a cert now:
454```
455acme.sh --issue --dns dns_dgon -d example.com -d www.example.com
456```
457
3e9478b5 458## 21. Use ClouDNS.net API
3b7fbcd0 459
212d0f24 460You need to set the HTTP API user ID and password credentials. See: https://www.cloudns.net/wiki/article/42/. For security reasons, it's recommended to use a sub user ID that only has access to the necessary zones, as a regular API user has access to your entire account.
3b7fbcd0 461
462```
212d0f24
DLN
463# Use this for a sub auth ID
464export CLOUDNS_SUB_AUTH_ID=XXXXX
465# Use this for a regular auth ID
466#export CLOUDNS_AUTH_ID=XXXXX
3b7fbcd0 467export CLOUDNS_AUTH_PASSWORD="YYYYYYYYY"
468```
469
470Ok, let's issue a cert now:
471```
472acme.sh --issue --dns dns_cloudns -d example.com -d www.example.com
473```
ee56b9cd 474The `CLOUDNS_AUTH_ID` and `CLOUDNS_AUTH_PASSWORD` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
3b7fbcd0 475
d0392950 476## 22. Use Infoblox API
1994c682 477
d0392950 478First you need to create/obtain API credentials on your Infoblox appliance.
1994c682 479
d0392950
J
480```
481export Infoblox_Creds="username:password"
482export Infoblox_Server="ip or fqdn of infoblox appliance"
483```
1994c682 484
d0392950
J
485Ok, let's issue a cert now:
486```
487acme.sh --issue --dns dns_infoblox -d example.com -d www.example.com
488```
1994c682 489
d0392950
J
490Note: This script will automatically create and delete the ephemeral txt record.
491The `Infoblox_Creds` and `Infoblox_Server` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
492
a6e5876d 493
494## 23. Use VSCALE API
1994c682 495
a6e5876d 496First you need to create/obtain API tokens on your [settings panel](https://vscale.io/panel/settings/tokens/).
1994c682 497
a6e5876d 498```
4b581f37 499export VSCALE_API_KEY="sdfsdfsdfljlbjkljlkjsdfoiwje"
a6e5876d 500```
1994c682 501
a6e5876d 502Ok, let's issue a cert now:
503```
504acme.sh --issue --dns dns_vscale -d example.com -d www.example.com
505```
506
507## 24. Use Dynu API
afb67d37 508
509First you need to create/obtain API credentials from your Dynu account. See: https://www.dynu.com/resources/api/documentation
510
511```
512export Dynu_ClientId="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
513export Dynu_Secret="yyyyyyyyyyyyyyyyyyyyyyyyy"
514```
515
516Ok, let's issue a cert now:
517```
518acme.sh --issue --dns dns_dynu -d example.com -d www.example.com
519```
520
521The `Dynu_ClientId` and `Dynu_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
522
1994c682
MT
523## 25. Use DNSimple API
524
525First you need to login to your DNSimple account and generate a new oauth token.
526
527https://dnsimple.com/a/{your account id}/account/access_tokens
528
529Note that this is an _account_ token and not a user token. The account token is
530needed to infer the `account_id` used in requests. A user token will not be able
531to determine the correct account to use.
532
533```
534export DNSimple_OAUTH_TOKEN="sdfsdfsdfljlbjkljlkjsdfoiwje"
535```
536
537To issue the cert just specify the `dns_dnsimple` API.
538
539```
540acme.sh --issue --dns dns_dnsimple -d example.com
541```
542
543The `DNSimple_OAUTH_TOKEN` will be saved in `~/.acme.sh/account.conf` and will
544be reused when needed.
27a05ff2 545
2b092539
MT
546If you have any issues with this integration please report them to
547https://github.com/pho3nixf1re/acme.sh/issues.
548
dff641a6 549## 26. Use NS1.com API
5e3a5f62 550
551```
552export NS1_Key="fdmlfsdklmfdkmqsdfk"
553```
554
555Ok, let's issue a cert now:
556```
557acme.sh --issue --dns dns_nsone -d example.com -d www.example.com
558```
559
1a504118
R
560## 27. Use DuckDNS.org API
561
562```
563export DuckDNS_Token="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
564```
565
2c83224f 566Please note that since DuckDNS uses StartSSL as their cert provider, thus
96801e34 567--insecure may need to be used when issuing certs:
1a504118
R
568```
569acme.sh --insecure --issue --dns dns_duckdns -d mydomain.duckdns.org
570```
571
1a504118
R
572For issues, please report to https://github.com/raidenii/acme.sh/issues.
573
574## 28. Use Name.com API
575
ba9e7fbf
JG
576Create your API token here: https://www.name.com/account/settings/api
577
578Note: `Namecom_Username` should be your Name.com username and not the token name. If you accidentally run the script with the token name as the username see `~/.acme.sh/account.conf` to fix the issue
3002f6df 579
333090a9 580```
1a504118
R
581export Namecom_Username="testuser"
582export Namecom_Token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
583```
584
585And now you can issue certs with:
333090a9 586
1a504118
R
587```
588acme.sh --issue --dns dns_namecom -d example.com -d www.example.com
589```
590
591For issues, please report to https://github.com/raidenii/acme.sh/issues.
592
42b2adc0
LA
593## 29. Use Dyn Managed DNS API to automatically issue cert
594
595First, login to your Dyn Managed DNS account: https://portal.dynect.net/login/
596
597It is recommended to add a new user specific for API access.
598
599The minimum "Zones & Records Permissions" required are:
600```
601RecordAdd
602RecordUpdate
603RecordDelete
604RecordGet
605ZoneGet
606ZoneAddNode
607ZoneRemoveNode
608ZonePublish
609```
610
611Pass the API user credentials to the environment:
612```
613export DYN_Customer="customer"
614export DYN_Username="apiuser"
615export DYN_Password="secret"
616```
617
618Ok, let's issue a cert now:
619```
620acme.sh --issue --dns dns_dyn -d example.com -d www.example.com
621```
622
623The `DYN_Customer`, `DYN_Username` and `DYN_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
624
ae302ee6
VB
625## 30. Use pdd.yandex.ru API
626
627```
628export PDD_Token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
629```
630
631Follow these instructions to get the token for your domain https://tech.yandex.com/domain/doc/concepts/access-docpage/
632```
633acme.sh --issue --dns dns_yandex -d mydomain.example.org
634```
635
636For issues, please report to https://github.com/non7top/acme.sh/issues.
42b2adc0 637
5c3b41bd 638## 31. Use Hurricane Electric
7d64e141 639
2655e726 640Hurricane Electric (https://dns.he.net/) doesn't have an API so just set your login credentials like so:
7d64e141
OS
641
642```
643export HE_Username="yourusername"
644export HE_Password="password"
645```
646
647Then you can issue your certificate:
648
649```
650acme.sh --issue --dns dns_he -d example.com -d www.example.com
651```
652
653The `HE_Username` and `HE_Password` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
654
655Please report any issues to https://github.com/angel333/acme.sh or to <me@ondrejsimek.com>.
42b2adc0 656
78712245
A
657## 32. Use UnoEuro API to automatically issue cert
658
659First you need to login to your UnoEuro account to get your API key.
660
661```
fb6e0658
A
662export UNO_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
663export UNO_User="UExxxxxx"
78712245
A
664```
665
666Ok, let's issue a cert now:
667```
668acme.sh --issue --dns dns_unoeuro -d example.com -d www.example.com
669```
670
fb6e0658 671The `UNO_Key` and `UNO_User` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
78712245 672
454ad6f8 673## 33. Use INWX
657334fb 674
f7c346de 675[INWX](https://www.inwx.de/) offers an [xmlrpc api](https://www.inwx.de/de/help/apidoc) with your standard login credentials, set them like so:
657334fb 676
677```
678export INWX_User="yourusername"
679export INWX_Password="password"
680```
681
682Then you can issue your certificates with:
683
684```
685acme.sh --issue --dns dns_inwx -d example.com -d www.example.com
686```
687
688The `INWX_User` and `INWX_Password` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
689
63f32835
JOK
690If your account is secured by mobile tan you have also defined the shared secret.
691
692```
693export INWX_Shared_Secret="shared secret"
694```
695
696You may need to re-enable the mobile tan to gain the shared secret.
697
ae299297
JH
698## 34. User Servercow API v1
699
700Create a new user from the servercow control center. Don't forget to activate **DNS API** for this user.
701
702```
703export SERVERCOW_API_Username=username
704export SERVERCOW_API_Password=password
705```
706
707Now you cann issue a cert:
708
709```
710acme.sh --issue --dns dns_servercow -d example.com -d www.example.com
711```
712Both, `SERVERCOW_API_Username` and `SERVERCOW_API_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
713
eb207322
M
714## 35. Use Namesilo.com API
715
716You'll need to generate an API key at https://www.namesilo.com/account_api.php
717Optionally you may restrict the access to an IP range there.
718
719```
720export Namesilo_Key="xxxxxxxxxxxxxxxxxxxxxxxx"
721```
722
723And now you can issue certs with:
724
725```
726acme.sh --issue --dns dns_namesilo --dnssleep 900 -d example.com -d www.example.com
727```
728
258cf20c 729## 36. Use autoDNS (InternetX)
a01da2fd
A
730
731[InternetX](https://www.internetx.com/) offers an [xml api](https://help.internetx.com/display/API/AutoDNS+XML-API) with your standard login credentials, set them like so:
732
733```
734export AUTODNS_USER="yourusername"
735export AUTODNS_PASSWORD="password"
736export AUTODNS_CONTEXT="context"
737```
738
739Then you can issue your certificates with:
740
741```
742acme.sh --issue --dns dns_autodns -d example.com -d www.example.com
743```
744
745The `AUTODNS_USER`, `AUTODNS_PASSWORD` and `AUTODNS_CONTEXT` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
746
b6fc8398 747## 37. Use Azure DNS
748
c82cd90e 749You have to create a service principal first. See:[How to use Azure DNS](../../../wiki/How-to-use-Azure-DNS)
b6fc8398 750
751```
752export AZUREDNS_SUBSCRIPTIONID="12345678-9abc-def0-1234-567890abcdef"
753export AZUREDNS_TENANTID="11111111-2222-3333-4444-555555555555"
754export AZUREDNS_APPID="3b5033b5-7a66-43a5-b3b9-a36b9e7c25ed"
755export AZUREDNS_CLIENTSECRET="1b0224ef-34d4-5af9-110f-77f527d561bd"
756```
757
758Then you can issue your certificates with:
759
760```
761acme.sh --issue --dns dns_azure -d example.com -d www.example.com
762```
763
764`AZUREDNS_SUBSCRIPTIONID`, `AZUREDNS_TENANTID`,`AZUREDNS_APPID` and `AZUREDNS_CLIENTSECRET` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
765
a4fc802d 766## 38. Use selectel.com(selectel.ru) domain API to automatically issue cert
767
768First you need to login to your account to get your API key from: https://my.selectel.ru/profile/apikeys.
769
770```sh
771export SL_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
772
773```
774
775Ok, let's issue a cert now:
776```
777acme.sh --issue --dns dns_selectel -d example.com -d www.example.com
778```
779
780The `SL_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
781
6ca5f3d8 782## 39. Use zonomi.com domain API to automatically issue cert
783
784First you need to login to your account to find your API key from: http://zonomi.com/app/dns/dyndns.jsp
785
786Your will find your api key in the example urls:
787
788```sh
789https://zonomi.com/app/dns/dyndns.jsp?host=example.com&api_key=1063364558943540954358668888888888
790```
791
792```sh
793export ZM_Key="1063364558943540954358668888888888"
794
795```
796
797Ok, let's issue a cert now:
798```
799acme.sh --issue --dns dns_zonomi -d example.com -d www.example.com
800```
801
802The `ZM_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
803
2ef9904d 804## 40. Use DreamHost DNS API
2c83224f
MD
805
806DNS API keys may be created at https://panel.dreamhost.com/?tree=home.api.
807Ensure the created key has add and remove privelages.
808
809```
5b355c6c 810export DH_API_KEY="<api key>"
2c83224f
MD
811acme.sh --issue --dns dns_dreamhost -d example.com -d www.example.com
812```
813
814The 'DH_API_KEY' will be saved in `~/.acme.sh/account.conf` and will
815be reused when needed.
a4fc802d 816
14c27554
T
817## 41. Use DirectAdmin API
818The DirectAdmin interface has it's own Let's encrypt functionality, but this
819script can be used to generate certificates for names which are not hosted on
820DirectAdmin
821
822User must provide login data and URL to the DirectAdmin incl. port.
823You can create an user which only has access to
824
825- CMD_API_DNS_CONTROL
826- CMD_API_SHOW_DOMAINS
827
828By using the Login Keys function.
829See also https://www.directadmin.com/api.php and https://www.directadmin.com/features.php?id=1298
830
831```
832export DA_Api="https://remoteUser:remotePassword@da.domain.tld:8443"
833export DA_Api_Insecure=1
834```
835Set `DA_Api_Insecure` to 1 for insecure and 0 for secure -> difference is whether ssl cert is checked for validity (0) or whether it is just accepted (1)
836
837Ok, let's issue a cert now:
838```
839acme.sh --issue --dns dns_da -d example.com -d www.example.com
840```
841
842The `DA_Api` and `DA_Api_Insecure` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
843
2ff6f4d3
FB
844## 42. Use KingHost DNS API
845
846API access must be enabled at https://painel.kinghost.com.br/painel.api.php
847
848```
86ef6e69 849export KINGHOST_Username="yourusername"
2ff6f4d3
FB
850export KINGHOST_Password="yourpassword"
851acme.sh --issue --dns dns_kinghost -d example.com -d *.example.com
852```
853
854The `KINGHOST_username` and `KINGHOST_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
14c27554 855
ce9c2274
H
856## 43. Use Zilore DNS API
857
98e15f65 858First, get your API key at https://my.zilore.com/account/api
ce9c2274
H
859
860```
861export Zilore_Key="5dcad3a2-36cb-50e8-cb92-000002f9"
862```
863
864Ok, let's issue a cert now:
865```
98e15f65 866acme.sh --issue --dns dns_zilore -d example.com -d *.example.com
ce9c2274
H
867```
868
869The `Zilore_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
870
b7d573a4 871## 44. Use Loopia.se API
7a46293f
IL
872User must provide login credentials to the Loopia API.
873The user needs the following permissions:
874
875- addSubdomain
876- updateZoneRecord
877- getDomains
878- removeSubdomain
879
880Set the login credentials:
881```
882export LOOPIA_User="user@loopiaapi"
883export LOOPIA_Password="password"
884```
885
886And to issue a cert:
887```
888acme.sh --issue --dns dns_loopia -d example.com -d *.example.com
889```
890
891The username and password will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
dd72f763
WE
892## 45. Use ACME DNS API
893
cd3ef8fa 894ACME DNS is a limited DNS server with RESTful HTTP API to handle ACME DNS challenges easily and securely.
dd72f763
WE
895https://github.com/joohoi/acme-dns
896
897```
898export ACMEDNS_UPDATE_URL="https://auth.acme-dns.io/update"
899export ACMEDNS_USERNAME="<username>"
900export ACMEDNS_PASSWORD="<password>"
901export ACMEDNS_SUBDOMAIN="<subdomain>"
902
903acme.sh --issue --dns dns_acmedns -d example.com -d www.example.com
904```
905
906The credentials will be saved in `~/.acme.sh/account.conf` and will
907be reused when needed.
4e05062d 908## 46. Use TELE3 API
7a46293f 909
4e05062d
RB
910First you need to login to your TELE3 account to set your API-KEY.
911https://www.tele3.cz/system-acme-api.html
912
913```
914export TELE3_Key="MS2I4uPPaI..."
915export TELE3_Secret="kjhOIHGJKHg"
916
917acme.sh --issue --dns dns_tele3 -d example.com -d *.example.com
918```
919
920The TELE3_Key and TELE3_Secret will be saved in ~/.acme.sh/account.conf and will be reused when needed.
3cd5b9ca 921
616b0b6b 922## 47. Use Euserv.eu API
94f91ae6 923
d99968ee 924First you need to login to your euserv.eu account and activate your API Administration (API Verwaltung).
94f91ae6
M
925[https://support.euserv.com](https://support.euserv.com)
926
d99968ee 927Once you've activate, login to your API Admin Interface and create an API account.
94f91ae6
M
928Please specify the scope (active groups: domain) and assign the allowed IPs.
929
94f91ae6
M
930```
931export EUSERV_Username="99999.user123"
932export EUSERV_Password="Asbe54gHde"
933```
934
616b0b6b 935Ok, let's issue a cert now: (Be aware to use the `--insecure` flag, cause euserv.eu is still using self-signed certificates!)
94f91ae6
M
936```
937acme.sh --issue --dns dns_euserv -d example.com -d *.example.com --insecure
938```
939
940The `EUSERV_Username` and `EUSERV_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
941
942Please report any issues to https://github.com/initit/acme.sh or to <github@initit.de>
1d4dec55 943
22cd408e
H
944## 48. Use DNSPod.com domain API to automatically issue cert
945
946First you need to get your API Key and ID by this [get-the-user-token](https://www.dnspod.com/docs/info.html#get-the-user-token).
947
948```
949export DPI_Id="1234"
950export DPI_Key="sADDsdasdgdsf"
951```
952
953Ok, let's issue a cert now:
954```
955acme.sh --issue --dns dns_dpi -d example.com -d www.example.com
956```
957
958The `DPI_Id` and `DPI_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
959
9c39121e 960## 49. Use Google Cloud DNS API to automatically issue cert
1d4dec55
JL
961
962First you need to authenticate to gcloud.
963
964```
965gcloud init
966```
967
968**The `dns_gcloud` script uses the active gcloud configuration and credentials.**
969There is no logic inside `dns_gcloud` to override the project and other settings.
970If needed, create additional [gcloud configurations](https://cloud.google.com/sdk/gcloud/reference/topic/configurations).
971You can change the configuration being used without *activating* it; simply set the `CLOUDSDK_ACTIVE_CONFIG_NAME` environment variable.
972
973To issue a certificate you can:
974```
975export CLOUDSDK_ACTIVE_CONFIG_NAME=default # see the note above
976acme.sh --issue --dns dns_gcloud -d example.com -d '*.example.com'
977```
978
979`dns_gcloud` also supports [DNS alias mode](https://github.com/Neilpang/acme.sh/wiki/DNS-alias-mode).
980
2e74df25
KT
981## 50. Use ConoHa API
982
983First you need to login to your ConoHa account to get your API credentials.
984
985```
986export CONOHA_Username="xxxxxx"
987export CONOHA_Password="xxxxxx"
988export CONOHA_TenantId="xxxxxx"
989export CONOHA_IdentityServiceApi="https://identity.xxxx.conoha.io/v2.0"
990```
991
992To issue a cert:
993```
994acme.sh --issue --dns dns_conoha -d example.com -d www.example.com
995```
996
997The `CONOHA_Username`, `CONOHA_Password`, `CONOHA_TenantId` and `CONOHA_IdentityServiceApi` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
998
fc9d321e 999## 51. Use netcup DNS API to automatically issue cert
dc267663 1000
1001First you need to login in your CCP account to get your API Key and API Password.
3cd5b9ca 1002```
1003export NC_Apikey="<Apikey>"
1004export NC_Apipw="<Apipassword>"
1005export NC_CID="<Customernumber>"
1006```
1007
1008Now, let's issue a cert:
1009```
1010acme.sh --issue --dns dns_netcup -d example.com -d www.example.com
1011```
1012
1013The `NC_Apikey`,`NC_Apipw` and `NC_CID` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
dc267663 1014
1756bbff
HS
1015## 52. Use GratisDNS.dk
1016
12c900ea 1017GratisDNS.dk (https://gratisdns.dk/) does not provide an API to update DNS records (other than IPv4 and IPv6
1756bbff
HS
1018dynamic DNS addresses). The acme.sh plugin therefore retrieves and updates domain TXT records by logging
1019into the GratisDNS website to read the HTML and posting updates as HTTP. The plugin needs to know your
1020userid and password for the GratisDNS website.
1021
1022```sh
1023export GDNSDK_Username="..."
1024export GDNSDK_Password="..."
1025```
1026The username and password will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
1027
1028
1029Now you can issue a certificate.
1030
12c900ea
HS
1031Note: It usually takes a few minutes (usually 3-4 minutes) before the changes propagates to gratisdns.dk nameservers (ns3.gratisdns.dk often are slow),
1032and in rare cases I have seen over 5 minutes before google DNS catches it. Therefor a DNS sleep of at least 300 seconds are recommended-
1033
1756bbff 1034```sh
12c900ea 1035acme.sh --issue --dns dns_gdnsdk --dnssleep 300 -d example.com -d *.example.com
1756bbff
HS
1036```
1037
f7e7e885
L
1038## 53. Use Namecheap
1039
1040You will need your namecheap username, API KEY (https://www.namecheap.com/support/api/intro.aspx) and your external IP address (or an URL to get it), this IP will need to be whitelisted at Namecheap.
7e130c26 1041Due to Namecheap's API limitation all the records of your domain will be read and re applied, make sure to have a backup of your records you could apply if any issue would arise.
f7e7e885
L
1042
1043```sh
1044export NAMECHEAP_USERNAME="..."
1045export NAMECHEAP_API_KEY="..."
1046export NAMECHEAP_SOURCEIP="..."
1047```
1048
7e130c26 1049NAMECHEAP_SOURCEIP can either be an IP address or an URL to provide it (e.g. https://ifconfig.co/ip).
f7e7e885
L
1050
1051The username and password will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
1052
1053Now you can issue a certificate.
1054
1055```sh
1056acme.sh --issue --dns dns_namecheap -d example.com -d *.example.com
1057```
1058
14ad5955 1059## 54. Use MyDNS.JP API
1060
1061First, register to MyDNS.JP and get MasterID and Password.
1062
1063```
1064export MYDNSJP_MasterID=MasterID
1065export MYDNSJP_Password=Password
1066```
1067
1068To issue a certificate:
1069
1070```
1071acme.sh --issue --dns dns_mydnsjp -d example.com -d www.example.com
1072```
1073The `MYDNSJP_MasterID` and `MYDNSJP_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
1074
ee258f14 1075## 55. Use hosting.de API
4162975f
OD
1076
1077Create an API key in your hosting.de account here: https://secure.hosting.de
1078
1079The key needs the following rights:
1080- DNS_ZONES_EDIT
1081- DNS_ZONES_LIST
1082
1083Set your API Key and endpoint:
1084
1085```
ed95509a
OD
1086export HOSTINGDE_APIKEY='xxx'
1087export HOSTINGDE_ENDPOINT='https://secure.hosting.de'
4162975f
OD
1088```
1089
1090The plugin can also be used for the http.net API. http.net customers have to set endpoint to https://partner.http.net.
1091
1092Ok, let's issue a cert now:
1093```
1094acme.sh --issue --dns dns_hostingde -d example.com -d *.example.com
1095```
1096
1097The hosting.de API key and endpoint will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
1dab353f 1098
fb08b53f
AA
1099## 56. Use Neodigit.net API
1100
1101```
1102export NEODIGIT_API_TOKEN="eXJxTkdUVUZmcHQ3QWJackQ4ZGlMejRDSklRYmo5VG5zcFFKK2thYnE0WnVnNnMy"
1103```
1104
1105Ok, let's issue a cert now:
1106```
1107acme.sh --issue --dns dns_neodigit -d example.com -d www.example.com
1108```
1109
1110Neodigit API Token will be saved in `~/.acme.sh/account.conf` and will be used when needed.
1111
67d3e8d0
I
1112## 57. Use Exoscale API
1113
1114Create an API key and secret key in the Exoscale account section
1115
1116Set your API and secret key:
1117
1118```
1119export EXOSCALE_API_KEY='xxx'
1120export EXOSCALE_SECRET_KEY='xxx'
1121```
1122
1123Now, let's issue a cert:
1124```
ecf7dded 1125acme.sh --issue --dns dns_exoscale -d example.com -d www.example.com
67d3e8d0
I
1126```
1127
1128The `EXOSCALE_API_KEY` and `EXOSCALE_SECRET_KEY` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
1129
72ce3770
MB
1130## 58. Using PointHQ API to issue certs
1131
1132Log into [PointHQ account management](https://app.pointhq.com/profile) and copy the API key from the page there.
1133
1134```export PointHQ_Key="apikeystringgoeshere"
1135exportPointHQ_Email="accountemail@yourdomain.com"
1136```
1137
1138You can then issue certs by using:
1139```acme.sh --issue --dns dns_pointhq -d example.com -d www.example.com
1140```
1141
58bb94d7 1142# Use custom API
9882f342 1143
d20831e4 1144If your API is not supported yet, you can write your own DNS API.
9882f342 1145
d20831e4 1146Let's assume you want to name it 'myapi':
9882f342 1147
d20831e4
AL
11481. Create a bash script named `~/.acme.sh/dns_myapi.sh`,
11492. In the script you must have a function named `dns_myapi_add()` which will be called by acme.sh to add the DNS records.
11503. Then you can use your API to issue cert like this:
9882f342 1151
1152```
d20831e4 1153acme.sh --issue --dns dns_myapi -d example.com -d www.example.com
9882f342 1154```
1155
1156For more details, please check our sample script: [dns_myapi.sh](dns_myapi.sh)
1157
4c99c012 1158See: https://github.com/Neilpang/acme.sh/wiki/DNS-API-Dev-Guide
b9091e14 1159
58bb94d7 1160# Use lexicon DNS API
39c6df29 1161
d20831e4 1162https://github.com/Neilpang/acme.sh/wiki/How-to-use-lexicon-dns-api