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.

139 lines
3.3 KiB

9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
  1. # How to use dns api
  2. ## Use CloudFlare domain api to automatically issue cert
  3. For now, we support clourflare integeration.
  4. First you need to login to your clourflare account to get your api key.
  5. ```
  6. export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  7. export CF_Email="xxxx@sss.com"
  8. ```
  9. Ok, let's issue cert now:
  10. ```
  11. acme.sh --issue --dns dns_cf -d aa.com -d www.aa.com
  12. ```
  13. The `CF_Key` and `CF_Email` will be saved in `~/.acme.sh/account.conf`, when next time you use cloudflare api, it will reuse this key.
  14. ## Use Dnspod.cn domain api to automatically issue cert
  15. For now, we support dnspod.cn integeration.
  16. First you need to login to your dnspod.cn account to get your api key and key id.
  17. ```
  18. export DP_Id="1234"
  19. export DP_Key="sADDsdasdgdsf"
  20. ```
  21. Ok, let's issue cert now:
  22. ```
  23. acme.sh --issue --dns dns_dp -d aa.com -d www.aa.com
  24. ```
  25. The `DP_Id` and `DP_Key` will be saved in `~/.acme.sh/account.conf`, when next time you use dnspod.cn api, it will reuse this key.
  26. ## Use Cloudxns.com domain api to automatically issue cert
  27. For now, we support Cloudxns.com integeration.
  28. First you need to login to your Cloudxns.com account to get your api key and key secret.
  29. ```
  30. export CX_Key="1234"
  31. export CX_Secret="sADDsdasdgdsf"
  32. ```
  33. Ok, let's issue cert now:
  34. ```
  35. acme.sh --issue --dns dns_cx -d aa.com -d www.aa.com
  36. ```
  37. The `CX_Key` and `CX_Secret` will be saved in `~/.acme.sh/account.conf`, when next time you use Cloudxns.com api, it will reuse this key.
  38. ## Use Godaddy.com domain api to automatically issue cert
  39. We support Godaddy integration.
  40. First you need to login to your Godaddy account to get your api key and api secret.
  41. https://developer.godaddy.com/keys/
  42. Please Create a Production key, instead of a Test key.
  43. ```
  44. export GD_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
  45. export GD_Secret="asdfsdafdsfdsfdsfdsfdsafd"
  46. ```
  47. Ok, let's issue cert now:
  48. ```
  49. acme.sh --issue --dns dns_gd -d aa.com -d www.aa.com
  50. ```
  51. The `GD_Key` and `GD_Secret` will be saved in `~/.acme.sh/account.conf`, when next time you use cloudflare api, it will reuse this key.
  52. ## Use PowerDNS embedded api to automatically issue cert
  53. We support PowerDNS embedded API integration.
  54. First you need to enable api and set your api-token in PowerDNS configuration.
  55. https://doc.powerdns.com/md/httpapi/README/
  56. ```
  57. export PDNS_Url="http://ns.example.com:8081"
  58. export PDNS_ServerId="localhost"
  59. export PDNS_Token="0123456789ABCDEF"
  60. export PDNS_Ttl=60
  61. ```
  62. Ok, let's issue cert now:
  63. ```
  64. acme.sh --issue --dns dns_pdns -d aa.com -d www.aa.com
  65. ```
  66. The `PDNS_Url`, `PDNS_ServerId`, `PDNS_Token` and `PDNS_Ttl` will be saved in `~/.acme.sh/account.conf`.
  67. ## Use OVH/kimsufi/soyoustart/runabove API
  68. https://github.com/Neilpang/acme.sh/wiki/How-to-use-OVH-domain-api
  69. # Use custom api
  70. If your api is not supported yet, you can write your own dns api.
  71. Let's assume you want to name it 'myapi',
  72. 1. Create a bash script named `~/.acme.sh/dns_myapi.sh`,
  73. 2. In the script, you must have a function named `dns_myapi_add()`. Which will be called by acme.sh to add dns records.
  74. 3. Then you can use your api to issue cert like:
  75. ```
  76. acme.sh --issue --dns dns_myapi -d aa.com -d www.aa.com
  77. ```
  78. For more details, please check our sample script: [dns_myapi.sh](dns_myapi.sh)
  79. # Use lexicon dns api
  80. https://github.com/Neilpang/acme.sh/wiki/How-to-use-lexicon-dns-api