Connect Ubuntu Homeserver with Namecheap Domain

Hello, I am trying to set up a Nextcloud on my Ubuntu home server and connect it to my Namecheap domain.

I installed Nextcloud via snap and added my DOMAIN to the trusted domains. Generally, I followed this guide:

Now I tried to connect it to my DOMAIN after setting a host record with my server’s EXTERNAL_IP. However, connecting via the let’s encrypt method seems to keep failing.

Do I need any other certificates than explicitly adding the EXTERNAL_IP as a host record?

Attempting to obtain certificates... error running certbot:

Saving debug log to /var/snap/nextcloud/current/certs/certbot/logs/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for DOMAIN
Using the webroot path /var/snap/nextcloud/current/certs/certbot for all unmatched domains.
Waiting for verification...
Challenge failed for domain DOMAIN
http-01 challenge for DOMAIN
Cleaning up challenges
Some challenges have failed.
 - The following errors were reported by the server:

   Domain: DOMAIN
   Type:   connection
   Detail: EXTERNAL_IP: Fetching
   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.

Hello @LucaR

For now, your configuration looks pretty good. But as below because of the error, your server doesn’t know which domain to link this to. The connection between the domain and the server is still missing. They can usually change the DNS entries in your domain settings. Here you need to set an A record (for IPv4 addresses) and an AAAA record (for IPv6 addresses.
This must then always be the public IP address. (You can also find them online:

Also make sure that ports 80 (http) and 443 (https) are reachable from the internet. If you need help with this, please feel free to write.

However, if the IP address changes again because it is not static, this must also be changed again in the domain settings.
We also have blogs about how to change them automatically, but that’s a bit more complicated: https://technik.schä

Hope I could help a bit

1 Like

Hmm, I added the ipv6 now, but am still getting the same error. The ip is also static