Quick answer
How to set up Let's Encrypt on a VPS?
To set up Let's Encrypt on a VPS, point the domain to the server, open port 80 and 443, install certbot, run sudo certbot --nginx and test renewal with certbot renew --dry-run. On an IronKVM VPS with nginx it takes 6 steps; certificates land in /etc/letsencrypt/live and renew on their own.
In brief
- The EFF installs certbot with snap:
snap install --classic certbot. certbot --nginxgets the certificate and edits the nginx config for HTTPS.- The HTTP-01 check uses port 80, so the firewall must allow it.
- Renewal runs from a systemd timer or a cron job; test it with a dry run.
certbot certificateslists each certificate, its domains and its expiry date.
Which certbot method should you use?
| Method | Command | When it fits |
|---|---|---|
| nginx plugin | certbot --nginx | nginx serves the site; certbot edits the config |
| Webroot | certbot certonly --webroot -w /var/www/example.org -d example.org | You want to edit the config yourself |
| Standalone | certbot certonly --standalone -d example.org | No web server yet; port 80 must be free |
| Several names | -d example.org -d www.example.org | One certificate for each listed name |
What are the steps to set up Let's Encrypt on a VPS?
Point DNS to the VPS
The A and AAAA records of every name on the certificate must resolve to the server.
Serve the site on port 80
nginx needs a server block whose server_name lists the same names.
Open the firewall
Allow 80/tcp and 443/tcp. The HTTP-01 check reaches the server on port 80.
Install certbot
Install snapd, then certbot with snap install --classic certbot, and link it into /usr/local/bin.
Get the certificate
Run sudo certbot --nginx, pick the names and give an email for expiry notices if you want one.
Test the renewal
Run sudo certbot renew --dry-run and check the timer with systemctl list-timers.
sudo apt install snapd
sudo snap install --classic certbot
sudo ln -s /snap/bin/certbot /usr/local/bin/certbot
sudo ufw allow 80/tcp && sudo ufw allow 443/tcp
sudo certbot --nginx -d example.org -d www.example.org
sudo certbot renew --dry-run
sudo certbot certificatesWhat does certbot --nginx change?
It adds the certificate paths and a listen 443 ssl block to the matching server block, and can redirect HTTP to HTTPS. The EFF instructions say the command gets a certificate and has certbot edit the nginx configuration to serve it.
The files stay under /etc/letsencrypt/live/example.org. The certbot user guide recommends pointing the server config at those paths rather than copying the files, so renewals apply without changes. Run sudo nginx -t after any manual edit. The website hosting guide shows the server block certbot starts from.
Why does the Let's Encrypt check fail on a VPS?
Usually because DNS does not point to the VPS yet, or port 80 is closed. The HTTP-01 challenge fetches a file from each name over port 80. If the A record still points to the old host, the check reaches the wrong server.
Check the record with dig +short example.org. Check the firewall with ufw status; the UFW guide opens both ports. When you migrate a site, issue the certificate after the DNS switch, as how to move a website to an offshore VPS explains.
Which VPS is best for HTTPS sites in 2026?
Any plan: TLS costs little CPU, so size the server for the site, not the certificate. A static site runs on Billet; WordPress is happier on Ingot. Anvil, with 6 vCPU, 16 GB RAM, 240 GB NVMe, 12 TB traffic, holds many sites for $15.00 a month on 12 months.
According to IronKVM's survey of 16 November 2026, plans comparable to Anvil cost a median of $77.50 a month across 12 hosts. Each VPS has one IPv4 address and an IPv6 /64, enough for any number of HTTPS sites behind nginx.
Let's Encrypt on a VPS: questions
Is Let's Encrypt free?
Yes. Let’s Encrypt issues certificates at no charge, and certbot is free software published by the EFF.
How do I renew a Let's Encrypt certificate?
Renewal is automatic through a systemd timer or cron job. Test it any time with certbot renew --dry-run.
Can one certificate cover www and the bare domain?
Yes. Pass both with -d example.org -d www.example.org.
Do I need port 80 open after the certificate is issued?
Yes for HTTP-01 renewals, which check over port 80 each time.
Does IronKVM install certificates for me?
No. The VPS is yours to run; certbot does the work in one command.
Verdict
- DNS first, port 80 open, then certbot --nginx: HTTPS is set up and renews on its own.
- On IronKVM, any plan serves HTTPS sites; size the plan for the site itself.
Sources (4)
- Certbot instructions: nginx on Linux (snap) — Electronic Frontier Foundation (read 2026-11-16)
- Certbot user guide — Electronic Frontier Foundation (read 2026-11-16)
- Firewalls — Canonical (read 2026-11-16)
- IronKVM offshore VPS survey (CSV) — IronKVM (read 2026-11-16)
Host HTTPS sites on your own VPS
Anvil, 6 vCPU, 16 GB RAM, 240 GB NVMe, 12 TB traffic, $15.00 a month on 12 months.