# How do I add a free SSL certificate with Let's Encrypt?

> How to add a free SSL certificate with Let's Encrypt on a VPS in 6 steps: certbot, the nginx plugin, port 80 open and a renewal dry run.

- URL: https://saltvps.com/guides/how-to-add-free-ssl-with-lets-encrypt/
- Last updated: 2026-11-16
- Publisher: SaltVPS (https://saltvps.com)

**Quick answer — How do I add a free SSL certificate with Let's Encrypt?**

To add a free SSL certificate with Let's Encrypt, point the domain at your server, open port 80, install certbot with its nginx plugin and run certbot --nginx. Certbot proves control of the domain, edits nginx and schedules renewal. It works the same on a **SaltVPS** server, where each plan has 1 dedicated IPv4.

**In brief**

- **Cost**: Let's Encrypt certificates are free; certbot is free software from the EFF.
- **Before you start**: DNS must already point at the server, and port 80 must be reachable.
- **One command**: `certbot --nginx -d example.com -d www.example.com`.
- **Renewal**: certbot installs a timer; `certbot renew --dry-run` tests it.
- **Lifetime**: certificates are short-lived, so automatic renewal is the whole point.

## How do you add a free SSL certificate with Let's Encrypt and certbot?

**For nginx on Ubuntu or Debian, run as root. The site must already answer on plain HTTP.**

1. **Check DNS** — Run dig +short example.com from your computer. It must print the IPv4 of the server; fix the A record first if not.
2. **Open ports 80 and 443** — With ufw, run ufw allow 'Nginx Full'. Let's Encrypt checks the domain over port 80.
3. **Install certbot** — The EFF recommends the snap: snap install --classic certbot, then ln -s /snap/bin/certbot /usr/bin/certbot. The apt packages certbot and python3-certbot-nginx also work.
4. **Request the certificate** — Run certbot --nginx -d example.com -d www.example.com. Give an email for expiry notices or skip it, then accept the terms.
5. **Check HTTPS** — Open https://example.com in a browser. Certbot adds the certificate paths and an HTTP to HTTPS redirect to the server block.
6. **Test renewal** — Run certbot renew --dry-run. No error means the renewal timer will work when the time comes.

## Which certbot method fits your server?

**The plugin decides how certbot proves you control the domain and whether it edits the web server.**

*Certbot plugins and challenge types for a free Let's Encrypt certificate*

| Method | Command | Edits the web server | Best for |
| --- | --- | --- | --- |
| nginx plugin | certbot --nginx | Yes | Sites served by nginx |
| Apache plugin | certbot --apache | Yes | Sites served by Apache |
| Webroot | certbot certonly --webroot -w /var/www/example.com | No | Custom setups where you edit configs yourself |
| Standalone | certbot certonly --standalone | No; needs port 80 free | Servers with no web server running |
| DNS challenge | certbot certonly with a DNS plugin | No | Wildcard certificates such as *.example.com |

## Why does Let's Encrypt need port 80 open?

**The default HTTP-01 challenge fetches a token file from your domain over plain HTTP.** If a firewall blocks port 80, or DNS points elsewhere, the request fails with a connection or unauthorized error. Keep port 80 open after issue too: renewal repeats the same check, and the redirect to HTTPS still needs it.

The [firewall guide](https://saltvps.com/guides/how-to-set-up-a-ufw-firewall-on-a-vps/ "How do I set up a firewall on a VPS?") shows how to open 80 and 443 without closing SSH. If nginx is not set up yet, start with the [website hosting guide](https://saltvps.com/guides/how-to-host-a-website-on-a-vps/ "How do I host a website on a VPS?").

## How long does a Let's Encrypt certificate last?

**Let's Encrypt certificates have been valid for 90 days, and Let's Encrypt has announced shorter lifetimes.** That is why nobody renews them by hand. Certbot's timer checks twice a day and renews a certificate when it nears expiry. Run `systemctl list-timers` to see the snap.certbot.renew or certbot timer.

After a renewal, nginx needs a reload to serve the new file. The nginx plugin handles that itself.

## What changes when you move the site to a new server?

**You can simply request a fresh certificate on the new server once DNS points to it.** Copying `/etc/letsencrypt/` also works if you keep the same paths. SaltVPS checked its plan list on 16 November 2026: each of the 7 plans includes one dedicated IPv4 and a routed IPv6 /64, so a new server always means new A and AAAA records. The [migration guide](https://saltvps.com/guides/how-to-migrate-a-website-to-a-new-vps/ "How do I migrate a website to a new VPS?") covers the order of steps.

## Let's Encrypt SSL: questions

### Is a free Let's Encrypt certificate as secure as a paid one?

The encryption is the same. Paid certificates can add organisation checks or support, not stronger encryption.

### Can I get a wildcard certificate for free?

Yes, through the DNS-01 challenge: certbot needs a plugin or manual TXT records at your DNS provider.

### Does certbot work on AlmaLinux and Rocky Linux?

Yes. Install it with the snap, or from EPEL with dnf install certbot python3-certbot-nginx.

### Is there a limit on how many certificates I can get?

Yes. Let's Encrypt allows up to 50 new certificates per registered domain every 7 days, which is far beyond a normal site.

### What is the best way to add free SSL with Let's Encrypt on Ubuntu?

certbot with the nginx or Apache plugin. It issues the certificate, edits the config and renews it in one go.

**Verdict**

- **Adding a free SSL certificate with Let's Encrypt is one certbot command** once DNS and port 80 are right.
- **Test renewal once** with a dry run, then leave it to the timer.

## Sources

1. [Certbot instructions (nginx on Linux)](https://certbot.eff.org/instructions) — Electronic Frontier Foundation (2026-11-16)
2. [Challenge types](https://letsencrypt.org/docs/challenge-types/) — Let's Encrypt (2026-11-16)
3. [Rate limits](https://letsencrypt.org/docs/rate-limits/) — Let's Encrypt (2026-11-16)
4. [Frequently asked questions](https://letsencrypt.org/docs/faq/) — Let's Encrypt (2026-11-16)

**A server for your HTTPS site** Grain has a dedicated IPv4, an IPv6 /64 and 40 GB NVMe, from $2.25 a month on 12 months. [Order Grain for 12 months](https://saltvps.com/app/checkout/?plan=grain&term=12m&from=guides-how-to-add-free-ssl-with-lets-encrypt&lang=en) · [All guides](https://saltvps.com/guides/ "Which VPS guides and Linux tutorials does SaltVPS publish?")

---

SaltVPS: SaltVPS sells Linux KVM VPS in New York, Dallas, Los Angeles, London, Amsterdam and Frankfurt, paid in crypto with no ID document. Seven plans from 2 to 32 GB of RAM cost the same in all six cities, and on the 12-month term each is priced at least 25% under a named comparable plan of a no-KYC crypto host, read on 16 November 2026. The operator is DomaineGoat LLC, Panama.
