ssl-guides 2026-12-02 ⏱ 4 min read

How to Install Free SSL on VPS

How to Install Free SSL on VPS

A VPS gives you full control, which means free SSL is always available through Let's Encrypt and certbot. The process is the same on DigitalOcean, Vultr, Linode, Hetzner, AWS EC2 or any other provider, with a couple of provider-specific wrinkles that cause most failures.

Free SSL on a VPS: universal prerequisites

  • Your domain's A record points at the VPS public IP, and DNS has propagated. Check with dig +short example.com from any machine.
  • A web server (nginx or Apache) serving the domain on port 80.
  • Both firewalls open: the OS firewall (ufw or firewalld) and the provider's cloud firewall or security group, for ports 80 and 443.

Free SSL on a VPS: the universal install

On Ubuntu or Debian:

sudo apt update
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx -d example.com -d www.example.com
sudo certbot renew --dry-run

Swap in python3-certbot-apache and --apache for Apache servers. Certbot issues the certificate, rewrites your server config and installs a renewal timer. Since Certbot 4.0.0 it renews a certificate once less than a third of the lifetime is left, which is 30 days on a 90-day certificate, about 21 on a 64-day one and 15 on a 45-day one (Certbot docs). The dry run confirms renewals will work unattended.

Provider gotchas

ProviderCommon gotcha
AWS EC2Security group blocks 80/443 by default
DigitalOceanCloud firewall, if enabled, needs both ports
Hetzner / VultrUsually only the OS firewall to manage
Any IPv6 hostAAAA record pointing elsewhere breaks validation

The single most common failure is a firewall issue: certbot's HTTP challenge cannot reach the server, so issuance fails with a connection or timeout error. Check both firewall layers before retrying, and remember that Let's Encrypt allows 5 authorization failures per identifier per account per hour (rate limits).

If your VPS runs Docker

Containerized nginx or Apache needs a slightly different certbot workflow, since certbot runs on the host while the web server runs in a container. The webroot method, sharing a volume for challenge files, is the standard pattern; see free SSL with Docker, nginx and certbot for a working layout.

If you use a reverse proxy or panel

Tools like Nginx Proxy Manager and Caddy issue and renew Let's Encrypt certificates themselves; enabling SSL is a toggle in their interface. Panels like Plesk and aaPanel have their own Let's Encrypt integrations too. The detailed patterns are in installing free SSL on nginx and Apache VPS servers.

Locking it in

  • Confirm the renewal timer is active: systemctl list-timers should show certbot.timer.
  • Redirect HTTP to HTTPS at the server level, not just in your application.
  • Monitor expiry externally; even good automation fails occasionally, and you want an alert before visitors do. Automating SSL renewal with certbot shows deploy hooks and monitoring patterns.
  • Do not rely on email for failures: Let's Encrypt stopped sending expiration emails on 4 June 2025 (Let's Encrypt announcement). Alert on the certificate your server serves instead.

With that, your VPS serves trusted HTTPS that renews itself, at zero cost, on any provider. Lifetimes are shrinking (Let's Encrypt certificates last 90 days today, 64 days from 10 February 2027 and 45 days from 16 February 2028 (Let's Encrypt announcement)), so check that the timer runs rather than counting days.

Headless servers and APIs

The same process secures API-only servers with no website at all: certbot standalone mode answers the challenge without a running web server, then you point your application or reverse proxy at the certificate files. Just make sure your application reloads the certificate after each renewal, either through a deploy hook or a periodic restart, because renewed files on disk do nothing until the software reads them again.

Wildcards and many subdomains

As your VPS starts hosting more subdomains, consider a wildcard certificate instead of adding names one by one. Wildcards require the DNS-01 challenge, which certbot and acme.sh automate through DNS provider plugins. One certificate covering *.example.com replaces a growing list of individual renewals and sidesteps per-name rate limits, at the cost of a little more DNS setup up front.

That covers the whole job on any provider: DNS, two firewalls, certbot, and a verified renewal timer. A VPS demands slightly more ownership than managed hosting, but in return you get full control of the certificate, the config and the renewal pipeline, at zero ongoing cost beyond the VPS itself.

Related reading: installing free SSL on Docker, getting free SSL on DigitalOcean, choosing an SSL certificate for a VPS and free SSL for multiple websites.

Frequently Asked Questions

Which firewall do I need to open for free SSL on a VPS?

Both layers: the OS firewall (ufw or firewalld) and the provider's cloud firewall or security group, for ports 80 and 443.

How do I know the renewal timer works?

Run systemctl list-timers and look for certbot.timer, then run sudo certbot renew --dry-run.

Can I use the same steps on any VPS provider?

Yes. The Certbot steps are the same on DigitalOcean, Vultr, Linode, Hetzner and AWS EC2. Only the cloud firewall differs.

🔒 Test Your Website SSL Certificate Now
Run Free SSL Check →

✅ Post-Installation Verification & SEO Checklist

After applying the steps above, run through this 5-point checklist to prevent browser warnings and protect your Google SEO rankings:

  • Verify full CA chain trust and TLS 1.3 support using our Live SSL Checker.
  • Scan for Mixed Content HTTP links and check HSTS/CSP headers on Security Headers Checker.
  • Enforce a permanent 301 HTTP-to-HTTPS redirect with our HTTPS Redirect Generator.
  • Confirm both root and www versions resolve cleanly to one canonical HTTPS URL.
  • Verify your HTTPS property and sitemap.xml inside Google Search Console and Bing Webmaster Tools.
Technically Reviewed by TryFreeSSL Security Team
Last updated: 2026-12-05
About Us →

Free SSL Certificates, Live SSL Checker & CSR Generator

Issue trusted Let's Encrypt SSL certificates in 60 seconds with zero server setup.

Related Articles

🤖 TryFreeSSL AI Assistant