Apply for Free VPS

HTTPS with Let's Encrypt on a dedicated address

Updated 27 Nov 2026 nginx https certbot

Issue and renew a free certificate when ports 80 and 443 reach your server.

This method needs ports 80 and 443. A server with a dedicated IPv4 address has them. On a shared-IPv4 server use a DNS challenge.

Before you start

Your domain's A record points to the server, and Nginx serves the domain with a matching server_name.

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp

Install and issue

sudo apt update
sudo apt install -y certbot python3-certbot-nginx
sudo certbot --nginx -d example.com -d www.example.com

Answer the prompts and choose to redirect HTTP to HTTPS.

Renewal

The package installs a timer. Test it:

sudo certbot renew --dry-run
systemctl list-timers | grep -i certbot

If it fails

  • Confirm DNS with dig +short example.com.
  • Remove any AAAA record that does not point to this server.
  • Check that port 80 is reachable from outside.
  • Read /var/log/letsencrypt/letsencrypt.log.

Repeated failures can hit the authority's rate limits, so use --dry-run while testing.

Was this helpful?

Report outdated or incorrect information