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. https://crt.sh/?q=example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.
Then you can't get a certificate. Let's Encrypt doesn't issue certs for IP addresses (like the error message you quoted says), and no CA will issue certs for private IP addresses.
You could however register a free domain name with a service known to have an API compatible with one of the DNS plugins of certbot and get a certificate for that hostname. If you’d use a DNS plugin it doesn’t matter if the hostname points to a private IP address.
Plugins selected: Authenticator standalone, Installer None Obtaining a new certificate Performing the following challenges: http-01 challenge for localdomain.com http-01 challenge for www.localdoamin.com Cleaning up challenges Problem binding to port 80: Could not bind to IPv4 or IPv6.
Regarding localhost.localdomain, it is not a valid domain so you can’t issue a certificate for this domain.
Regardinglocalhost.localdomain.com, it is a valid domain but you don’t own it so you can’t issue a certificate for it.
Regarding the error Problem binding to port 80: Could not bind to IPv4 or IPv6. you are using the letsencrypt in standalone and that means that letsencrypt tries to start a mini web server but the ports 80 and 443 are in use, I suppose that your web server is using them.
To be more precise: Let’s Encrypt will only certify publically available hostnames, as in, hostnames which anyone on the internet could resolve. Therefore, “fake” hostnames won’t be valid.