Skip to content

Instantly share code, notes, and snippets.

@jfsanchez91
Created August 5, 2021 14:18
Show Gist options
  • Save jfsanchez91/07442d39bfc803fd5eaeb1e357332ac8 to your computer and use it in GitHub Desktop.
Save jfsanchez91/07442d39bfc803fd5eaeb1e357332ac8 to your computer and use it in GitHub Desktop.
Bash script for manually generate LetsEncrypt certificates.
#!/bin/bash
echo -n "Enter domain name ( e.g: example.com): "
read domain
echo -n "Enter your email address: "
read email
echo "Generating LetsEncrypt certificate for the domains: $domain and *.$domain"
certbot certonly \
--email $email \
--agree-tos \
--manual --preferred-challenges dns \
--server https://acme-v02.api.letsencrypt.org/directory \
--manual-public-ip-logging-ok \
-d $domain -d *.$domain
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment