/errors/certbot/problem-binding-to-port-80
Certbot: Problem binding to port 80: Could not bind to IPv4 or IPv6
The commands on this page have not been executed by our verification runner yet.updated 2026-10-20
- tool
- Certbot
- exit code
- 1
- versions
- Certbot 1.x – 4.x
- os
- linux
certbot certonly --standalone starts a temporary web server on port 80 to answer the Let's Encrypt HTTP-01 challenge. If another program already listens on port 80, certbot stops with Problem binding to port 80: Could not bind to IPv4 or IPv6. Use a plugin that works with the running web server instead of fighting it for the port.
Find what holds port 80
sudo ss -ltnp 'sport = :80'Fix 1: webroot (server keeps running)
sudo certbot certonly --webroot -w /var/www/html -d example.com -d www.example.comThe web server must serve http://example.com/.well-known/acme-challenge/ from that folder.
Fix 2: the nginx or Apache plugin
sudo certbot --nginx -d example.comFix 3: keep standalone, stop the server during issuance
sudo certbot certonly --standalone -d example.com \
--pre-hook "systemctl stop nginx" --post-hook "systemctl start nginx"The hooks are saved in the renewal configuration, so automatic renewals stop and start the server too.
Sources
Related pages
errors · opensslunable to get local issuer certificate (OpenSSL verify error 20)OpenSSL error 20, unable to get local issuer certificate, means the issuing CA is missing from the trust store or the chain. Add the CA or intermediate.glossary · opensslWhat is a certificate chain (chain of trust)?A certificate chain links a server leaf certificate through intermediate CAs to a trusted root. Clients verify each signature up to a root in their trust store.compare · iptablesiptables vs nftables: differences and migrationnftables replaces iptables, ip6tables, arptables and ebtables with one tool, nft, one syntax and atomic updates; iptables-nft keeps iptables commands working.