https://github.com/al-one/certbot-auth-dnspod
Certbot DNS Authenticator For DNSPod
https://github.com/al-one/certbot-auth-dnspod
certbot certbot-dns-authenticator dnspod letsencrypt
Last synced: over 1 year ago
JSON representation
Certbot DNS Authenticator For DNSPod
- Host: GitHub
- URL: https://github.com/al-one/certbot-auth-dnspod
- Owner: al-one
- Created: 2018-09-11T09:26:17.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-01-04T13:17:25.000Z (over 5 years ago)
- Last Synced: 2024-11-24T18:12:55.484Z (over 1 year ago)
- Topics: certbot, certbot-dns-authenticator, dnspod, letsencrypt
- Language: Shell
- Size: 5.86 KB
- Stars: 95
- Watchers: 4
- Forks: 30
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Certbot DNS Authenticator For DNSPod
此脚本针对域名使用DNSPod解析,且certbot使用dns方式验证。如果在执行`certbot renew`时出现如下错误时,可以试试此脚本。
> Could not choose appropriate plugin: The manual plugin is not working; there may be problems with your existing configuration. The error was: PluginError('An authentication script must be provided with --manual-auth-hook when using the manual plugin non-interactively.',). Skipping.
## Installing
```sh
$ wget https://raw.githubusercontent.com/al-one/certbot-auth-dnspod/master/certbot-auth-dnspod.sh
$ chmod +x certbot-auth-dnspod.sh
```
## Config
> Get Your DNSPod Token From https://www.dnspod.cn/console/user/security
> Token Format: `ID,Token` See: https://www.dnspod.cn/docs/info.html#common-parameters
```sh
$ export DNSPOD_TOKEN="your dnspod token"
```
or
```sh
$ echo "your dnspod token" > /etc/dnspod_token
```
or
```sh
$ echo "your dnspod token" > /etc/dnspod_token_$CERTBOT_DOMAIN
# echo "your dnspod token" > /etc/dnspod_token_laravel.run
```
## Usage
```sh
$ certbot certonly --manual --preferred-challenges dns-01 --email mail@domain.com -d laravel.run -d *.laravel.run --server https://acme-v02.api.letsencrypt.org/directory --manual-auth-hook /path/to/certbot-auth-dnspod.sh --manual-cleanup-hook "/path/to/certbot-auth-dnspod.sh clean"
```
or
```sh
$ certbot renew --manual-auth-hook /path/to/certbot-auth-dnspod.sh --manual-cleanup-hook "/path/to/certbot-auth-dnspod.sh clean"
```
or add crontab
```crontab
0 2 1 * * sh -c 'date "+\%Y-\%m-\%d \%H:\%M:\%S" && /usr/bin/certbot renew --manual-auth-hook /path/to/certbot-auth-dnspod.sh --manual-cleanup-hook "/path/to/certbot-auth-dnspod.sh clean"' >> /var/log/certbot-renew.log 2>&1
```