Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm trying to update an SSL certificate on digital ocean with the command certbot renew But I get this error:

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

running netstat -plunt shows that port 80 is been used by 'docker-proxy'.

What can I do to fix this should I stop docker-proxy how do I do that?

like image 593
Harry Avatar asked Sep 23 '19 14:09

Harry


People also ask

Does Certbot need port 80?

If you're using any Certbot with any method other than DNS authentication, your web server must listen on port 80, or at least be capable of doing so temporarily during certificate validation.

Could not bind TCP port 80 because it is already in use by another process on this system Certbot?

As the error says, port 80 "is already in use by another process on this system (such as a web server)". You have told certbot to run standalone rather than co-operating with the existing webserver, which it would use if you'd asked. Either change certbot --standalone or stop the webserver you've got running.

How do I remove Certbot certificate?

Just type the index number of the domain name, that you want to delete and hit enter. The issued certificate including other associated files will be deleted.


3 Answers

Try this.

systemctl stop apache2.service 
like image 121
Mariuta Mihai Dan Avatar answered Oct 19 '22 06:10

Mariuta Mihai Dan


The docker-proxy is the user space port forwarding process used by docker when you publish a container's port. Run a docker container ls to show all running containers, along with the ports each may be publishing, and stop the container listening on the ports you want to use.

like image 29
BMitch Avatar answered Oct 19 '22 04:10

BMitch


This error means you have a web server running on the port on which Certbot is attempting to renew your ssl cert. Figure out what's running and stop that process. Keep in mind you may have port forwarding rules on your host.

like image 36
duhaime Avatar answered Oct 19 '22 04:10

duhaime