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.

883 lines
24 KiB

9 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
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. ## 6. Use OVH/kimsufi/soyoustart/runabove API to automatically issue cert
  63. https://github.com/Neilpang/acme.sh/wiki/How-to-use-OVH-domain-api
  64. ## 7. Use nsupdate to automatically issue cert
  65. First, generate a key for updating the zone
  66. ```
  67. b=$(dnssec-keygen -a hmac-sha512 -b 512 -n USER -K /tmp foo)
  68. cat > /etc/named/keys/update.key <<EOF
  69. key "update" {
  70. algorithm hmac-sha512;
  71. secret "$(awk '/^Key/{print $2}' /tmp/$b.private)";
  72. };
  73. EOF
  74. rm -f /tmp/$b.{private,key}
  75. ```
  76. Include this key in your named configuration
  77. ```
  78. include "/etc/named/keys/update.key";
  79. ```
  80. Next, configure your zone to allow dynamic updates.
  81. Depending on your named version, use either
  82. ```
  83. zone "example.com" {
  84. type master;
  85. allow-update { key "update"; };
  86. };
  87. ```
  88. or
  89. ```
  90. zone "example.com" {
  91. type master;
  92. update-policy {
  93. grant update subdomain example.com.;
  94. };
  95. }
  96. ```
  97. Finally, make the DNS server and update Key available to `acme.sh`
  98. ```
  99. export NSUPDATE_SERVER="dns.example.com"
  100. export NSUPDATE_KEY="/path/to/your/nsupdate.key"
  101. ```
  102. Ok, let's issue a cert now:
  103. ```
  104. acme.sh --issue --dns dns_nsupdate -d example.com -d www.example.com
  105. ```
  106. The `NSUPDATE_SERVER` and `NSUPDATE_KEY` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  107. ## 8. Use LuaDNS domain API
  108. Get your API token at https://api.luadns.com/settings
  109. ```
  110. export LUA_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  111. export LUA_Email="xxxx@sss.com"
  112. ```
  113. To issue a cert:
  114. ```
  115. acme.sh --issue --dns dns_lua -d example.com -d www.example.com
  116. ```
  117. The `LUA_Key` and `LUA_Email` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  118. ## 9. Use DNSMadeEasy domain API
  119. Get your API credentials at https://cp.dnsmadeeasy.com/account/info
  120. ```
  121. export ME_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  122. export ME_Secret="qdfqsdfkjdskfj"
  123. ```
  124. To issue a cert:
  125. ```
  126. acme.sh --issue --dns dns_me -d example.com -d www.example.com
  127. ```
  128. The `ME_Key` and `ME_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  129. ## 10. Use Amazon Route53 domain API
  130. https://github.com/Neilpang/acme.sh/wiki/How-to-use-Amazon-Route53-API
  131. ```
  132. export AWS_ACCESS_KEY_ID=XXXXXXXXXX
  133. export AWS_SECRET_ACCESS_KEY=XXXXXXXXXXXXXXX
  134. ```
  135. To issue a cert:
  136. ```
  137. acme.sh --issue --dns dns_aws -d example.com -d www.example.com
  138. ```
  139. The `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  140. ## 11. Use Aliyun domain API to automatically issue cert
  141. First you need to login to your Aliyun account to get your API key.
  142. [https://ak-console.aliyun.com/#/accesskey](https://ak-console.aliyun.com/#/accesskey)
  143. ```
  144. export Ali_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  145. export Ali_Secret="jlsdflanljkljlfdsaklkjflsa"
  146. ```
  147. Ok, let's issue a cert now:
  148. ```
  149. acme.sh --issue --dns dns_ali -d example.com -d www.example.com
  150. ```
  151. The `Ali_Key` and `Ali_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  152. ## 12. Use ISPConfig 3.1 API
  153. This only works for ISPConfig 3.1 (and newer).
  154. 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`.
  155. ```
  156. export ISPC_User="xxx"
  157. export ISPC_Password="xxx"
  158. export ISPC_Api="https://ispc.domain.tld:8080/remote/json.php"
  159. export ISPC_Api_Insecure=1
  160. ```
  161. If you have installed ISPConfig on a different port, then alter the 8080 accordingly.
  162. 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.
  163. To issue a cert:
  164. ```
  165. acme.sh --issue --dns dns_ispconfig -d example.com -d www.example.com
  166. ```
  167. 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.
  168. ## 13. Use Alwaysdata domain API
  169. First you need to login to your Alwaysdata account to get your API Key.
  170. ```sh
  171. export AD_API_KEY="myalwaysdataapikey"
  172. ```
  173. Ok, let's issue a cert now:
  174. ```sh
  175. acme.sh --issue --dns dns_ad -d example.com -d www.example.com
  176. ```
  177. The `AD_API_KEY` will be saved in `~/.acme.sh/account.conf` and will be reused
  178. when needed.
  179. ## 14. Use Linode domain API
  180. First you need to login to your Linode account to get your API Key.
  181. [https://manager.linode.com/profile/api](https://manager.linode.com/profile/api)
  182. Then add an API key with label *ACME* and copy the new key.
  183. ```sh
  184. export LINODE_API_KEY="..."
  185. ```
  186. 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.
  187. Ok, let's issue a cert now:
  188. ```sh
  189. acme.sh --issue --dns dns_linode --dnssleep 900 -d example.com -d www.example.com
  190. ```
  191. The `LINODE_API_KEY` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  192. ## 15. Use FreeDNS
  193. FreeDNS (https://freedns.afraid.org/) does not provide an API to update DNS records (other than IPv4 and IPv6
  194. dynamic DNS addresses). The acme.sh plugin therefore retrieves and updates domain TXT records by logging
  195. into the FreeDNS website to read the HTML and posting updates as HTTP. The plugin needs to know your
  196. userid and password for the FreeDNS website.
  197. ```sh
  198. export FREEDNS_User="..."
  199. export FREEDNS_Password="..."
  200. ```
  201. You need only provide this the first time you run the acme.sh client with FreeDNS validation and then again
  202. whenever you change your password at the FreeDNS site. The acme.sh FreeDNS plugin does not store your userid
  203. or password but rather saves an authentication token returned by FreeDNS in `~/.acme.sh/account.conf` and
  204. reuses that when needed.
  205. Now you can issue a certificate.
  206. ```sh
  207. acme.sh --issue --dns dns_freedns -d example.com -d www.example.com
  208. ```
  209. Note that you cannot use acme.sh automatic DNS validation for FreeDNS public domains or for a subdomain that
  210. you create under a FreeDNS public domain. You must own the top level domain in order to automatically
  211. validate with acme.sh at FreeDNS.
  212. ## 16. Use cyon.ch
  213. You only need to set your cyon.ch login credentials.
  214. If you also have 2 Factor Authentication (OTP) enabled, you need to set your secret token too and have `oathtool` installed.
  215. ```
  216. export CY_Username="your_cyon_username"
  217. export CY_Password="your_cyon_password"
  218. export CY_OTP_Secret="your_otp_secret" # Only required if using 2FA
  219. ```
  220. To issue a cert:
  221. ```
  222. acme.sh --issue --dns dns_cyon -d example.com -d www.example.com
  223. ```
  224. The `CY_Username`, `CY_Password` and `CY_OTP_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  225. ## 17. Use Domain-Offensive/Resellerinterface/Domainrobot API
  226. ATTENTION: You need to be a registered Reseller to be able to use the ResellerInterface. As a normal user you can not use this method.
  227. You will need your login credentials (Partner ID+Password) to the Resellerinterface, and export them before you run `acme.sh`:
  228. ```
  229. export DO_PID="KD-1234567"
  230. export DO_PW="cdfkjl3n2"
  231. ```
  232. Ok, let's issue a cert now:
  233. ```
  234. acme.sh --issue --dns dns_do -d example.com -d www.example.com
  235. ```
  236. ## 18. Use Gandi LiveDNS API
  237. You must enable the new Gandi LiveDNS API first and the create your api key, See: http://doc.livedns.gandi.net/
  238. ```
  239. export GANDI_LIVEDNS_KEY="fdmlfsdklmfdkmqsdfk"
  240. ```
  241. Ok, let's issue a cert now:
  242. ```
  243. acme.sh --issue --dns dns_gandi_livedns -d example.com -d www.example.com
  244. ```
  245. ## 19. Use Knot (knsupdate) DNS API to automatically issue cert
  246. First, generate a TSIG key for updating the zone.
  247. ```
  248. keymgr tsig generate -t acme_key hmac-sha512 > /etc/knot/acme.key
  249. ```
  250. Include this key in your knot configuration file.
  251. ```
  252. include: /etc/knot/acme.key
  253. ```
  254. Next, configure your zone to allow dynamic updates.
  255. 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/).
  256. ```
  257. acl:
  258. - id: acme_acl
  259. address: 192.168.1.0/24
  260. key: acme_key
  261. action: update
  262. zone:
  263. - domain: example.com
  264. file: example.com.zone
  265. acl: acme_acl
  266. ```
  267. Finally, make the DNS server and TSIG Key available to `acme.sh`
  268. ```
  269. export KNOT_SERVER="dns.example.com"
  270. export KNOT_KEY=`grep \# /etc/knot/acme.key | cut -d' ' -f2`
  271. ```
  272. Ok, let's issue a cert now:
  273. ```
  274. acme.sh --issue --dns dns_knot -d example.com -d www.example.com
  275. ```
  276. The `KNOT_SERVER` and `KNOT_KEY` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  277. ## 20. Use DigitalOcean API (native)
  278. You need to obtain a read and write capable API key from your DigitalOcean account. See: https://www.digitalocean.com/help/api/
  279. ```
  280. export DO_API_KEY="75310dc4ca779ac39a19f6355db573b49ce92ae126553ebd61ac3a3ae34834cc"
  281. ```
  282. Ok, let's issue a cert now:
  283. ```
  284. acme.sh --issue --dns dns_dgon -d example.com -d www.example.com
  285. ```
  286. ## 21. Use ClouDNS.net API
  287. 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.
  288. ```
  289. # Use this for a sub auth ID
  290. export CLOUDNS_SUB_AUTH_ID=XXXXX
  291. # Use this for a regular auth ID
  292. #export CLOUDNS_AUTH_ID=XXXXX
  293. export CLOUDNS_AUTH_PASSWORD="YYYYYYYYY"
  294. ```
  295. Ok, let's issue a cert now:
  296. ```
  297. acme.sh --issue --dns dns_cloudns -d example.com -d www.example.com
  298. ```
  299. The `CLOUDNS_AUTH_ID` and `CLOUDNS_AUTH_PASSWORD` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  300. ## 22. Use Infoblox API
  301. First you need to create/obtain API credentials on your Infoblox appliance.
  302. ```
  303. export Infoblox_Creds="username:password"
  304. export Infoblox_Server="ip or fqdn of infoblox appliance"
  305. ```
  306. Ok, let's issue a cert now:
  307. ```
  308. acme.sh --issue --dns dns_infoblox -d example.com -d www.example.com
  309. ```
  310. Note: This script will automatically create and delete the ephemeral txt record.
  311. The `Infoblox_Creds` and `Infoblox_Server` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  312. ## 23. Use VSCALE API
  313. First you need to create/obtain API tokens on your [settings panel](https://vscale.io/panel/settings/tokens/).
  314. ```
  315. VSCALE_API_KEY="sdfsdfsdfljlbjkljlkjsdfoiwje"
  316. ```
  317. Ok, let's issue a cert now:
  318. ```
  319. acme.sh --issue --dns dns_vscale -d example.com -d www.example.com
  320. ```
  321. ## 24. Use Dynu API
  322. First you need to create/obtain API credentials from your Dynu account. See: https://www.dynu.com/resources/api/documentation
  323. ```
  324. export Dynu_ClientId="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  325. export Dynu_Secret="yyyyyyyyyyyyyyyyyyyyyyyyy"
  326. ```
  327. Ok, let's issue a cert now:
  328. ```
  329. acme.sh --issue --dns dns_dynu -d example.com -d www.example.com
  330. ```
  331. The `Dynu_ClientId` and `Dynu_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  332. ## 25. Use DNSimple API
  333. First you need to login to your DNSimple account and generate a new oauth token.
  334. https://dnsimple.com/a/{your account id}/account/access_tokens
  335. Note that this is an _account_ token and not a user token. The account token is
  336. needed to infer the `account_id` used in requests. A user token will not be able
  337. to determine the correct account to use.
  338. ```
  339. export DNSimple_OAUTH_TOKEN="sdfsdfsdfljlbjkljlkjsdfoiwje"
  340. ```
  341. To issue the cert just specify the `dns_dnsimple` API.
  342. ```
  343. acme.sh --issue --dns dns_dnsimple -d example.com
  344. ```
  345. The `DNSimple_OAUTH_TOKEN` will be saved in `~/.acme.sh/account.conf` and will
  346. be reused when needed.
  347. If you have any issues with this integration please report them to
  348. https://github.com/pho3nixf1re/acme.sh/issues.
  349. ## 26. Use NS1.com API
  350. ```
  351. export NS1_Key="fdmlfsdklmfdkmqsdfk"
  352. ```
  353. Ok, let's issue a cert now:
  354. ```
  355. acme.sh --issue --dns dns_nsone -d example.com -d www.example.com
  356. ```
  357. ## 27. Use DuckDNS.org API
  358. ```
  359. export DuckDNS_Token="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
  360. ```
  361. Please note that since DuckDNS uses StartSSL as their cert provider, thus
  362. --insecure may need to be used when issuing certs:
  363. ```
  364. acme.sh --insecure --issue --dns dns_duckdns -d mydomain.duckdns.org
  365. ```
  366. For issues, please report to https://github.com/raidenii/acme.sh/issues.
  367. ## 28. Use Name.com API
  368. Create your API token here: https://www.name.com/account/settings/api
  369. Note: `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
  370. ```
  371. export Namecom_Username="testuser"
  372. export Namecom_Token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  373. ```
  374. And now you can issue certs with:
  375. ```
  376. acme.sh --issue --dns dns_namecom -d example.com -d www.example.com
  377. ```
  378. For issues, please report to https://github.com/raidenii/acme.sh/issues.
  379. ## 29. Use Dyn Managed DNS API to automatically issue cert
  380. First, login to your Dyn Managed DNS account: https://portal.dynect.net/login/
  381. It is recommended to add a new user specific for API access.
  382. The minimum "Zones & Records Permissions" required are:
  383. ```
  384. RecordAdd
  385. RecordUpdate
  386. RecordDelete
  387. RecordGet
  388. ZoneGet
  389. ZoneAddNode
  390. ZoneRemoveNode
  391. ZonePublish
  392. ```
  393. Pass the API user credentials to the environment:
  394. ```
  395. export DYN_Customer="customer"
  396. export DYN_Username="apiuser"
  397. export DYN_Password="secret"
  398. ```
  399. Ok, let's issue a cert now:
  400. ```
  401. acme.sh --issue --dns dns_dyn -d example.com -d www.example.com
  402. ```
  403. The `DYN_Customer`, `DYN_Username` and `DYN_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  404. ## 30. Use pdd.yandex.ru API
  405. ```
  406. export PDD_Token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  407. ```
  408. Follow these instructions to get the token for your domain https://tech.yandex.com/domain/doc/concepts/access-docpage/
  409. ```
  410. acme.sh --issue --dns dns_yandex -d mydomain.example.org
  411. ```
  412. For issues, please report to https://github.com/non7top/acme.sh/issues.
  413. ## 31. Use Hurricane Electric
  414. Hurricane Electric (https://dns.he.net/) doesn't have an API so just set your login credentials like so:
  415. ```
  416. export HE_Username="yourusername"
  417. export HE_Password="password"
  418. ```
  419. Then you can issue your certificate:
  420. ```
  421. acme.sh --issue --dns dns_he -d example.com -d www.example.com
  422. ```
  423. The `HE_Username` and `HE_Password` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  424. Please report any issues to https://github.com/angel333/acme.sh or to <me@ondrejsimek.com>.
  425. ## 32. Use UnoEuro API to automatically issue cert
  426. First you need to login to your UnoEuro account to get your API key.
  427. ```
  428. export UNO_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  429. export UNO_User="UExxxxxx"
  430. ```
  431. Ok, let's issue a cert now:
  432. ```
  433. acme.sh --issue --dns dns_unoeuro -d example.com -d www.example.com
  434. ```
  435. The `UNO_Key` and `UNO_User` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  436. ## 33. Use INWX
  437. [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:
  438. ```
  439. export INWX_User="yourusername"
  440. export INWX_Password="password"
  441. ```
  442. Then you can issue your certificates with:
  443. ```
  444. acme.sh --issue --dns dns_inwx -d example.com -d www.example.com
  445. ```
  446. The `INWX_User` and `INWX_Password` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  447. If your account is secured by mobile tan you have also defined the shared secret.
  448. ```
  449. export INWX_Shared_Secret="shared secret"
  450. ```
  451. You may need to re-enable the mobile tan to gain the shared secret.
  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. ## 41. Use DirectAdmin API
  532. The DirectAdmin interface has it's own Let's encrypt functionality, but this
  533. script can be used to generate certificates for names which are not hosted on
  534. DirectAdmin
  535. User must provide login data and URL to the DirectAdmin incl. port.
  536. You can create an user which only has access to
  537. - CMD_API_DNS_CONTROL
  538. - CMD_API_SHOW_DOMAINS
  539. By using the Login Keys function.
  540. See also https://www.directadmin.com/api.php and https://www.directadmin.com/features.php?id=1298
  541. ```
  542. export DA_Api="https://remoteUser:remotePassword@da.domain.tld:8443"
  543. export DA_Api_Insecure=1
  544. ```
  545. Set `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)
  546. Ok, let's issue a cert now:
  547. ```
  548. acme.sh --issue --dns dns_da -d example.com -d www.example.com
  549. ```
  550. The `DA_Api` and `DA_Api_Insecure` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  551. ## 42. Use KingHost DNS API
  552. API access must be enabled at https://painel.kinghost.com.br/painel.api.php
  553. ```
  554. export KINGHOST_Username="yourusername"
  555. export KINGHOST_Password="yourpassword"
  556. acme.sh --issue --dns dns_kinghost -d example.com -d *.example.com
  557. ```
  558. The `KINGHOST_username` and `KINGHOST_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  559. ## 43. Use Zilore DNS API
  560. First, get your API key at https://my.zilore.com/account/api
  561. ```
  562. export Zilore_Key="5dcad3a2-36cb-50e8-cb92-000002f9"
  563. ```
  564. Ok, let's issue a cert now:
  565. ```
  566. acme.sh --issue --dns dns_zilore -d example.com -d *.example.com
  567. ```
  568. The `Zilore_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  569. ## 44. Use Loopia.se API
  570. User must provide login credentials to the Loopia API.
  571. The user needs the following permissions:
  572. - addSubdomain
  573. - updateZoneRecord
  574. - getDomains
  575. - removeSubdomain
  576. Set the login credentials:
  577. ```
  578. export LOOPIA_User="user@loopiaapi"
  579. export LOOPIA_Password="password"
  580. ```
  581. And to issue a cert:
  582. ```
  583. acme.sh --issue --dns dns_loopia -d example.com -d *.example.com
  584. ```
  585. The username and password will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  586. ## 45. Use ACME DNS API
  587. ACME DNS is a limited DNS server with RESTful HTTP API to handle ACME DNS challenges easily and securely.
  588. https://github.com/joohoi/acme-dns
  589. ```
  590. export ACMEDNS_UPDATE_URL="https://auth.acme-dns.io/update"
  591. export ACMEDNS_USERNAME="<username>"
  592. export ACMEDNS_PASSWORD="<password>"
  593. export ACMEDNS_SUBDOMAIN="<subdomain>"
  594. acme.sh --issue --dns dns_acmedns -d example.com -d www.example.com
  595. ```
  596. The credentials will be saved in `~/.acme.sh/account.conf` and will
  597. be reused when needed.
  598. # Use custom API
  599. If your API is not supported yet, you can write your own DNS API.
  600. Let's assume you want to name it 'myapi':
  601. 1. Create a bash script named `~/.acme.sh/dns_myapi.sh`,
  602. 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.
  603. 3. Then you can use your API to issue cert like this:
  604. ```
  605. acme.sh --issue --dns dns_myapi -d example.com -d www.example.com
  606. ```
  607. For more details, please check our sample script: [dns_myapi.sh](dns_myapi.sh)
  608. See: https://github.com/Neilpang/acme.sh/wiki/DNS-API-Dev-Guide
  609. # Use lexicon DNS API
  610. https://github.com/Neilpang/acme.sh/wiki/How-to-use-lexicon-dns-api