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.

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