certbot certonly --standalone -d example.com --preferred-challenges http --http-01-port 8080

Category: Web Servers & Proxies

certbot certonly --standalone -d example.com --preferred-challenges http --http-01-port 8080

Run the standalone challenge on a custom port

--http-01-port relocates the challenge server to port 8080 for setups where port 80 is taken by another service. The CA must still be able to reach that port, so you need a port-forward or firewall rule. Combine with --preferred-challenges http to force the HTTP method.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.