Skip to content

Instantly share code, notes, and snippets.

@Roman-Sky
Roman-Sky / certbot.sh
Last active March 11, 2024 04:10
Get Let's Encrypt Wildcard-certificate by performing DNS Challenge using Reg.ru API
# 1. Allow access from server's IP to reg.ru API: https://www.reg.ru/user/prefs/security
# 2. Set your username and password to reg.ru account in reg_ru_add.sh and reg_ru_delete.sh
apt-get install -y jq
certbot certonly --server "https://acme-v02.api.letsencrypt.org/directory" \
-n --agree-tos --manual-public-ip-logging-ok --preferred-challenges dns --manual \
-d "example.com" -d "*.example.com" -d "*.abc.example.com" \
--manual-auth-hook /root/reg_ru/reg_ru_add.sh \
--manual-cleanup-hook /root/reg_ru/reg_ru_delete.sh \
--deploy-hook "service nginx reload"