Auto authorisation fails but manual authorisation using --debug-challenges works

do not use --force-renewal.

It looks like your script is trying to do what certbot already does by itself, check what certificates are expiring and try to renew them.

I can only suggest something is broken there, and if you do not want to restart nginx you should use the webroot plugin instead (you should make all websites share a webroot for the /.well-known/acme-challenge directory), kinda like:

server {
        listen 80;
        listen [::]:80;
        server_name _;

        location /.well-known/acme-challenge/ {
                root /var/www/acme;
        }

        location / {
                return 301 https://$host$request_uri;
        }
}
1 Like