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.

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