https://github.com/lewangdev/certbot-self-hosting
A certbot container is used similarly to acme.sh
https://github.com/lewangdev/certbot-self-hosting
Last synced: 7 months ago
JSON representation
A certbot container is used similarly to acme.sh
- Host: GitHub
- URL: https://github.com/lewangdev/certbot-self-hosting
- Owner: lewangdev
- Created: 2024-02-29T14:51:52.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-29T15:24:41.000Z (about 2 years ago)
- Last Synced: 2025-04-08T13:25:36.711Z (12 months ago)
- Language: Shell
- Size: 1.95 KB
- Stars: 21
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# certbot-self-hosting
1. first request
```
export domain=example.com
export certbot_home=/data/var/lib/certbot
mkdir -p ${certbot_home}
mkdir -p ${certbot_home}/credentials
mkdir -p ${certbot_home}/letsencrypt
tee ${certbot_home}/letsencrypt/${domain}.ini <<-EOF
agree-tos = true
no-eff-email = true
authenticator = dns-aliyun
preferred-challenges = dns
dns-aliyun-credentials = '/root/.secrets/aliyun.ini'
dns-aliyun-propagation-seconds = 60
# REQUIRED
email = your_email@xxx.com
# REQUIRED
domains = '${domain},*.${domain}'
EOF
docker run --rm \
-v ${certbot_home}/credentials:/root/.secrets \
-v ${certbot_home}/letsencrypt:/etc/letsencrypt \
lewangdev/certbot \
certonly -c /etc/letsencrypt/${domain}.ini
```
2. renew
```
export domain=example.com
export certbot_home=/data/var/lib/certbot
mkdir -p ${certbot_home}
mkdir -p ${certbot_home}/credentials
mkdir -p ${certbot_home}/letsencrypt
tee ${certbot_home}/letsencrypt/${domain}.ini <<-EOF
agree-tos = true
no-eff-email = true
authenticator = dns-aliyun
preferred-challenges = dns
dns-aliyun-credentials = '/root/.secrets/aliyun.ini'
dns-aliyun-propagation-seconds = 60
# REQUIRED
email = your_email@xxx.com
# REQUIRED
domains = '${domain},*.${domain}'
EOF
docker run --rm \
-v ${certbot_home}/credentials:/root/.secrets \
-v ${certbot_home}/letsencrypt:/etc/letsencrypt \
lewangdev/certbot \
renew -c /etc/letsencrypt/${domain}.ini
```