Certbot

From G1Joshi/Agent-Skills · View interactive version

Certbot is an AI agent skill from the GitHub repository G1Joshi/Agent-Skills. 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.

How to use this skill

Skill file

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

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

# 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:

Don't:

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

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.