Generate a SSL certificate for the current host (without having to change the DNS).
On any linux version that supports snap. For example out of the box Ubuntu 16+ or Ubuntu 14.04 after installing snapd.
Note: that not all hostnames are allowed when using letsencrypt. You can’t for example use a “*.compute.amazonaws.com” hostname.
Install Docker:
sudo snap install docker
Generate Certificate
Create folder to store certificates:
mkidr letsencrypt
Generate Certificate using docker (make sure the port 80 is accessible on the server):
sudo docker run -p 80:80 -v ${PWD}/letsencrypt:/etc/letsencrypt -it certbot/certbot certonly
Follow on-screen instructions. When prompted to select how to authenticate, select “Spin a temporary Server”:
How would you like to authenticate with the ACME CA? 1: Spin up a temporary webserver (standalone) 2: Place files in webroot directory (webroot)
Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 1
0 Comments