Home Assistant Python Environment can't generate certbot certificate

Hi there, I need some help here. I’m already pull my hairs :slight_smile:
I have a Home Assistant running locally using python environment. So, I don’t have a dedicated webserver for that.
However, i’m using duckdns with port forwarding for my Home Assistant locally instance.
When I try run certbot command on my terminal, it give me the following error:

My domain is:

I ran this command:
certbot sudo certbot certonly --standalone

It produced this output:

Obtaining a new certificate
Performing the following challenges:
http-01 challenge for nsilvaha.duckdns.org
Waiting for verification…
Challenge failed for domain nsilvaha.duckdns.org
http-01 challenge for nsilvaha.duckdns.org
Cleaning up challenges
Some challenges have failed.


The version of my client is (e.g. output of certbot --version or certbot-auto --version if you’re using Certbot):
certbot 1.7.0

Please help me.

Many thanks :slight_smile:

1 Like

Your HA is running on another port than 80, right? For the certificate challenge using the standalone plugin, you need to portmap port 80 too.

1 Like

Hi Osiris,
Thanks for your reply.
Yes, my HA is running on 8123. My router is redirecting port 80 to 8123
Like this:

So, when I access to http://nsilvaha.duckdns.org/ (port 80) it redirects for the Home Assistant.

I don’t know what you mean with standalone plugin, I’m running this command: sudo certbot certonly --standalone

1 Like

The option --standalone makes certbot use the standalone plugin for authentication. Read more about the plugin (and the other plugins) in the certbot documentation. If you understand how the standalone plugin works, you’ll also understand why your current setup doesn’t work.

1 Like

Thanks, it was solved!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.