An open API service indexing awesome lists of open source software.

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

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
```