How to use certbot using localhost name

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is: i dont have domain i have a hostname of my machine registry,mylocalk8s.local

I ran this command:
sudo certbot --nginx --non-interactive --agree-tos --email contact@mylocalk8s.local --domains registry.mylocalk8s.com --reinstall --redirect

It produced this output:
Either it didn't find A record and was giving errors regarding A record and when I put .local it produced below error:

cregistry@cregistry:/etc/nginx/sites-enabled$ sudo certbot --nginx --non-interactive --agree-tos --email contact@local.com --domains registry.mylocalk8s.local --reinstall --redirect
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Obtaining a new certificate
An unexpected error occurred:
The server will not issue certificates for the identifier :: Error creating new order :: Cannot issue for "registry.mylocalk8s.local": Domain name does not end with a valid public suffix (TLD)
Please see the logfiles in /var/log/letsencrypt for more details.

My web server is (include version):
nginx version: nginx/1.18.0 (Ubuntu)

The operating system my web server runs on is (include version):
ubuntu 20.4 LTS

My hosting provider, if applicable, is: local deployment on VMWare

I can login to a root shell on my machine (yes or no, or I don't know): yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

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

Hello @joshtheflame, welcome to the Let's Encrypt community. :slightly_smiling_face:

Let’s Encrypt offers Domain Validation (DV) certificates. Let's Encrypt does not offer local host without a public facing domain name a Domain Validation (DV) certificates.

6 Likes

Regarding your question about using Certbot for local hostnames: you could set up your own CA with an ACME server and use the Certbot --server option so it will use your own ACME server.

5 Likes

ok thanks alot i think i will try to generate my own SSL using nginx and use that. appreciate your response.

3 Likes