]> git.proxmox.com Git - mirror_acme.sh.git/blob - dnsapi/README.md
fix compatible for sh. rename api. '-' is not allowed in the function name.
[mirror_acme.sh.git] / dnsapi / README.md
1 # How to use dns api
2
3 ## Use CloudFlare domain api to automatically issue cert
4
5 For now, we support clourflare integeration.
6
7 First you need to login to your clourflare account to get your api key.
8
9 ```
10 export CF_Key="sdfsdfsdfljlbjkljlkjsdfoiwje"
11
12 export CF_Email="xxxx@sss.com"
13
14 ```
15
16 Ok, let's issue cert now:
17 ```
18 le.sh --issue --dns dns_cf -d aa.com -d www.aa.com
19 ```
20
21 The `CF_Key` and `CF_Email` will be saved in `~/.le/account.conf`, when next time you use cloudflare api, it will reuse this key.
22
23
24
25 ## Use Dnspod.cn domain api to automatically issue cert
26
27 For now, we support dnspod.cn integeration.
28
29 First you need to login to your dnspod.cn account to get your api key and key id.
30
31 ```
32 export DP_Id="1234"
33
34 export DP_Key="sADDsdasdgdsf"
35
36 ```
37
38 Ok, let's issue cert now:
39 ```
40 le.sh --issue --dns dns_dp -d aa.com -d www.aa.com
41 ```
42
43 The `DP_Id` and `DP_Key` will be saved in `~/.le/account.conf`, when next time you use dnspod.cn api, it will reuse this key.
44
45
46 ## Use Cloudxns.com domain api to automatically issue cert
47
48 For now, we support Cloudxns.com integeration.
49
50 First you need to login to your Cloudxns.com account to get your api key and key secret.
51
52 ```
53 export CX_Key="1234"
54
55 export CX_Secret="sADDsdasdgdsf"
56
57 ```
58
59 Ok, let's issue cert now:
60 ```
61 le.sh --issue --dns dns_cx -d aa.com -d www.aa.com
62 ```
63
64 The `CX_Key` and `CX_Secret` will be saved in `~/.le/account.conf`, when next time you use Cloudxns.com api, it will reuse this key.
65
66
67
68 # Use custom api
69
70 If your api is not supported yet, you can write your own dns api.
71
72 Let's assume you want to name it 'myapi',
73
74 1. Create a bash script named `~/.le/dns_myapi.sh`,
75 2. In the scrypt, you must have a function named `dns_myapi-add()`. Which will be called by le.sh to add dns records.
76 3. Then you can use your api to issue cert like:
77
78 ```
79 le.sh --issue --dns dns_myapi -d aa.com -d www.aa.com
80 ```
81
82 For more details, please check our sample script: [dns_myapi.sh](dns_myapi.sh)
83
84
85
86