Hello,
The last couple days I am struggling to get a ssl certificate for my web app. I use Nextjs with Nginx and I am trying to use certbot in order to get the certificate. After a lot of searching around I ended up at this specific point where it says No TXT record found at _acme-challenge.agoratsp.com
I have run a scan which points out some things I am not quite sure how to fix. Check the scan results here
The rest of the details are listed below
My domain is: agoratsp.com
I ran this command: sudo certbot certonly --manual --manual-auth-hook /etc/letsencrypt/acme-dns-auth.py --preferred-challenges dns --debug-challenges -d *.agoratsp.com -d agoratsp.com -v
It produced this output:Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator manual, Installer None
Requesting a certificate for *.agoratsp.com and agoratsp.com
Performing the following challenges:
dns-01 challenge for agoratsp.com
dns-01 challenge for agoratsp.com
Running manual-auth-hook command: /etc/letsencrypt/acme-dns-auth.py
Running manual-auth-hook command: /etc/letsencrypt/acme-dns-auth.py
Challenges loaded. Press continue to submit to CA. Pass "-v" for more info about
challenges.
Press Enter to Continue-v
Waiting for verification...
Challenge failed for domain agoratsp.com
Challenge failed for domain agoratsp.com
dns-01 challenge for agoratsp.com
dns-01 challenge for agoratsp.com
Certbot failed to authenticate some domains (authenticator: manual). The Certificate Authority reported these problems:
Domain: agoratsp.com
Type: unauthorized
Detail: No TXT record found at _acme-challenge.agoratsp.com
Domain: agoratsp.com
Type: unauthorized
Detail: No TXT record found at _acme-challenge.agoratsp.com
Hint: The Certificate Authority failed to verify the DNS TXT records created by the --manual-auth-hook. Ensure that this hook is functioning correctly and that it waits a sufficient duration of time for DNS propagation. Refer to "certbot --help manual" and the Certbot User Guide.
Cleaning up challenges
Some challenges have failed.
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.
My web server is (include version): NextJS latest version
The operating system my web server runs on is (include version): ubuntu 22.04
My hosting provider, if applicable, is: Contabo
My domain provider is: Hostigner
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): 1.21.0
The nginx config for my website is:
server {
listen 80;
listen [::]:80;
server_name agoratsp.com www.agoratsp.com;
include /etc/nginx/snippets/letsencrypt-acme-challenge.conf;
location / {
# reverse proxy for next server
proxy_pass http://localhost:3000/;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
return 301 https://www.agoratsp.com/$request_uri;
}
location ^~ /.well-known/acme-challenge/ {
allow all;
default_type "text/plain";
root /var/www/html;
}
}
Thanks in advance!!