Problem with NGINX in Home Assistant SSL- log error information attached


I have Home Assistant running on RPi 4, and im trying to setup remote access using this simple tutorial (starts at about 7:49)

Problem is, when I want to enable SSL certificates and force SSL and press enter, it says “internal error”. The log file shows this towards the end:

[2/19/2022] [9:09:10 AM] [Nginx    ] › ℹ  info      Reloading Nginx
[2/19/2022] [9:09:10 AM] [SSL      ] › ℹ  info      Requesting Let'sEncrypt certificates for Cert #5:
[2/19/2022] [9:09:16 AM] [Nginx    ] › ℹ  info      Reloading Nginx
[2/19/2022] [9:09:16 AM] [Express  ] › ⚠  warning   Command failed: /usr/bin/certbot certonly --non-interactive --config "/etc/letsencrypt.ini" --cert-name "npm-5" --agree-tos --email "[email protected]" --preferred-challenges "dns,http" --domains "" 
Saving debug log to /data/logs/letsencrypt/letsencrypt.log
Plugins selected: Authenticator webroot, Installer None
Performing the following challenges:
http-01 challenge for
Using the webroot path /data/letsencrypt-acme-challenge for all unmatched domains.
Waiting for verification...
Challenge failed for domain
http-01 challenge for
Cleaning up challenges
Some challenges have failed.

I’ve confirmed with my ISP and port checker, that port 80 is not blocked. I can actually login to my HA using my duckDNS url (on a different network) with HTTP only. How do I enable SSL?

Before this, I had DuckDNS with SSL enabled and working. I unsinstalled DuckDNS and MariaDB and then I reinstalled them again…but still geting this error.

Any help would be appreciated.

Did you check the log?

If you put image file in webroot, can you access it from web?

To get cert it places file on your site then verifies it can access it. If folder permissions are not correct it will fail

thats funny, in the terminal I don’t see the logs folder?

i type cd /data brings me there, but then there are only files in this folder related to ssh? how do I even access these log files?

I have the same problem and cant find the logs as well.
Did you solve the issue/ find the logs?

Opening Port 80 on my router again fixed the problem.
Closed it back then after finishing setup of home assistant.

Maybe its the same case for you as well

thanks for the information, maybe that was the problem for me.

I became a Nabu Casa subscriber. Much safer (for me, at least) as all my ports are closed now.

Letsencrypt uses port 80 during verification process.

It places file on server and tries to access it on port 80. This proves that you are currently in control of server and server is able to serve files at the site.

Not sure how addon works but I assume it is similar

1 Like