Skip to content

Instantly share code, notes, and snippets.

@nicholaskajoh
Created December 26, 2021 20:13
Show Gist options
  • Save nicholaskajoh/4776a433a729a6458c4e1bd7b9f96a07 to your computer and use it in GitHub Desktop.
Save nicholaskajoh/4776a433a729a6458c4e1bd7b9f96a07 to your computer and use it in GitHub Desktop.
Renew wildcard SSL certificate from Let's Encrypt with Certbot on DigitalOcean Droplet
#!/bin/bash
# Get SSL cert from Let's Encrypt.
# See https://www.digitalocean.com/community/tutorials/how-to-create-let-s-encrypt-wildcard-certificates-with-certbot.
certbot certonly \
--server https://acme-v02.api.letsencrypt.org/directory \
--dns-digitalocean \
--dns-digitalocean-credentials /path/to/certbot-creds.ini \
--dns-digitalocean-propagation-seconds 300 \
-d \*.example.com \
-d example.com \
<<< $'2\n' # Renew & replace the cert.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment