Problems with generate certificates for GitLab nginx server on VirtualBox

Please fill out the fields below so we can help you better.

My domain is:

I ran this command: sudo certbot certonly --webroot --webroot-path=/var/www/letsencrypt -d

The operating system my web server runs on is (include version): ubuntu 16.04

Hi guys,
i had installed GitLab EE on my VirtualBox Ubuntu 16.04. Also, i bought domain Next in Virtualbox i had activated second with host only settings - this allow me to receive ip address and assign it to my domain. When i create self signed certificate everything is ok i can access to my domain by https but i would like to use let’s encrypt option. So i proceeded this tutorial:
but when i call this command:
sudo certbot certonly --webroot --webroot-path=/var/www/letsencrypt -d
it throw me strange exception:
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for
Using the webroot path /var/www/letsencrypt for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. (http-01): urn:acme:error:unknownHost :: The server could not resolve a domain name :: No valid IP addresses found for


  • The following errors were reported by the server:

    Type: unknownHost
    Detail: No valid IP addresses found for

    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.

Maybe somebody will have any advice how to solve this problem?

The A record for this domain points to a local IP address ( This is not accessible from the public internet, and is an invalid setup. Using HTTP-01 challenges, your server must be publicly accessible.

If you cannot modify this, then you are still able to use the DNS-01 challenge type, however the automation of that process is highly dependent on your DNS provider allowing programmatic access. Without that, you would need to manually intervene to create the required TXT entries every time you renew.

Ok so conslusion is that when I assign Public ip to this sever it solve my problem?

Yes, assigning a public IP address should solve your problem.

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