Let's Encrypt renew test

Let’s encrypt failed to test renew --dry-run, because Let’s encrypt try to access which is doesn’t exist.

My setup :

Ubuntu 08.04 - Nginx - Let’s Encrypt

nginx configuration

server {

        root /var/www/;
        index index.html index.htm index.nginx-debian.html;


        location / {
                try_files $uri $uri/ =404;

    listen [::]:443 ssl ipv6only=on; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/; # managed $
    ssl_certificate_key /etc/letsencrypt/live/; # manage$
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

server {
    if ($host = {
        return 301 https://$host$request_uri;
    } # managed by Certbot

        listen 80;
listen [::]:80;

    return 404; # managed by Certbot


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Site Moderator
Site Moderator badge
May 10, 2020
Accepted Answer

Hi @dhidyawdiyan,

The .well-known folder should automatically be created. If certbot can’t create the folder than most probably, you are not using the proper permissions or ownership on your folders.

I’ll recommend setting up the folders to be with permissions 755 and files with permissions 644. TO do that, you can do the following

For Files

find /path/to/website -type f -exec chmod 644 {} \;

For Folders

find /path/to/website -type d -exec chmod 755 {} \;

If you need to change the ownership of your files, you’ll need to use

chown -R User:Group /path/to/website 

You’ll need to change the /path/to/website with your actual path to your website. As for the User:Group, you’ll need to change it to the ones you have configured in your Nginx conf(They are usually the same for both user and group).

Regards, KDSys

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel