Certbot

From Freephile Wiki
Revision as of 16:22, 5 June 2017 by Freephile (talk | contribs) (Certbot reference; extracted from TLS page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Certbot is a tool that allows you to manage the Transport Layer Security (TLS) of your Webserver.

Let's Encrypt[edit | edit source]

We used to run certificates from StartSSL because they offer free one-year certificates. However, today we upgraded to using 'LetsEncrypt' and our certificates are both more secure and easier to manage. Instead of a "B" grade, we now have "A" grade security.

AGrade.png
BGrade.png

Certbot (code) is a fully-featured, extensible client for the Let's Encrypt CA (or any other CA that speaks the ACME protocol) that can automate the tasks of obtaining certificates and configuring web servers to use them. This client runs on Unix-based operating systems. It requires root access and is beta software.

Until May 2016, Certbot was named simply letsencrypt or letsencrypt-auto, depending on install method. Instructions on the Internet, and some pieces of the software, may still refer to this older name.

Certbot website at EFF.org (the Electronic Frontier Foundation).

Service[edit | edit source]

Using our Ansible role, we can install the certbot client. Then we can install as many certificates as needed; plus setup an automated job which will renew them every 90 days.

Resources[edit | edit source]

  1. https://letsencrypt.org/getinvolved/ Get Involved with Lets Encrypt
    1. https://letsencrypt.org/getting-started/ Getting Started
    2. https://github.com/letsencrypt/letsencrypt Code on GitHub
    3. https://letsencrypt.readthedocs.org/en/latest/ Docs
  2. Apache docs
  3. Ubuntu Server Guide - Certificates and Security
  4. Ansible role for LetsEncrypt

FAQ[edit | edit source]

How do I obtain a new certificate?
  1. setup the SSL virtual host in Apache, and be sure to include some SSLCertificateFile and SSLCertificateKeyFile directives using the "snake-oil" certs.
    e.g.
    SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
    SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
  2. Then run certbot
    /opt/certbot/certbot-auto --apache -d example.org,www.example.org,wiki.example.org --dry-run
    /opt/certbot/certbot-auto --apache -d example.org,www.example.org,wiki.example.org
What certs do I have?
sudo /opt/certbot/certbot-auto certificates
How do I expand a cert to include some sub-domains? (wildcard certs are not supported)
sudo /opt/certbot/certbot-auto certonly --cert-name example.org --expand -d example.org,www.example.org,wiki.example.org,example.com,www.example.com,wiki.example.com
How do I cleanup my old/test certificates?
sudo /opt/certbot/certbot-auto revoke --cert-path /etc/letsencrypt/live/baz.example.org/cert.pem
sudo /opt/certbot/certbot-auto delete --cert-name baz.example.org