You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

788 lines
21 KiB

9 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
7 years ago
8 years ago
  1. # How to use DNS API
  2. ## 1. Use CloudFlare domain API to automatically issue cert
  3. First you need to login to your CloudFlare account to get your API key.
  4. ```
  5. export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  6. export CF_Email="xxxx@sss.com"
  7. ```
  8. Ok, let's issue a cert now:
  9. ```
  10. acme.sh --issue --dns dns_cf -d example.com -d www.example.com
  11. ```
  12. The `CF_Key` and `CF_Email` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  13. ## 2. Use DNSPod.cn domain API to automatically issue cert
  14. First you need to login to your DNSPod account to get your API Key and ID.
  15. ```
  16. export DP_Id="1234"
  17. export DP_Key="sADDsdasdgdsf"
  18. ```
  19. Ok, let's issue a cert now:
  20. ```
  21. acme.sh --issue --dns dns_dp -d example.com -d www.example.com
  22. ```
  23. The `DP_Id` and `DP_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  24. ## 3. Use CloudXNS.com domain API to automatically issue cert
  25. First you need to login to your CloudXNS account to get your API Key and Secret.
  26. ```
  27. export CX_Key="1234"
  28. export CX_Secret="sADDsdasdgdsf"
  29. ```
  30. Ok, let's issue a cert now:
  31. ```
  32. acme.sh --issue --dns dns_cx -d example.com -d www.example.com
  33. ```
  34. The `CX_Key` and `CX_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  35. ## 4. Use GoDaddy.com domain API to automatically issue cert
  36. First you need to login to your GoDaddy account to get your API Key and Secret.
  37. https://developer.godaddy.com/keys/
  38. Please create a Production key, instead of a Test key.
  39. ```
  40. export GD_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  41. export GD_Secret="asdfsdafdsfdsfdsfdsfdsafd"
  42. ```
  43. Ok, let's issue a cert now:
  44. ```
  45. acme.sh --issue --dns dns_gd -d example.com -d www.example.com
  46. ```
  47. The `GD_Key` and `GD_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  48. ## 5. Use PowerDNS embedded API to automatically issue cert
  49. First you need to login to your PowerDNS account to enable the API and set your API-Token in the configuration.
  50. https://doc.powerdns.com/md/httpapi/README/
  51. ```
  52. export PDNS_Url="http://ns.example.com:8081"
  53. export PDNS_ServerId="localhost"
  54. export PDNS_Token="0123456789ABCDEF"
  55. export PDNS_Ttl=60
  56. ```
  57. Ok, let's issue a cert now:
  58. ```
  59. acme.sh --issue --dns dns_pdns -d example.com -d www.example.com
  60. ```
  61. The `PDNS_Url`, `PDNS_ServerId`, `PDNS_Token` and `PDNS_Ttl` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  62. ## 5a. Use PowerDNS mysql backend to automatically issue cert
  63. First you need to set your user:pass:database in the configuration.
  64. Ok, let's issue a cert now:
  65. ```
  66. acme.sh --issue --dns dns_pdns-mysql -d example.com -d www.example.com
  67. ## 6. Use OVH/kimsufi/soyoustart/runabove API to automatically issue cert
  68. https://github.com/Neilpang/acme.sh/wiki/How-to-use-OVH-domain-api
  69. ## 7. Use nsupdate to automatically issue cert
  70. First, generate a key for updating the zone
  71. ```
  72. b=$(dnssec-keygen -a hmac-sha512 -b 512 -n USER -K /tmp foo)
  73. cat > /etc/named/keys/update.key <<EOF
  74. key "update" {
  75. algorithm hmac-sha512;
  76. secret "$(awk '/^Key/{print $2}' /tmp/$b.private)";
  77. };
  78. EOF
  79. rm -f /tmp/$b.{private,key}
  80. ```
  81. Include this key in your named configuration
  82. ```
  83. include "/etc/named/keys/update.key";
  84. ```
  85. Next, configure your zone to allow dynamic updates.
  86. Depending on your named version, use either
  87. ```
  88. zone "example.com" {
  89. type master;
  90. allow-update { key "update"; };
  91. };
  92. ```
  93. or
  94. ```
  95. zone "example.com" {
  96. type master;
  97. update-policy {
  98. grant update subdomain example.com.;
  99. };
  100. }
  101. ```
  102. Finally, make the DNS server and update Key available to `acme.sh`
  103. ```
  104. export NSUPDATE_SERVER="dns.example.com"
  105. export NSUPDATE_KEY="/path/to/your/nsupdate.key"
  106. ```
  107. Ok, let's issue a cert now:
  108. ```
  109. acme.sh --issue --dns dns_nsupdate -d example.com -d www.example.com
  110. ```
  111. The `NSUPDATE_SERVER` and `NSUPDATE_KEY` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  112. ## 8. Use LuaDNS domain API
  113. Get your API token at https://api.luadns.com/settings
  114. ```
  115. export LUA_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  116. export LUA_Email="xxxx@sss.com"
  117. ```
  118. To issue a cert:
  119. ```
  120. acme.sh --issue --dns dns_lua -d example.com -d www.example.com
  121. ```
  122. The `LUA_Key` and `LUA_Email` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  123. ## 9. Use DNSMadeEasy domain API
  124. Get your API credentials at https://cp.dnsmadeeasy.com/account/info
  125. ```
  126. export ME_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  127. export ME_Secret="qdfqsdfkjdskfj"
  128. ```
  129. To issue a cert:
  130. ```
  131. acme.sh --issue --dns dns_me -d example.com -d www.example.com
  132. ```
  133. The `ME_Key` and `ME_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  134. ## 10. Use Amazon Route53 domain API
  135. https://github.com/Neilpang/acme.sh/wiki/How-to-use-Amazon-Route53-API
  136. ```
  137. export AWS_ACCESS_KEY_ID=XXXXXXXXXX
  138. export AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXX
  139. ```
  140. To issue a cert:
  141. ```
  142. acme.sh --issue --dns dns_aws -d example.com -d www.example.com
  143. ```
  144. The `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  145. ## 11. Use Aliyun domain API to automatically issue cert
  146. First you need to login to your Aliyun account to get your API key.
  147. [https://ak-console.aliyun.com/#/accesskey](https://ak-console.aliyun.com/#/accesskey)
  148. ```
  149. export Ali_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  150. export Ali_Secret="jlsdflanljkljlfdsaklkjflsa"
  151. ```
  152. Ok, let's issue a cert now:
  153. ```
  154. acme.sh --issue --dns dns_ali -d example.com -d www.example.com
  155. ```
  156. The `Ali_Key` and `Ali_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  157. ## 12. Use ISPConfig 3.1 API
  158. This only works for ISPConfig 3.1 (and newer).
  159. Create a Remote User in the ISPConfig Control Panel. The Remote User must have access to at least `DNS zone functions` and `DNS txt functions`.
  160. ```
  161. export ISPC_User="xxx"
  162. export ISPC_Password="xxx"
  163. export ISPC_Api="https://ispc.domain.tld:8080/remote/json.php"
  164. export ISPC_Api_Insecure=1
  165. ```
  166. If you have installed ISPConfig on a different port, then alter the 8080 accordingly.
  167. Leaver 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.
  168. To issue a cert:
  169. ```
  170. acme.sh --issue --dns dns_ispconfig -d example.com -d www.example.com
  171. ```
  172. The `ISPC_User`, `ISPC_Password`, `ISPC_Api`and `ISPC_Api_Insecure` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  173. ## 13. Use Alwaysdata domain API
  174. First you need to login to your Alwaysdata account to get your API Key.
  175. ```sh
  176. export AD_API_KEY="myalwaysdataapikey"
  177. ```
  178. Ok, let's issue a cert now:
  179. ```sh
  180. acme.sh --issue --dns dns_ad -d example.com -d www.example.com
  181. ```
  182. The `AD_API_KEY` will be saved in `~/.acme.sh/account.conf` and will be reused
  183. when needed.
  184. ## 14. Use Linode domain API
  185. First you need to login to your Linode account to get your API Key.
  186. [https://manager.linode.com/profile/api](https://manager.linode.com/profile/api)
  187. Then add an API key with label *ACME* and copy the new key.
  188. ```sh
  189. export LINODE_API_KEY="..."
  190. ```
  191. Due to the reload time of any changes in the DNS records, we have to use the `dnssleep` option to wait at least 15 minutes for the changes to take effect.
  192. Ok, let's issue a cert now:
  193. ```sh
  194. acme.sh --issue --dns dns_linode --dnssleep 900 -d example.com -d www.example.com
  195. ```
  196. The `LINODE_API_KEY` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  197. ## 15. Use FreeDNS
  198. FreeDNS (https://freedns.afraid.org/) does not provide an API to update DNS records (other than IPv4 and IPv6
  199. dynamic DNS addresses). The acme.sh plugin therefore retrieves and updates domain TXT records by logging
  200. into the FreeDNS website to read the HTML and posting updates as HTTP. The plugin needs to know your
  201. userid and password for the FreeDNS website.
  202. ```sh
  203. export FREEDNS_User="..."
  204. export FREEDNS_Password="..."
  205. ```
  206. You need only provide this the first time you run the acme.sh client with FreeDNS validation and then again
  207. whenever you change your password at the FreeDNS site. The acme.sh FreeDNS plugin does not store your userid
  208. or password but rather saves an authentication token returned by FreeDNS in `~/.acme.sh/account.conf` and
  209. reuses that when needed.
  210. Now you can issue a certificate.
  211. ```sh
  212. acme.sh --issue --dns dns_freedns -d example.com -d www.example.com
  213. ```
  214. Note that you cannot use acme.sh automatic DNS validation for FreeDNS public domains or for a subdomain that
  215. you create under a FreeDNS public domain. You must own the top level domain in order to automatically
  216. validate with acme.sh at FreeDNS.
  217. ## 16. Use cyon.ch
  218. You only need to set your cyon.ch login credentials.
  219. If you also have 2 Factor Authentication (OTP) enabled, you need to set your secret token too and have `oathtool` installed.
  220. ```
  221. export CY_Username="your_cyon_username"
  222. export CY_Password="your_cyon_password"
  223. export CY_OTP_Secret="your_otp_secret" # Only required if using 2FA
  224. ```
  225. To issue a cert:
  226. ```
  227. acme.sh --issue --dns dns_cyon -d example.com -d www.example.com
  228. ```
  229. The `CY_Username`, `CY_Password` and `CY_OTP_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  230. ## 17. Use Domain-Offensive/Resellerinterface/Domainrobot API
  231. You will need your login credentials (Partner ID+Password) to the Resellerinterface, and export them before you run `acme.sh`:
  232. ```
  233. export DO_PID="KD-1234567"
  234. export DO_PW="cdfkjl3n2"
  235. ```
  236. Ok, let's issue a cert now:
  237. ```
  238. acme.sh --issue --dns dns_do -d example.com -d www.example.com
  239. ```
  240. ## 18. Use Gandi LiveDNS API
  241. You must enable the new Gandi LiveDNS API first and the create your api key, See: http://doc.livedns.gandi.net/
  242. ```
  243. export GANDI_LIVEDNS_KEY="fdmlfsdklmfdkmqsdfk"
  244. ```
  245. Ok, let's issue a cert now:
  246. ```
  247. acme.sh --issue --dns dns_gandi_livedns -d example.com -d www.example.com
  248. ```
  249. ## 19. Use Knot (knsupdate) DNS API to automatically issue cert
  250. First, generate a TSIG key for updating the zone.
  251. ```
  252. keymgr tsig generate acme_key algorithm hmac-sha512 > /etc/knot/acme.key
  253. ```
  254. Include this key in your knot configuration file.
  255. ```
  256. include: /etc/knot/acme.key
  257. ```
  258. Next, configure your zone to allow dynamic updates.
  259. Dynamic 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/).
  260. ```
  261. acl:
  262. - id: acme_acl
  263. address: 192.168.1.0/24
  264. key: acme_key
  265. action: update
  266. zone:
  267. - domain: example.com
  268. file: example.com.zone
  269. acl: acme_acl
  270. ```
  271. Finally, make the DNS server and TSIG Key available to `acme.sh`
  272. ```
  273. export KNOT_SERVER="dns.example.com"
  274. export KNOT_KEY=`grep \# /etc/knot/acme.key | cut -d' ' -f2`
  275. ```
  276. Ok, let's issue a cert now:
  277. ```
  278. acme.sh --issue --dns dns_knot -d example.com -d www.example.com
  279. ```
  280. The `KNOT_SERVER` and `KNOT_KEY` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  281. ## 20. Use DigitalOcean API (native)
  282. You need to obtain a read and write capable API key from your DigitalOcean account. See: https://www.digitalocean.com/help/api/
  283. ```
  284. export DO_API_KEY="75310dc4ca779ac39a19f6355db573b49ce92ae126553ebd61ac3a3ae34834cc"
  285. ```
  286. Ok, let's issue a cert now:
  287. ```
  288. acme.sh --issue --dns dns_dgon -d example.com -d www.example.com
  289. ```
  290. ## 21. Use ClouDNS.net API
  291. You 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.
  292. ```
  293. # Use this for a sub auth ID
  294. export CLOUDNS_SUB_AUTH_ID=XXXXX
  295. # Use this for a regular auth ID
  296. #export CLOUDNS_AUTH_ID=XXXXX
  297. export CLOUDNS_AUTH_PASSWORD="YYYYYYYYY"
  298. ```
  299. Ok, let's issue a cert now:
  300. ```
  301. acme.sh --issue --dns dns_cloudns -d example.com -d www.example.com
  302. ```
  303. The `CLOUDNS_AUTH_ID` and `CLOUDNS_AUTH_PASSWORD` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  304. ## 22. Use Infoblox API
  305. First you need to create/obtain API credentials on your Infoblox appliance.
  306. ```
  307. export Infoblox_Creds="username:password"
  308. export Infoblox_Server="ip or fqdn of infoblox appliance"
  309. ```
  310. Ok, let's issue a cert now:
  311. ```
  312. acme.sh --issue --dns dns_infoblox -d example.com -d www.example.com
  313. ```
  314. Note: This script will automatically create and delete the ephemeral txt record.
  315. The `Infoblox_Creds` and `Infoblox_Server` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  316. ## 23. Use VSCALE API
  317. First you need to create/obtain API tokens on your [settings panel](https://vscale.io/panel/settings/tokens/).
  318. ```
  319. VSCALE_API_KEY="sdfsdfsdfljlbjkljlkjsdfoiwje"
  320. ```
  321. Ok, let's issue a cert now:
  322. ```
  323. acme.sh --issue --dns dns_vscale -d example.com -d www.example.com
  324. ```
  325. ## 24. Use Dynu API
  326. First you need to create/obtain API credentials from your Dynu account. See: https://www.dynu.com/resources/api/documentation
  327. ```
  328. export Dynu_ClientId="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  329. export Dynu_Secret="yyyyyyyyyyyyyyyyyyyyyyyyy"
  330. ```
  331. Ok, let's issue a cert now:
  332. ```
  333. acme.sh --issue --dns dns_dynu -d example.com -d www.example.com
  334. ```
  335. The `Dynu_ClientId` and `Dynu_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  336. ## 25. Use DNSimple API
  337. First you need to login to your DNSimple account and generate a new oauth token.
  338. https://dnsimple.com/a/{your account id}/account/access_tokens
  339. Note that this is an _account_ token and not a user token. The account token is
  340. needed to infer the `account_id` used in requests. A user token will not be able
  341. to determine the correct account to use.
  342. ```
  343. export DNSimple_OAUTH_TOKEN="sdfsdfsdfljlbjkljlkjsdfoiwje"
  344. ```
  345. To issue the cert just specify the `dns_dnsimple` API.
  346. ```
  347. acme.sh --issue --dns dns_dnsimple -d example.com
  348. ```
  349. The `DNSimple_OAUTH_TOKEN` will be saved in `~/.acme.sh/account.conf` and will
  350. be reused when needed.
  351. If you have any issues with this integration please report them to
  352. https://github.com/pho3nixf1re/acme.sh/issues.
  353. ## 26. Use NS1.com API
  354. ```
  355. export NS1_Key="fdmlfsdklmfdkmqsdfk"
  356. ```
  357. Ok, let's issue a cert now:
  358. ```
  359. acme.sh --issue --dns dns_nsone -d example.com -d www.example.com
  360. ```
  361. ## 27. Use DuckDNS.org API
  362. ```
  363. export DuckDNS_Token="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
  364. ```
  365. Please note that since DuckDNS uses StartSSL as their cert provider, thus
  366. --insecure may need to be used when issuing certs:
  367. ```
  368. acme.sh --insecure --issue --dns dns_duckdns -d mydomain.duckdns.org
  369. ```
  370. For issues, please report to https://github.com/raidenii/acme.sh/issues.
  371. ## 28. Use Name.com API
  372. You'll need to fill out the form at https://www.name.com/reseller/apply to apply
  373. for API username and token.
  374. ```
  375. export Namecom_Username="testuser"
  376. export Namecom_Token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  377. ```
  378. And now you can issue certs with:
  379. ```
  380. acme.sh --issue --dns dns_namecom -d example.com -d www.example.com
  381. ```
  382. For issues, please report to https://github.com/raidenii/acme.sh/issues.
  383. ## 29. Use Dyn Managed DNS API to automatically issue cert
  384. First, login to your Dyn Managed DNS account: https://portal.dynect.net/login/
  385. It is recommended to add a new user specific for API access.
  386. The minimum "Zones & Records Permissions" required are:
  387. ```
  388. RecordAdd
  389. RecordUpdate
  390. RecordDelete
  391. RecordGet
  392. ZoneGet
  393. ZoneAddNode
  394. ZoneRemoveNode
  395. ZonePublish
  396. ```
  397. Pass the API user credentials to the environment:
  398. ```
  399. export DYN_Customer="customer"
  400. export DYN_Username="apiuser"
  401. export DYN_Password="secret"
  402. ```
  403. Ok, let's issue a cert now:
  404. ```
  405. acme.sh --issue --dns dns_dyn -d example.com -d www.example.com
  406. ```
  407. The `DYN_Customer`, `DYN_Username` and `DYN_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  408. ## 30. Use pdd.yandex.ru API
  409. ```
  410. export PDD_Token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  411. ```
  412. Follow these instructions to get the token for your domain https://tech.yandex.com/domain/doc/concepts/access-docpage/
  413. ```
  414. acme.sh --issue --dns dns_yandex -d mydomain.example.org
  415. ```
  416. For issues, please report to https://github.com/non7top/acme.sh/issues.
  417. ## 31. Use Hurricane Electric
  418. Hurricane Electric (https://dns.he.net/) doesn't have an API so just set your login credentials like so:
  419. ```
  420. export HE_Username="yourusername"
  421. export HE_Password="password"
  422. ```
  423. Then you can issue your certificate:
  424. ```
  425. acme.sh --issue --dns dns_he -d example.com -d www.example.com
  426. ```
  427. The `HE_Username` and `HE_Password` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  428. Please report any issues to https://github.com/angel333/acme.sh or to <me@ondrejsimek.com>.
  429. ## 32. Use UnoEuro API to automatically issue cert
  430. First you need to login to your UnoEuro account to get your API key.
  431. ```
  432. export UNO_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  433. export UNO_User="UExxxxxx"
  434. ```
  435. Ok, let's issue a cert now:
  436. ```
  437. acme.sh --issue --dns dns_unoeuro -d example.com -d www.example.com
  438. ```
  439. The `UNO_Key` and `UNO_User` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  440. ## 33. Use INWX
  441. [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:
  442. ```
  443. export INWX_User="yourusername"
  444. export INWX_Password="password"
  445. ```
  446. Then you can issue your certificates with:
  447. ```
  448. acme.sh --issue --dns dns_inwx -d example.com -d www.example.com
  449. ```
  450. The `INWX_User` and `INWX_Password` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  451. ## 34. User Servercow API v1
  452. Create a new user from the servercow control center. Don't forget to activate **DNS API** for this user.
  453. ```
  454. export SERVERCOW_API_Username=username
  455. export SERVERCOW_API_Password=password
  456. ```
  457. Now you cann issue a cert:
  458. ```
  459. acme.sh --issue --dns dns_servercow -d example.com -d www.example.com
  460. ```
  461. Both, `SERVERCOW_API_Username` and `SERVERCOW_API_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  462. ## 35. Use Namesilo.com API
  463. You'll need to generate an API key at https://www.namesilo.com/account_api.php
  464. Optionally you may restrict the access to an IP range there.
  465. ```
  466. export Namesilo_Key="xxxxxxxxxxxxxxxxxxxxxxxx"
  467. ```
  468. And now you can issue certs with:
  469. ```
  470. acme.sh --issue --dns dns_namesilo --dnssleep 900 -d example.com -d www.example.com
  471. ```
  472. ## 36. Use autoDNS (InternetX)
  473. [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:
  474. ```
  475. export AUTODNS_USER="yourusername"
  476. export AUTODNS_PASSWORD="password"
  477. export AUTODNS_CONTEXT="context"
  478. ```
  479. Then you can issue your certificates with:
  480. ```
  481. acme.sh --issue --dns dns_autodns -d example.com -d www.example.com
  482. ```
  483. The `AUTODNS_USER`, `AUTODNS_PASSWORD` and `AUTODNS_CONTEXT` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  484. ## 37. Use Azure DNS
  485. You have to create a service principal first. See:[How to use Azure DNS](../../../wiki/How-to-use-Azure-DNS)
  486. ```
  487. export AZUREDNS_SUBSCRIPTIONID="12345678-9abc-def0-1234-567890abcdef"
  488. export AZUREDNS_TENANTID="11111111-2222-3333-4444-555555555555"
  489. export AZUREDNS_APPID="3b5033b5-7a66-43a5-b3b9-a36b9e7c25ed"
  490. export AZUREDNS_CLIENTSECRET="1b0224ef-34d4-5af9-110f-77f527d561bd"
  491. ```
  492. Then you can issue your certificates with:
  493. ```
  494. acme.sh --issue --dns dns_azure -d example.com -d www.example.com
  495. ```
  496. `AZUREDNS_SUBSCRIPTIONID`, `AZUREDNS_TENANTID`,`AZUREDNS_APPID` and `AZUREDNS_CLIENTSECRET` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  497. ## 38. Use selectel.com(selectel.ru) domain API to automatically issue cert
  498. First you need to login to your account to get your API key from: https://my.selectel.ru/profile/apikeys.
  499. ```sh
  500. export SL_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  501. ```
  502. Ok, let's issue a cert now:
  503. ```
  504. acme.sh --issue --dns dns_selectel -d example.com -d www.example.com
  505. ```
  506. The `SL_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  507. ## 39. Use zonomi.com domain API to automatically issue cert
  508. First you need to login to your account to find your API key from: http://zonomi.com/app/dns/dyndns.jsp
  509. Your will find your api key in the example urls:
  510. ```sh
  511. https://zonomi.com/app/dns/dyndns.jsp?host=example.com&api_key=1063364558943540954358668888888888
  512. ```
  513. ```sh
  514. export ZM_Key="1063364558943540954358668888888888"
  515. ```
  516. Ok, let's issue a cert now:
  517. ```
  518. acme.sh --issue --dns dns_zonomi -d example.com -d www.example.com
  519. ```
  520. The `ZM_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  521. ## 40. Use DreamHost DNS API
  522. DNS API keys may be created at https://panel.dreamhost.com/?tree=home.api.
  523. Ensure the created key has add and remove privelages.
  524. ```
  525. export DH_API_Key="<api key>"
  526. acme.sh --issue --dns dns_dreamhost -d example.com -d www.example.com
  527. ```
  528. The 'DH_API_KEY' will be saved in `~/.acme.sh/account.conf` and will
  529. be reused when needed.
  530. # Use custom API
  531. If your API is not supported yet, you can write your own DNS API.
  532. Let's assume you want to name it 'myapi':
  533. 1. Create a bash script named `~/.acme.sh/dns_myapi.sh`,
  534. 2. In the script you must have a function named `dns_myapi_add()` which will be called by acme.sh to add the DNS records.
  535. 3. Then you can use your API to issue cert like this:
  536. ```
  537. acme.sh --issue --dns dns_myapi -d example.com -d www.example.com
  538. ```
  539. For more details, please check our sample script: [dns_myapi.sh](dns_myapi.sh)
  540. See: https://github.com/Neilpang/acme.sh/wiki/DNS-API-Dev-Guide
  541. # Use lexicon DNS API
  542. https://github.com/Neilpang/acme.sh/wiki/How-to-use-lexicon-dns-api