I followed this guide: How To Install and Configure Nextcloud on Ubuntu 18.04 | DigitalOcean
I was trying to setup Nextcloud on Ubuntu 18.04 and once I reach the Lets Encrypt stage, it fails at the http-01 challenge. I made sure my nameservers are pointed at the correct domain, I've setup A and AAAA records pointing to the servers IP and I have a virtualhost setup in apache (see below).
<VirtualHost *:80>
ServerAdmin admin@harrystie.com
ServerName harrystie.com
ServerAlias www.harrystie.com
DocumentRoot /var/www/harrystie.com
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
For some reason, I'm just unable to get a certificate. If it's of any help, I purchased the domain in the last 7 hours and was wondering if perhaps it was some kind of propagation issue. I tested the site out on the following website and it saw it okay:
https://check-your-website.server-daten.de/?q=harrystie.com
My domain is: harrystie.com
I ran this command: sudo nextcloud.enable-https lets-encrypt
It produced this output:
jambalaya@ubuntu-s-1vcpu-2gb-nyc1-01:/home$ sudo nextcloud.enable-https lets-encrypt
In order for Let's Encrypt to verify that you actually own the
domain(s) for which you're requesting a certificate, there are a
number of requirements of which you need to be aware:
In order to register with the Let's Encrypt ACME server, you must
agree to the currently-in-effect Subscriber Agreement located
here:https://letsencrypt.org/repository/
By continuing to use this tool you agree to these terms. Please
cancel now if otherwise.You must have the domain name(s) for which you want certificates
pointing at the external IP address of this machine.Both ports 80 and 443 on the external IP address of this machine
must point to this machine (e.g. port forwarding might need to be
setup on your router).Have you met these requirements? (y/n) y
Please enter an email address (for urgent notices or key recovery): xxx@xxx.org
Please enter your domain name(s) (space-separated): harrystie.com
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 harrystie.com
Using the webroot path /var/snap/nextcloud/current/certs/certbot for all unmatched domains.
Waiting for verification...
Challenge failed for domain harrystie.com
http-01 challenge for harrystie.com
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:404 Not Found
The following errors were reported by the server:
Domain: harrystie.com
Type: unauthorized
Detail: Invalid response from
http://harrystie.com/.well-known/acme-challenge/r253x6KzuKcSL1RtyilE7qCKFATnFdjRcFq2BB2xE48
[157.230.91.98]: "Not Found
<p"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.
- Your account credentials have been saved in your Certbot
configuration directory at
/var/snap/nextcloud/current/certs/certbot/config. You should make a
secure backup of this folder now. This configuration directory will
also contain certificates and private keys obtained by Certbot so
making regular backups of this folder is ideal.
My web server is (include version): Apache/2.4.29 (Ubuntu)
The operating system my web server runs on is (include version): Ubuntu 18.04
My hosting provider, if applicable, is: DigitalOcean
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
The version of my client is (e.g. output of certbot --version
or certbot-auto --version
if you're using Certbot): N/A