Last active
September 6, 2024 10:15
-
-
Save lbt/dbe56493011ca6db9063072d891cb206 to your computer and use it in GitHub Desktop.
LE subdomain for Cloudflare hosted DNS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
certbot -v -n certonly --manual --force-renewal -d "*.local.example.com" \ | |
--preferred-challenges dns --agree-tos --email [email protected] \ | |
--logs-dir ~/letsencrypt/logs \ | |
--config-dir ~/letsencrypt/etc \ | |
--work-dir ~/letsencrypt/work/. \ | |
--manual-auth-hook ~/letsencrypt/manual-local-hook.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Needs the Cloudflare cli4 installed in a venv: | |
~/venv-letsencrypt/bin/cli4 --patch content="$CERTBOT_VALIDATION" /zones/:example.com/dns_records/:_acme-challenge.local.example.com | |
echo changed to: | |
echo "_acme-challenge.local.example.com. 60 IN TXT \"$CERTBOT_VALIDATION\"" | |
echo waiting... | |
sleep 10 | |
echo dig says | |
dig @1.1.1.1 _acme-challenge.local.example.com -t txt | grep -i txt | grep -v \; | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment