Skip to content
This repository was archived by the owner on Jan 6, 2021. It is now read-only.

Commit 952f7a0

Browse files
authored
Merge pull request #412 from Samuel-0-0/master
add aliyun dns support
2 parents b50ef60 + 03277b7 commit 952f7a0

File tree

7 files changed

+14
-4
lines changed

7 files changed

+14
-4
lines changed

Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ RUN \
9393
pip && \
9494
pip3 install -U \
9595
${CERTBOT} \
96+
certbot-dns-aliyun \
9697
certbot-dns-cloudflare \
9798
certbot-dns-cloudxns \
9899
certbot-dns-cpanel \

Dockerfile.aarch64

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ RUN \
9393
pip && \
9494
pip3 install -U \
9595
${CERTBOT} \
96+
certbot-dns-aliyun \
9697
certbot-dns-cloudflare \
9798
certbot-dns-cloudxns \
9899
certbot-dns-cpanel \

Dockerfile.armhf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ RUN \
9393
pip && \
9494
pip3 install -U \
9595
${CERTBOT} \
96+
certbot-dns-aliyun \
9697
certbot-dns-cloudflare \
9798
certbot-dns-cloudxns \
9899
certbot-dns-cpanel \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ Container images are configured using parameters passed at runtime (such as thos
135135
| `-e URL=yourdomain.url` | Top url you have control over (`customdomain.com` if you own it, or `customsubdomain.ddnsprovider.com` if dynamic dns). |
136136
| `-e SUBDOMAINS=www,` | Subdomains you'd like the cert to cover (comma separated, no spaces) ie. `www,ftp,cloud`. For a wildcard cert, set this _exactly_ to `wildcard` (wildcard cert is available via `dns` and `duckdns` validation only) |
137137
| `-e VALIDATION=http` | Letsencrypt validation method to use, options are `http`, `dns` or `duckdns` (`dns` method also requires `DNSPLUGIN` variable set) (`duckdns` method requires `DUCKDNSTOKEN` variable set, and the `SUBDOMAINS` variable must be either empty or set to `wildcard`). |
138-
| `-e DNSPLUGIN=cloudflare` | Required if `VALIDATION` is set to `dns`. Options are `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `google`, `inwx`, `linode`, `luadns`, `nsone`, `ovh`, `rfc2136`, `route53` and `transip`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`. |
138+
| `-e DNSPLUGIN=cloudflare` | Required if `VALIDATION` is set to `dns`. Options are `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `google`, `inwx`, `linode`, `luadns`, `nsone`, `ovh`, `rfc2136`, `route53`, `transip` and `aliyun`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`. |
139139
| `-e DUCKDNSTOKEN=<token>` | Required if `VALIDATION` is set to `duckdns`. Retrieve your token from https://www.duckdns.org |
140140
| `-e EMAIL=<e-mail>` | Optional e-mail address used for cert expiration notifications. |
141141
| `-e DHLEVEL=2048` | Dhparams bit value (default=2048, can be set to `1024` or `4096`). |

readme-vars.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ cap_add_param_vars:
5151
# optional container parameters
5252
opt_param_usage_include_env: true
5353
opt_param_env_vars:
54-
- { env_var: "DNSPLUGIN", env_value: "cloudflare", desc: "Required if `VALIDATION` is set to `dns`. Options are `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `google`, `inwx`, `linode`, `luadns`, `nsone`, `ovh`, `rfc2136`, `route53` and `transip`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`." }
54+
- { env_var: "DNSPLUGIN", env_value: "cloudflare", desc: "Required if `VALIDATION` is set to `dns`. Options are `aliyun`, `cloudflare`, `cloudxns`, `cpanel`, `digitalocean`, `dnsimple`, `dnsmadeeasy`, `domeneshop`, `gandi`, `google`, `inwx`, `linode`, `luadns`, `nsone`, `ovh`, `rfc2136`, `route53` and `transip`. Also need to enter the credentials into the corresponding ini (or json for some plugins) file under `/config/dns-conf`." }
5555
- { env_var: "DUCKDNSTOKEN", env_value: "<token>", desc: "Required if `VALIDATION` is set to `duckdns`. Retrieve your token from https://www.duckdns.org" }
5656
- { env_var: "EMAIL", env_value: "<e-mail>", desc: "Optional e-mail address used for cert expiration notifications." }
5757
- { env_var: "DHLEVEL", env_value: "2048", desc: "Dhparams bit value (default=2048, can be set to `1024` or `4096`)." }
@@ -125,6 +125,7 @@ app_setup_nginx_reverse_proxy_block: ""
125125

126126
# changelog
127127
changelogs:
128+
- { date: "23.02.20:", desc: "Add aliyun dns validation plugin." }
128129
- { date: "28.01.20:", desc: "Deprecate tls-sni validation method, remove from docs." }
129130
- { date: "27.01.20:", desc: "Add support for cpanel dns validation." }
130131
- { date: "10.01.20:", desc: "Add support for domeneshop dns validation." }

root/defaults/dns-conf/aliyun.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Obtain Aliyun RAM AccessKey
2+
# https://ram.console.aliyun.com/
3+
# And ensure your RAM account has AliyunDNSFullAccess permission.
4+
5+
certbot_dns_aliyun:dns_aliyun_access_key = 12345678
6+
certbot_dns_aliyun:dns_aliyun_access_key_secret = 1234567890abcdef1234567890abcdef

root/etc/cont-init.d/50-config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ cp /config/fail2ban/jail.local /etc/fail2ban/jail.local
7676
cp /defaults/ldap.conf /config/nginx/ldap.conf
7777

7878
# check to make sure DNSPLUGIN is selected if dns validation is used
79-
[[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(cloudflare|cloudxns|cpanel|digitalocean|dnsimple|dnsmadeeasy|domeneshop|gandi|google|inwx|linode|luadns|nsone|ovh|rfc2136|route53|transip)$ ]] && \
79+
[[ "$VALIDATION" = "dns" ]] && [[ ! "$DNSPLUGIN" =~ ^(aliyun|cloudflare|cloudxns|cpanel|digitalocean|dnsimple|dnsmadeeasy|domeneshop|gandi|google|inwx|linode|luadns|nsone|ovh|rfc2136|route53|transip)$ ]] && \
8080
echo "Please set the DNSPLUGIN variable to a valid plugin name. See docker info for more details." && \
8181
sleep infinity
8282

@@ -180,7 +180,7 @@ if [ "$VALIDATION" = "dns" ]; then
180180
PREFCHAL="-a certbot-plugin-${DNSPLUGIN}:dns --certbot-plugin-${DNSPLUGIN}:dns-credentials /config/dns-conf/${DNSPLUGIN}.ini --manual-public-ip-logging-ok"
181181
elif [[ "$DNSPLUGIN" =~ ^(google)$ ]]; then
182182
PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.json --manual-public-ip-logging-ok --dns-${DNSPLUGIN}-propagation-seconds 120"
183-
elif [[ "$DNSPLUGIN" =~ ^(domeneshop|inwx|transip)$ ]]; then
183+
elif [[ "$DNSPLUGIN" =~ ^(aliyun|domeneshop|inwx|transip)$ ]]; then
184184
PREFCHAL="-a certbot-dns-${DNSPLUGIN}:dns-${DNSPLUGIN} --certbot-dns-${DNSPLUGIN}:dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini --manual-public-ip-logging-ok --certbot-dns-${DNSPLUGIN}:dns-${DNSPLUGIN}-propagation-seconds 180"
185185
else
186186
PREFCHAL="--dns-${DNSPLUGIN} --dns-${DNSPLUGIN}-credentials /config/dns-conf/${DNSPLUGIN}.ini --manual-public-ip-logging-ok"

0 commit comments

Comments
 (0)