certbot
π―SkillInstallation
npx skills add g1joshi/agent-skills --skill certbotRun it in a terminal; it asks which AI coding tools to install it for (Claude Code, Codex, Cursor and more).
Uses skills.sh Β· Node.js 22.20+
After installing
Ask for related work and the agent uses it on its own, or call it yourself.
/certbotInstall by hand
Copy the whole skill folder from GitHub to the place below. Copying only SKILL.md can leave out files the skill uses.
Open the skill folder β- This project
.claude/skills/certbot/ - All projects
~/.claude/skills/certbot/
These paths are for Claude Code. For other tools, the command above puts it in the right place.
SKILL.md
View on GitHub βExpert Certbot SSL/TLS certificate assistance covering Let's Encrypt, ACME DNS/HTTP validation, and auto-renewal. Use when provisioning SSL certificates, setting up HTTPS, or troubleshooting cert renewals.
Certbot
Certbot is a free, open-source software tool for automatically using Let's Encrypt certificates on manually-administrated websites to enable HTTPS.
When to Use
- Automated SSL/TLS Certificate Issuance: Provisioning free, trusted Let's Encrypt certificates for web servers.
- Automatic Certificate Renewal: Configuring cron or systemd timers to renew expiring certificates without downtime.
- Wildcard Certificate Provisioning: Generating wildcard certificates (
*.example.com) via automated DNS-01 challenges. - Web Server Configuration Automation: Automatically configuring HTTPS directives, ciphers, and redirects in Nginx and Apache.
Quick Start
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/bin/certbot
# Auto-configure Nginx
sudo certbot --nginx
Core Concepts
Automated Certificate Management Environment (ACME)
Certbot proves domain ownership to the Let's Encrypt Certificate Authority through challenge-response protocols:
[ Web Server (Certbot) ] ββ1. Request Certificateβββ [ Let's Encrypt CA ]
ββ2. Challenge (HTTP-01)βββ
[ Let's Encrypt CA ] ββ3. Fetch /.well-known/acme-challenge/<token>βββ [ Web Server ]
[ Let's Encrypt CA ] ββ4. Issue Signed Certificate (90 Days)ββββββββββ [ Web Server ]
HTTP-01 vs DNS-01 Challenge Types
- HTTP-01: Serves a challenge file over port 80 at
/.well-known/acme-challenge/. Simple, but cannot issue wildcard certificates. - DNS-01: Creates a TXT record
_acme-challenge.example.com. Required for wildcard certificates and internal/private servers:
# Issue Wildcard Certificate via Cloudflare DNS-01 Challenge
certbot certonly \
--dns-cloudflare \
--dns-cloudflare-credentials ~/.secrets/cloudflare.ini \
-d "example.com" -d "*.example.com"
Non-Interactive Standalone Mode
Spins up a temporary standalone web server to validate domain control on machines without existing web servers:
certbot certonly --standalone -d api.example.com --non-interactive --agree-tos -m admin@example.com
Common Patterns
Automated Nginx Wildcard Certificate via DNS Challenge
Problem: HTTP-01 challenges fail on private services, firewalled servers, or wildcard subdomains.
Solution: Use the DNS-01 validation plugin for automated wildcard provisioning:
certbot certonly \
--dns-cloudflare \
--dns-cloudflare-credentials /etc/letsencrypt/cloudflare.ini \
-d "*.example.com" -d "example.com" \
--agree-tos --email security@example.com --non-interactive
Best Practices
Do:
- Test with
--dry-runFirst: Always test issuance and renewal against the Let's Encrypt staging environment to avoid hitting production rate limits. - Automate Service Reloads with Deploy Hooks: Use
--deploy-hook "systemctl reload nginx"so web servers reload new certificates upon renewal. - Retain Port 80 Open: Keep HTTP port 80 open to allow HTTP-01 renewal challenges to succeed smoothly.
- Monitor Expiration Dates with Prometheus / Datadog: Set up alerts if certificates have fewer than 20 days remaining.
Don't:
- Forget to configure renewal timers: Verify that
systemctl list-timers | grep certbotis active and running twice daily. - Hardcode DNS provider API tokens with global write access: Restrict cloud DNS API tokens to modify only the
_acme-challengeTXT records. - Delete
/etc/letsencrypt/files manually: Usecertbot delete --cert-name <domain>to remove decommissioned certificate configs.
Troubleshooting
| Error | Cause | Solution |
|---|---|---|
Timeout | Port 80 blocked. | Open Firewall/Security Group for Port 80 (HTTP-01 challenge). |
Rate Limit | Too many failures. | Wait 1 hour or use --test-cert. |
References
More from this repository10
A template skill providing a starter framework for creating new agent skills with structured sections for triggers, quick start examples, and capability descriptions.
Skill
Skill
Skill
Skill
Skill
Skill
Skill
Skill
Skill