Certbot (Let's Encrypt) SSL Certificates
Certbot (formerly known as Let's Encrypt) can be used to obtain free TLS certificates to encrypt connections to any website you own. This guide assumes that you already own a fully qualified domain name with a DNS record pointing to the IP address of your Whatbox slot.
Because Certbot exists as a python pip package, it can be easily installed into an existing virtualenv. After setting up a basic virtualenv and nginx installation, certbot can be installed as follows.
- Install certbot and its dependencies:
pip install certbot
- Fix certbot install (https://github.com/certbot/certbot/issues/2872)
pip install pip -U pip install virtualenv -U pip install zope.interface -U pip install certbot -U
- Create certificate/work/configuration directories
mkdir -p ~/.cerbot mkdir -p ~/.cerbot/work mkdir -p ~/.cerbot/logs
- Certbot is now functional, but we must specify our custom directories when invoking the
certbot --config-dir=~/.certbot --work-dir=~/.certbot/work --logs-dir=~/.certbot/logs
However, this can be simplified with an
alias added to
echo 'alias certbot="certbot --config-dir=~/.certbot --work-dir=~/.certbot/work --logs-dir=~/.certbot/logs"' >> ~/.bashrc source ~/.bashrc
- When using certbot with
webrootverification, you will need to specify your custom port for nginx using the
Also keep in mind that since your server is shared that your private key is not protected compared with the Certbot default installation on a private server. For further Certbot usage documentation, see Certbot's user guide.
- After obtaining your certificate, configure your nginx instance to use the certificate and adjust your configuration accordingly.