Problem binding to port 80: Could not bind to IPv4 or IPv6

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.

My domain is:( It is independent of any domain for example kjksjdoiruwhtuce.de)

I ran this command: ./letsencrypt-auto certonly --standalone

It produced this output:

My web server is (include version):

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

My hosting provider, if applicable, is: "
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for kjksjdoiruwhtuce.de
http-01 challenge for kjksjdoiruwhtuce.de
Cleaning up challenges
Problem binding to port 80: Could not bind to IPv4 or IPv6.
"

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): sudo privilege

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

I have adroplet in digital ocean and I wanted to downgrade it. as the result I made a new droplet and now I want to have ssl in the new droplet. after cloning letsencrypt (sudo git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt) I used "./letsencrypt-auto certonly --standalone " command that start to do some stuff. At the end when it request the domains I entered my domain ( I also tested with strange domain names and the result were the same) but I always get the error that I mentioned.
Thanks

It is best to follow the instructions for your webserver and operating system according to https://certbot.eff.org/.

Most likely you will find that you will end up both installing and using Certbot in a different way than what you’re trying right now.

If you’re still having trouble after doing that, post again.

I used the following link already in my previous droplet and it was working fine. I just used the same way.

The standalone mode is not suitable when you already have a webserver running. The tutorial you are using does not account for that.

The “problem binding to port 80” error likely means you already have some kind of webserver running on port 80.

sudo ss -tlpn | grep -E ":(80|443)"

You would have to stop it first.

(If not that, check that you are running letsencrypt-auto via sudo/root).

Alternatively, following along with the official instructions, you would be given a way to use Certbot which does not involve shutting down an existing webserver.

Hope that makes sense.

It looks it is related to NginX :

samvibro@VAC:~$ sudo ss -tlpn | grep -E “:(80|443)”
[sudo] password for samvibro:
LISTEN 0 128 0.0.0.0:80 0.0.0.0:* users:((“nginx”,pid=1047,fd=6),(“nginx”,pid=1044,fd=6))
LISTEN 0 128 [::]:80 [::]:* users:((“nginx”,pid=1047,fd=7),(“nginx”,pid=1044,fd=7))

I just installed it but did not run it

Some operating systems automatically start nginx when you install it. Like Debian/Ubuntu, I believe.

No big deal, you can just stop it

sudo systemctl stop nginx

Ok thanks. But using “https://www.learnwithjason.dev/blog/deploy-nodejs-ssl-digitalocean/” is problematic? it just has two lines of code to install certificate.
My droplet in digital ocean suppose to run node js and mongo db

Thanks

I think the tutorial is problematic yes.

For example, I don’t see how auto-renewal would work. It would just hit the “Problem binding to port 80” error every renewal attempt and fail.

A small adjustment can be made to prevent that:

sudo ./letsencrypt-auto certonly --standalone --pre-hook "service nginx stop" --post-hook "service nginx restart" -d kjksjdoiruwhtuce.de

Not ideal, but perhaps the smallest change that can be made to fix it.

Take note of this text at the start of the article too:

Heads up: this post was written in 2016, and some of the tools and prices may have changed. The code should still work, but you may want to look for a more up-to-date tutorial.

Something like this tutorial appears to follow much more correct practices for securing a Node.js + nginx application.

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