Skip to content

Instantly share code, notes, and snippets.

@mkacz
Last active July 5, 2017 16:58
Show Gist options
  • Select an option

  • Save mkacz/ac910913c5c62971949df4a77816f70b to your computer and use it in GitHub Desktop.

Select an option

Save mkacz/ac910913c5c62971949df4a77816f70b to your computer and use it in GitHub Desktop.
# Install certbot on Ubuntu
# https://certbot.eff.org/#ubuntuxenial-nginx
# https://certbot.eff.org/docs/using.html#getting-certificates-and-choosing-plugins
$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:certbot/certbot
$ sudo apt-get update
$ sudo apt-get install certbot python-certbot-nginx
# vhost definition must be placed in /etc/nginx/sites-enabled/domain.tld
certbot --duplicate --nginx -d domain.tld -d www.domain.tld --email admin@domain.tld --agree-tos
# AUTO RENEWAL:
# Add below code to crontab
certbot renew
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment