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.

789 lines
21 KiB

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