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.

90 lines
2.0 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 custom api
  39. If your api is not supported yet, you can write your own dns api.
  40. Let's assume you want to name it 'myapi',
  41. 1. Create a bash script named `~/.acme.sh/dns_myapi.sh`,
  42. 2. In the scrypt, you must have a function named `dns_myapi-add()`. Which will be called by le.sh to add dns records.
  43. 3. Then you can use your api to issue cert like:
  44. ```
  45. acme.sh --issue --dns dns_myapi -d aa.com -d www.aa.com
  46. ```
  47. For more details, please check our sample script: [dns_myapi.sh](dns_myapi.sh)
  48. # Use lexicon dns api
  49. https://github.com/Neilpang/acme.sh/wiki/How-to-use-lexicon-dns-api