If you need to use a docker machine or any other server listening on other port than 80, you can use this snippet to authenticate your domain with Let's encrypt.
- Add the content of
site.confto your nginx configuration - Create the folder
/var/www/letsencrypt - Run the
certbot-autousing the webroot plugin--webroot -w /var/www/letsencrypt/