Certbot Acme-Challenge Failure

I am trying to use Certbot on Ubuntu Server 20.04/Nginx to grab a Let's Encrypt certificate, but it seems like a new verification was put into place since the last time I used Let's Encrypt a couple years back…

I see the validator fails when accessing:

site.com/.well-known/acme-challenge/someRandomString

Followed some guides online to add the following lines to my virtual host block for Nginx:

location ^~ /.well-known/acme-challenge/ {
allow all;
root /var/lib/letsencrypt/;
default_type "text/plain";
try_files $uri =404;
}

When I run Certbot, I am getting a "file not found" error. I tested that this redirect is working by adding a test file named test.txt to:

/var/lib/letsencrypt/.well-known/acme-challenge/test.txt

which I can then access by going to:

mysite.com/.well-known/acme-challenge/test.txt

so I know this location block is working correctly, but I am obviously missing a piece of the puzzle.

When I run Certbot and refresh the /var/lib/letsencrypt folder (over sftp), I see that, very briefly a folder called "temp_checkpoint" is created then immediately erased, but can't check it out before Certbot apparently destroys it upon failure to access the file, but I presume this is where the file is being created…

SO, had anyone else run into this? I did a bunch of searches to no avail. Or, is there a way to "watch" this folder and grab the file output before it is deleted? I'm sure if I could read the contents I could figure out the structure, and thus how to structure my redirect.

1 Reply

@jeremiahrich I'm sorry to hear that you're having an issue with this Certbot failure. I'm not terribly familiar with this issue, but I found a couple of Let's Encrypt forum posts that may point you in the right direction and help you figure out what's going on here.

One of the post I found stated that the below command resolved the 404 error they were recieving.

certbot --nginx -d

I hope this helps! You may also be able to get additional help by creating your own post on on the Let's Encrypt forums.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct