Challenge failed for domain

hello I am a beginner and this is the first time I use certbot! the problem is that my postfix mail listens on lel port 587 but my mail client cannot accept the STMP port 587 .. so I will try to create a certificate for my local domain which I created in the powerdns database . but I have the error 'Challenge failed for domain'

My domain is: (created in my database )

I ran this command: sudo certbot --nginx -d

It produced this output: Challenge failed for domain

My web server is (include version): localhost

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

Hi @bensaidRayen

you can't create a certificate with your local domain name.

A worldwide unique, public visible domain name is required to create a certificate.

1 Like

thnx you very much !!!

But you don't need to buy a domain.; there are at least a couple of other possibilities:

  • You could register for a free domain from I used them, their renewal requirements were annoying, but they were still no-cost domain names.
  • You may be able to use a free subdomain from a dynamic DNS provider.
  • You could even run your own PKI. It's pretty straightforward to set up your own Certificate Authority on a Raspberry Pi, which would then be used by devices on your local network. You'd need to install its root certificate on any devices you wanted to trust it, of course, but it works well, and even presents a ACME interface for other systems to get certs:
    Build a Tiny Certificate Authority For Your Homelab
1 Like

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