Skip to content

Instantly share code, notes, and snippets.

@madsonic
Last active October 9, 2019 07:30
Show Gist options
  • Select an option

  • Save madsonic/56b7c7dfc96f31b0f01b3f38dd3de617 to your computer and use it in GitHub Desktop.

Select an option

Save madsonic/56b7c7dfc96f31b0f01b3f38dd3de617 to your computer and use it in GitHub Desktop.
certbot
# manual
certbot --help all
# Add Certbot PPA
sudo apt-get update -y
sudo apt-get install -y software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update -y
# install certbot
sudo apt-get install -y certbot
# cert creation / challenge
# various challenge method
sudo certbot certonly --standalone
sudo certbot --manual --preferred-challenges dns certonly -d <domain-name>
# Test automatic renewal
# If you needed to stop your webserver to run Certbot,
# you'll want to edit the built-in command to add the --pre-hook and --post-hook flags to stop and start
# your webserver automatically. For example, if your webserver is HAProxy,
# add the following to the certbot renew command:
sudo certbot renew --dry-run [--pre-hook "service haproxy stop" --post-hook "service haproxy start"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment