How to create a cert in a local VM running Ubuntu 14.04

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: coffeenotes.me

I ran this command: sudo certbot --nginx certonly

It produced this output:

vagrant@vagrant-ubuntu-trusty-32:/etc/nginx/sites-enabled$ sudo certbot --nginx certonly
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx

Which names would you like to activate HTTPS for?
-------------------------------------------------------------------------------
1: coffeenotes.me
-------------------------------------------------------------------------------
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 1
Obtaining a new certificate
Performing the following challenges:
tls-sni-01 challenge for coffeenotes.me
Waiting for verification...
Cleaning up challenges
Failed authorization procedure. coffeenotes.me (tls-sni-01): urn:acme:error:connection :: The server could not 
connect to the client to verify the domain :: Connection refused

IMPORTANT NOTES:
 - The following errors were reported by the server:

   Domain: coffeenotes.me
   Type:   connection
   Detail: Connection refused

   To fix these errors, please make sure that your domain name was
   entered correctly and the DNS A/AAAA record(s) for that domain
   contain(s) the right IP address. Additionally, please check that
   your computer has a publicly routable IP address and that no
   firewalls are preventing the server from communicating with the
   client. If you're using the webroot plugin, you should also verify
   that you are serving files from the webroot path you provided.

My web server is (include version): nginx/1.4.6

The operating system my web server runs on is (include version): Ubuntu 14.04.4

My hosting provider, if applicable, is: Local VM (Vagrant, VirtualBox, Ansible)

I can login to a root shell on my machine (yes or no, or I don’t know): yes

I’m using a control panel to manage my site (no, or provide the name and version of the control panel): no

Extra information: I am working on a personal project on a local VM, I need to have SSL cert set up and having a hard time using letsencrypt/certbot to generate one. Any help or pointer is greatly appreciated.

You’ll need to make sure port 443 (as you’re using the tls-sni-01 challenge) is available from the world wide web. And it needs to connect to your VM when someone from the WWW is trying to connect to your public IP address on port 443.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.