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.

1094 lines
31 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
7 years ago
7 years ago
7 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 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. If your dns provider doesn't provide api access, you can use our dns alias mode:
  3. https://github.com/Neilpang/acme.sh/wiki/DNS-alias-mode
  4. ## 1. Use CloudFlare domain API to automatically issue cert
  5. First you need to login to your CloudFlare account to get your [API key](https://dash.cloudflare.com/profile).
  6. ```
  7. export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  8. export CF_Email="xxxx@sss.com"
  9. ```
  10. Ok, let's issue a cert now:
  11. ```
  12. acme.sh --issue --dns dns_cf -d example.com -d www.example.com
  13. ```
  14. The `CF_Key` and `CF_Email` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  15. ## 2. Use DNSPod.cn domain API to automatically issue cert
  16. First you need to login to your DNSPod account to get your API Key and ID.
  17. ```
  18. export DP_Id="1234"
  19. export DP_Key="sADDsdasdgdsf"
  20. ```
  21. Ok, let's issue a cert now:
  22. ```
  23. acme.sh --issue --dns dns_dp -d example.com -d www.example.com
  24. ```
  25. The `DP_Id` and `DP_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  26. ## 3. Use CloudXNS.com domain API to automatically issue cert
  27. First you need to login to your CloudXNS account to get your API Key and Secret.
  28. ```
  29. export CX_Key="1234"
  30. export CX_Secret="sADDsdasdgdsf"
  31. ```
  32. Ok, let's issue a cert now:
  33. ```
  34. acme.sh --issue --dns dns_cx -d example.com -d www.example.com
  35. ```
  36. The `CX_Key` and `CX_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  37. ## 4. Use GoDaddy.com domain API to automatically issue cert
  38. First you need to login to your GoDaddy account to get your API Key and Secret.
  39. https://developer.godaddy.com/keys/
  40. Please create a Production key, instead of a Test key.
  41. ```
  42. export GD_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  43. export GD_Secret="asdfsdafdsfdsfdsfdsfdsafd"
  44. ```
  45. Ok, let's issue a cert now:
  46. ```
  47. acme.sh --issue --dns dns_gd -d example.com -d www.example.com
  48. ```
  49. The `GD_Key` and `GD_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  50. ## 5. Use PowerDNS embedded API to automatically issue cert
  51. First you need to login to your PowerDNS account to enable the API and set your API-Token in the configuration.
  52. https://doc.powerdns.com/md/httpapi/README/
  53. ```
  54. export PDNS_Url="http://ns.example.com:8081"
  55. export PDNS_ServerId="localhost"
  56. export PDNS_Token="0123456789ABCDEF"
  57. export PDNS_Ttl=60
  58. ```
  59. Ok, let's issue a cert now:
  60. ```
  61. acme.sh --issue --dns dns_pdns -d example.com -d www.example.com
  62. ```
  63. The `PDNS_Url`, `PDNS_ServerId`, `PDNS_Token` and `PDNS_Ttl` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  64. ## 6. Use OVH/kimsufi/soyoustart/runabove API to automatically issue cert
  65. https://github.com/Neilpang/acme.sh/wiki/How-to-use-OVH-domain-api
  66. ## 7. Use nsupdate to automatically issue cert
  67. First, generate a key for updating the zone
  68. ```
  69. b=$(dnssec-keygen -a hmac-sha512 -b 512 -n USER -K /tmp foo)
  70. cat > /etc/named/keys/update.key <<EOF
  71. key "update" {
  72. algorithm hmac-sha512;
  73. secret "$(awk '/^Key/{print $2}' /tmp/$b.private)";
  74. };
  75. EOF
  76. rm -f /tmp/$b.{private,key}
  77. ```
  78. Include this key in your named configuration
  79. ```
  80. include "/etc/named/keys/update.key";
  81. ```
  82. Next, configure your zone to allow dynamic updates.
  83. Depending on your named version, use either
  84. ```
  85. zone "example.com" {
  86. type master;
  87. allow-update { key "update"; };
  88. };
  89. ```
  90. or
  91. ```
  92. zone "example.com" {
  93. type master;
  94. update-policy {
  95. grant update subdomain example.com.;
  96. };
  97. }
  98. ```
  99. Finally, make the DNS server and update Key available to `acme.sh`
  100. ```
  101. export NSUPDATE_SERVER="dns.example.com"
  102. export NSUPDATE_KEY="/path/to/your/nsupdate.key"
  103. ```
  104. and optionally (depending on DNS server)
  105. ```
  106. export NSUPDATE_ZONE="example.com"
  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`, `NSUPDATE_KEY`, and `NSUPDATE_ZONE` 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. 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.
  233. You will need your login credentials (Partner ID+Password) to the Resellerinterface, and export them before you run `acme.sh`:
  234. ```
  235. export DO_PID="KD-1234567"
  236. export DO_PW="cdfkjl3n2"
  237. ```
  238. Ok, let's issue a cert now:
  239. ```
  240. acme.sh --issue --dns dns_do -d example.com -d www.example.com
  241. ```
  242. ## 18. Use Gandi LiveDNS API
  243. You must enable the new Gandi LiveDNS API first and the create your api key, See: http://doc.livedns.gandi.net/
  244. ```
  245. export GANDI_LIVEDNS_KEY="fdmlfsdklmfdkmqsdfk"
  246. ```
  247. Ok, let's issue a cert now:
  248. ```
  249. acme.sh --issue --dns dns_gandi_livedns -d example.com -d www.example.com
  250. ```
  251. ## 19. Use Knot (knsupdate) DNS API to automatically issue cert
  252. First, generate a TSIG key for updating the zone.
  253. ```
  254. keymgr tsig generate -t acme_key hmac-sha512 > /etc/knot/acme.key
  255. ```
  256. Include this key in your knot configuration file.
  257. ```
  258. include: /etc/knot/acme.key
  259. ```
  260. Next, configure your zone to allow dynamic updates.
  261. 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/).
  262. ```
  263. acl:
  264. - id: acme_acl
  265. address: 192.168.1.0/24
  266. key: acme_key
  267. action: update
  268. zone:
  269. - domain: example.com
  270. file: example.com.zone
  271. acl: acme_acl
  272. ```
  273. Finally, make the DNS server and TSIG Key available to `acme.sh`
  274. ```
  275. export KNOT_SERVER="dns.example.com"
  276. export KNOT_KEY=`grep \# /etc/knot/acme.key | cut -d' ' -f2`
  277. ```
  278. Ok, let's issue a cert now:
  279. ```
  280. acme.sh --issue --dns dns_knot -d example.com -d www.example.com
  281. ```
  282. The `KNOT_SERVER` and `KNOT_KEY` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  283. ## 20. Use DigitalOcean API (native)
  284. You need to obtain a read and write capable API key from your DigitalOcean account. See: https://www.digitalocean.com/help/api/
  285. ```
  286. export DO_API_KEY="75310dc4ca779ac39a19f6355db573b49ce92ae126553ebd61ac3a3ae34834cc"
  287. ```
  288. Ok, let's issue a cert now:
  289. ```
  290. acme.sh --issue --dns dns_dgon -d example.com -d www.example.com
  291. ```
  292. ## 21. Use ClouDNS.net API
  293. 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.
  294. ```
  295. # Use this for a sub auth ID
  296. export CLOUDNS_SUB_AUTH_ID=XXXXX
  297. # Use this for a regular auth ID
  298. #export CLOUDNS_AUTH_ID=XXXXX
  299. export CLOUDNS_AUTH_PASSWORD="YYYYYYYYY"
  300. ```
  301. Ok, let's issue a cert now:
  302. ```
  303. acme.sh --issue --dns dns_cloudns -d example.com -d www.example.com
  304. ```
  305. The `CLOUDNS_AUTH_ID` and `CLOUDNS_AUTH_PASSWORD` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  306. ## 22. Use Infoblox API
  307. First you need to create/obtain API credentials on your Infoblox appliance.
  308. ```
  309. export Infoblox_Creds="username:password"
  310. export Infoblox_Server="ip or fqdn of infoblox appliance"
  311. ```
  312. Ok, let's issue a cert now:
  313. ```
  314. acme.sh --issue --dns dns_infoblox -d example.com -d www.example.com
  315. ```
  316. Note: This script will automatically create and delete the ephemeral txt record.
  317. The `Infoblox_Creds` and `Infoblox_Server` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  318. ## 23. Use VSCALE API
  319. First you need to create/obtain API tokens on your [settings panel](https://vscale.io/panel/settings/tokens/).
  320. ```
  321. export VSCALE_API_KEY="sdfsdfsdfljlbjkljlkjsdfoiwje"
  322. ```
  323. Ok, let's issue a cert now:
  324. ```
  325. acme.sh --issue --dns dns_vscale -d example.com -d www.example.com
  326. ```
  327. ## 24. Use Dynu API
  328. First you need to create/obtain API credentials from your Dynu account. See: https://www.dynu.com/resources/api/documentation
  329. ```
  330. export Dynu_ClientId="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  331. export Dynu_Secret="yyyyyyyyyyyyyyyyyyyyyyyyy"
  332. ```
  333. Ok, let's issue a cert now:
  334. ```
  335. acme.sh --issue --dns dns_dynu -d example.com -d www.example.com
  336. ```
  337. The `Dynu_ClientId` and `Dynu_Secret` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  338. ## 25. Use DNSimple API
  339. First you need to login to your DNSimple account and generate a new oauth token.
  340. https://dnsimple.com/a/{your account id}/account/access_tokens
  341. Note that this is an _account_ token and not a user token. The account token is
  342. needed to infer the `account_id` used in requests. A user token will not be able
  343. to determine the correct account to use.
  344. ```
  345. export DNSimple_OAUTH_TOKEN="sdfsdfsdfljlbjkljlkjsdfoiwje"
  346. ```
  347. To issue the cert just specify the `dns_dnsimple` API.
  348. ```
  349. acme.sh --issue --dns dns_dnsimple -d example.com
  350. ```
  351. The `DNSimple_OAUTH_TOKEN` will be saved in `~/.acme.sh/account.conf` and will
  352. be reused when needed.
  353. If you have any issues with this integration please report them to
  354. https://github.com/pho3nixf1re/acme.sh/issues.
  355. ## 26. Use NS1.com API
  356. ```
  357. export NS1_Key="fdmlfsdklmfdkmqsdfk"
  358. ```
  359. Ok, let's issue a cert now:
  360. ```
  361. acme.sh --issue --dns dns_nsone -d example.com -d www.example.com
  362. ```
  363. ## 27. Use DuckDNS.org API
  364. ```
  365. export DuckDNS_Token="aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
  366. ```
  367. Please note that since DuckDNS uses StartSSL as their cert provider, thus
  368. --insecure may need to be used when issuing certs:
  369. ```
  370. acme.sh --insecure --issue --dns dns_duckdns -d mydomain.duckdns.org
  371. ```
  372. For issues, please report to https://github.com/raidenii/acme.sh/issues.
  373. ## 28. Use Name.com API
  374. Create your API token here: https://www.name.com/account/settings/api
  375. 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
  376. ```
  377. export Namecom_Username="testuser"
  378. export Namecom_Token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  379. ```
  380. And now you can issue certs with:
  381. ```
  382. acme.sh --issue --dns dns_namecom -d example.com -d www.example.com
  383. ```
  384. For issues, please report to https://github.com/raidenii/acme.sh/issues.
  385. ## 29. Use Dyn Managed DNS API to automatically issue cert
  386. First, login to your Dyn Managed DNS account: https://portal.dynect.net/login/
  387. It is recommended to add a new user specific for API access.
  388. The minimum "Zones & Records Permissions" required are:
  389. ```
  390. RecordAdd
  391. RecordUpdate
  392. RecordDelete
  393. RecordGet
  394. ZoneGet
  395. ZoneAddNode
  396. ZoneRemoveNode
  397. ZonePublish
  398. ```
  399. Pass the API user credentials to the environment:
  400. ```
  401. export DYN_Customer="customer"
  402. export DYN_Username="apiuser"
  403. export DYN_Password="secret"
  404. ```
  405. Ok, let's issue a cert now:
  406. ```
  407. acme.sh --issue --dns dns_dyn -d example.com -d www.example.com
  408. ```
  409. The `DYN_Customer`, `DYN_Username` and `DYN_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  410. ## 30. Use pdd.yandex.ru API
  411. ```
  412. export PDD_Token="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
  413. ```
  414. Follow these instructions to get the token for your domain https://tech.yandex.com/domain/doc/concepts/access-docpage/
  415. ```
  416. acme.sh --issue --dns dns_yandex -d mydomain.example.org
  417. ```
  418. For issues, please report to https://github.com/non7top/acme.sh/issues.
  419. ## 31. Use Hurricane Electric
  420. Hurricane Electric (https://dns.he.net/) doesn't have an API so just set your login credentials like so:
  421. ```
  422. export HE_Username="yourusername"
  423. export HE_Password="password"
  424. ```
  425. Then you can issue your certificate:
  426. ```
  427. acme.sh --issue --dns dns_he -d example.com -d www.example.com
  428. ```
  429. The `HE_Username` and `HE_Password` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  430. Please report any issues to https://github.com/angel333/acme.sh or to <me@ondrejsimek.com>.
  431. ## 32. Use UnoEuro API to automatically issue cert
  432. First you need to login to your UnoEuro account to get your API key.
  433. ```
  434. export UNO_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  435. export UNO_User="UExxxxxx"
  436. ```
  437. Ok, let's issue a cert now:
  438. ```
  439. acme.sh --issue --dns dns_unoeuro -d example.com -d www.example.com
  440. ```
  441. The `UNO_Key` and `UNO_User` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  442. ## 33. Use INWX
  443. [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:
  444. ```
  445. export INWX_User="yourusername"
  446. export INWX_Password="password"
  447. ```
  448. Then you can issue your certificates with:
  449. ```
  450. acme.sh --issue --dns dns_inwx -d example.com -d www.example.com
  451. ```
  452. The `INWX_User` and `INWX_Password` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  453. If your account is secured by mobile tan you have also defined the shared secret.
  454. ```
  455. export INWX_Shared_Secret="shared secret"
  456. ```
  457. You may need to re-enable the mobile tan to gain the shared secret.
  458. ## 34. User Servercow API v1
  459. Create a new user from the servercow control center. Don't forget to activate **DNS API** for this user.
  460. ```
  461. export SERVERCOW_API_Username=username
  462. export SERVERCOW_API_Password=password
  463. ```
  464. Now you cann issue a cert:
  465. ```
  466. acme.sh --issue --dns dns_servercow -d example.com -d www.example.com
  467. ```
  468. Both, `SERVERCOW_API_Username` and `SERVERCOW_API_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  469. ## 35. Use Namesilo.com API
  470. You'll need to generate an API key at https://www.namesilo.com/account_api.php
  471. Optionally you may restrict the access to an IP range there.
  472. ```
  473. export Namesilo_Key="xxxxxxxxxxxxxxxxxxxxxxxx"
  474. ```
  475. And now you can issue certs with:
  476. ```
  477. acme.sh --issue --dns dns_namesilo --dnssleep 900 -d example.com -d www.example.com
  478. ```
  479. ## 36. Use autoDNS (InternetX)
  480. [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:
  481. ```
  482. export AUTODNS_USER="yourusername"
  483. export AUTODNS_PASSWORD="password"
  484. export AUTODNS_CONTEXT="context"
  485. ```
  486. Then you can issue your certificates with:
  487. ```
  488. acme.sh --issue --dns dns_autodns -d example.com -d www.example.com
  489. ```
  490. The `AUTODNS_USER`, `AUTODNS_PASSWORD` and `AUTODNS_CONTEXT` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  491. ## 37. Use Azure DNS
  492. You have to create a service principal first. See:[How to use Azure DNS](../../../wiki/How-to-use-Azure-DNS)
  493. ```
  494. export AZUREDNS_SUBSCRIPTIONID="12345678-9abc-def0-1234-567890abcdef"
  495. export AZUREDNS_TENANTID="11111111-2222-3333-4444-555555555555"
  496. export AZUREDNS_APPID="3b5033b5-7a66-43a5-b3b9-a36b9e7c25ed"
  497. export AZUREDNS_CLIENTSECRET="1b0224ef-34d4-5af9-110f-77f527d561bd"
  498. ```
  499. Then you can issue your certificates with:
  500. ```
  501. acme.sh --issue --dns dns_azure -d example.com -d www.example.com
  502. ```
  503. `AZUREDNS_SUBSCRIPTIONID`, `AZUREDNS_TENANTID`,`AZUREDNS_APPID` and `AZUREDNS_CLIENTSECRET` settings will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  504. ## 38. Use selectel.com(selectel.ru) domain API to automatically issue cert
  505. First you need to login to your account to get your API key from: https://my.selectel.ru/profile/apikeys.
  506. ```sh
  507. export SL_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  508. ```
  509. Ok, let's issue a cert now:
  510. ```
  511. acme.sh --issue --dns dns_selectel -d example.com -d www.example.com
  512. ```
  513. The `SL_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  514. ## 39. Use zonomi.com domain API to automatically issue cert
  515. First you need to login to your account to find your API key from: http://zonomi.com/app/dns/dyndns.jsp
  516. Your will find your api key in the example urls:
  517. ```sh
  518. https://zonomi.com/app/dns/dyndns.jsp?host=example.com&api_key=1063364558943540954358668888888888
  519. ```
  520. ```sh
  521. export ZM_Key="1063364558943540954358668888888888"
  522. ```
  523. Ok, let's issue a cert now:
  524. ```
  525. acme.sh --issue --dns dns_zonomi -d example.com -d www.example.com
  526. ```
  527. The `ZM_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  528. ## 40. Use DreamHost DNS API
  529. DNS API keys may be created at https://panel.dreamhost.com/?tree=home.api.
  530. Ensure the created key has add and remove privelages.
  531. ```
  532. export DH_API_KEY="<api key>"
  533. acme.sh --issue --dns dns_dreamhost -d example.com -d www.example.com
  534. ```
  535. The 'DH_API_KEY' will be saved in `~/.acme.sh/account.conf` and will
  536. be reused when needed.
  537. ## 41. Use DirectAdmin API
  538. The DirectAdmin interface has it's own Let's encrypt functionality, but this
  539. script can be used to generate certificates for names which are not hosted on
  540. DirectAdmin
  541. User must provide login data and URL to the DirectAdmin incl. port.
  542. You can create an user which only has access to
  543. - CMD_API_DNS_CONTROL
  544. - CMD_API_SHOW_DOMAINS
  545. By using the Login Keys function.
  546. See also https://www.directadmin.com/api.php and https://www.directadmin.com/features.php?id=1298
  547. ```
  548. export DA_Api="https://remoteUser:remotePassword@da.domain.tld:8443"
  549. export DA_Api_Insecure=1
  550. ```
  551. 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)
  552. Ok, let's issue a cert now:
  553. ```
  554. acme.sh --issue --dns dns_da -d example.com -d www.example.com
  555. ```
  556. The `DA_Api` and `DA_Api_Insecure` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  557. ## 42. Use KingHost DNS API
  558. API access must be enabled at https://painel.kinghost.com.br/painel.api.php
  559. ```
  560. export KINGHOST_Username="yourusername"
  561. export KINGHOST_Password="yourpassword"
  562. acme.sh --issue --dns dns_kinghost -d example.com -d *.example.com
  563. ```
  564. The `KINGHOST_username` and `KINGHOST_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  565. ## 43. Use Zilore DNS API
  566. First, get your API key at https://my.zilore.com/account/api
  567. ```
  568. export Zilore_Key="5dcad3a2-36cb-50e8-cb92-000002f9"
  569. ```
  570. Ok, let's issue a cert now:
  571. ```
  572. acme.sh --issue --dns dns_zilore -d example.com -d *.example.com
  573. ```
  574. The `Zilore_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  575. ## 44. Use Loopia.se API
  576. User must provide login credentials to the Loopia API.
  577. The user needs the following permissions:
  578. - addSubdomain
  579. - updateZoneRecord
  580. - getDomains
  581. - removeSubdomain
  582. Set the login credentials:
  583. ```
  584. export LOOPIA_User="user@loopiaapi"
  585. export LOOPIA_Password="password"
  586. ```
  587. And to issue a cert:
  588. ```
  589. acme.sh --issue --dns dns_loopia -d example.com -d *.example.com
  590. ```
  591. The username and password will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  592. ## 45. Use ACME DNS API
  593. ACME DNS is a limited DNS server with RESTful HTTP API to handle ACME DNS challenges easily and securely.
  594. https://github.com/joohoi/acme-dns
  595. ```
  596. export ACMEDNS_UPDATE_URL="https://auth.acme-dns.io/update"
  597. export ACMEDNS_USERNAME="<username>"
  598. export ACMEDNS_PASSWORD="<password>"
  599. export ACMEDNS_SUBDOMAIN="<subdomain>"
  600. acme.sh --issue --dns dns_acmedns -d example.com -d www.example.com
  601. ```
  602. The credentials will be saved in `~/.acme.sh/account.conf` and will
  603. be reused when needed.
  604. ## 46. Use TELE3 API
  605. First you need to login to your TELE3 account to set your API-KEY.
  606. https://www.tele3.cz/system-acme-api.html
  607. ```
  608. export TELE3_Key="MS2I4uPPaI..."
  609. export TELE3_Secret="kjhOIHGJKHg"
  610. acme.sh --issue --dns dns_tele3 -d example.com -d *.example.com
  611. ```
  612. The TELE3_Key and TELE3_Secret will be saved in ~/.acme.sh/account.conf and will be reused when needed.
  613. ## 47. Use Euserv.eu API
  614. First you need to login to your euserv.eu account and activate your API Administration (API Verwaltung).
  615. [https://support.euserv.com](https://support.euserv.com)
  616. Once you've activate, login to your API Admin Interface and create an API account.
  617. Please specify the scope (active groups: domain) and assign the allowed IPs.
  618. ```
  619. export EUSERV_Username="99999.user123"
  620. export EUSERV_Password="Asbe54gHde"
  621. ```
  622. Ok, let's issue a cert now: (Be aware to use the `--insecure` flag, cause euserv.eu is still using self-signed certificates!)
  623. ```
  624. acme.sh --issue --dns dns_euserv -d example.com -d *.example.com --insecure
  625. ```
  626. The `EUSERV_Username` and `EUSERV_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  627. Please report any issues to https://github.com/initit/acme.sh or to <github@initit.de>
  628. ## 48. Use DNSPod.com domain API to automatically issue cert
  629. First 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).
  630. ```
  631. export DPI_Id="1234"
  632. export DPI_Key="sADDsdasdgdsf"
  633. ```
  634. Ok, let's issue a cert now:
  635. ```
  636. acme.sh --issue --dns dns_dpi -d example.com -d www.example.com
  637. ```
  638. The `DPI_Id` and `DPI_Key` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  639. ## 49. Use Google Cloud DNS API to automatically issue cert
  640. First you need to authenticate to gcloud.
  641. ```
  642. gcloud init
  643. ```
  644. **The `dns_gcloud` script uses the active gcloud configuration and credentials.**
  645. There is no logic inside `dns_gcloud` to override the project and other settings.
  646. If needed, create additional [gcloud configurations](https://cloud.google.com/sdk/gcloud/reference/topic/configurations).
  647. You can change the configuration being used without *activating* it; simply set the `CLOUDSDK_ACTIVE_CONFIG_NAME` environment variable.
  648. To issue a certificate you can:
  649. ```
  650. export CLOUDSDK_ACTIVE_CONFIG_NAME=default # see the note above
  651. acme.sh --issue --dns dns_gcloud -d example.com -d '*.example.com'
  652. ```
  653. `dns_gcloud` also supports [DNS alias mode](https://github.com/Neilpang/acme.sh/wiki/DNS-alias-mode).
  654. ## 50. Use ConoHa API
  655. First you need to login to your ConoHa account to get your API credentials.
  656. ```
  657. export CONOHA_Username="xxxxxx"
  658. export CONOHA_Password="xxxxxx"
  659. export CONOHA_TenantId="xxxxxx"
  660. export CONOHA_IdentityServiceApi="https://identity.xxxx.conoha.io/v2.0"
  661. ```
  662. To issue a cert:
  663. ```
  664. acme.sh --issue --dns dns_conoha -d example.com -d www.example.com
  665. ```
  666. The `CONOHA_Username`, `CONOHA_Password`, `CONOHA_TenantId` and `CONOHA_IdentityServiceApi` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  667. ## 51. Use netcup DNS API to automatically issue cert
  668. First you need to login in your CCP account to get your API Key and API Password.
  669. ```
  670. export NC_Apikey="<Apikey>"
  671. export NC_Apipw="<Apipassword>"
  672. export NC_CID="<Customernumber>"
  673. ```
  674. Now, let's issue a cert:
  675. ```
  676. acme.sh --issue --dns dns_netcup -d example.com -d www.example.com
  677. ```
  678. The `NC_Apikey`,`NC_Apipw` and `NC_CID` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  679. ## 52. Use GratisDNS.dk
  680. GratisDNS.dk (https://gratisdns.dk/) does not provide an API to update DNS records (other than IPv4 and IPv6
  681. dynamic DNS addresses). The acme.sh plugin therefore retrieves and updates domain TXT records by logging
  682. into the GratisDNS website to read the HTML and posting updates as HTTP. The plugin needs to know your
  683. userid and password for the GratisDNS website.
  684. ```sh
  685. export GDNSDK_Username="..."
  686. export GDNSDK_Password="..."
  687. ```
  688. The username and password will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  689. Now you can issue a certificate.
  690. Note: It usually takes a few minutes (usually 3-4 minutes) before the changes propagates to gratisdns.dk nameservers (ns3.gratisdns.dk often are slow),
  691. and 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-
  692. ```sh
  693. acme.sh --issue --dns dns_gdnsdk --dnssleep 300 -d example.com -d *.example.com
  694. ```
  695. ## 53. Use Namecheap
  696. You 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.
  697. Due 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.
  698. ```sh
  699. export NAMECHEAP_USERNAME="..."
  700. export NAMECHEAP_API_KEY="..."
  701. export NAMECHEAP_SOURCEIP="..."
  702. ```
  703. NAMECHEAP_SOURCEIP can either be an IP address or an URL to provide it (e.g. https://ifconfig.co/ip).
  704. The username and password will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  705. Now you can issue a certificate.
  706. ```sh
  707. acme.sh --issue --dns dns_namecheap -d example.com -d *.example.com
  708. ```
  709. ## 54. Use MyDNS.JP API
  710. First, register to MyDNS.JP and get MasterID and Password.
  711. ```
  712. export MYDNSJP_MasterID=MasterID
  713. export MYDNSJP_Password=Password
  714. ```
  715. To issue a certificate:
  716. ```
  717. acme.sh --issue --dns dns_mydnsjp -d example.com -d www.example.com
  718. ```
  719. The `MYDNSJP_MasterID` and `MYDNSJP_Password` will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  720. ## 55. Use hosting.de API
  721. Create an API key in your hosting.de account here: https://secure.hosting.de
  722. The key needs the following rights:
  723. - DNS_ZONES_EDIT
  724. - DNS_ZONES_LIST
  725. Set your API Key and endpoint:
  726. ```
  727. export HOSTINGDE_APIKEY='xxx'
  728. export HOSTINGDE_ENDPOINT='https://secure.hosting.de'
  729. ```
  730. The plugin can also be used for the http.net API. http.net customers have to set endpoint to https://partner.http.net.
  731. Ok, let's issue a cert now:
  732. ```
  733. acme.sh --issue --dns dns_hostingde -d example.com -d *.example.com
  734. ```
  735. The hosting.de API key and endpoint will be saved in `~/.acme.sh/account.conf` and will be reused when needed.
  736. ## 56. Use Neodigit.net API
  737. ```
  738. export NEODIGIT_API_TOKEN="eXJxTkdUVUZmcHQ3QWJackQ4ZGlMejRDSklRYmo5VG5zcFFKK2thYnE0WnVnNnMy"
  739. ```
  740. Ok, let's issue a cert now:
  741. ```
  742. acme.sh --issue --dns dns_neodigit -d example.com -d www.example.com
  743. ```
  744. Neodigit API Token will be saved in `~/.acme.sh/account.conf` and will be used when needed.
  745. # Use custom API
  746. If your API is not supported yet, you can write your own DNS API.
  747. Let's assume you want to name it 'myapi':
  748. 1. Create a bash script named `~/.acme.sh/dns_myapi.sh`,
  749. 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.
  750. 3. Then you can use your API to issue cert like this:
  751. ```
  752. acme.sh --issue --dns dns_myapi -d example.com -d www.example.com
  753. ```
  754. For more details, please check our sample script: [dns_myapi.sh](dns_myapi.sh)
  755. See: https://github.com/Neilpang/acme.sh/wiki/DNS-API-Dev-Guide
  756. # Use lexicon DNS API
  757. https://github.com/Neilpang/acme.sh/wiki/How-to-use-lexicon-dns-api