Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
VGSources
Blog

How to Set Up Let’s Encrypt SSL Auto-Renewal on a Linux VPS

A practical guide to reliable Let's Encrypt renewal on a Linux VPS: inspect existing schedulers, test Certbot safely, reload nginx, Apache, or other daemons, and fix common validation errors.
Length11 min Posted Quest giverVGSources Team
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

On most Linux VPS installations, Let’s Encrypt certificates are renewed automatically by Certbot once a scheduler and certificate validation method are working. The safe setup is to verify the existing cron job or systemd timer, run sudo certbot renew --dry-run, keep your renewal files intact, and make sure the daemon serving TLS reloads the renewed files. Do not add a second scheduler until you have confirmed that none exists.

What Certbot auto-renewal actually does

Certbot’s renew action checks every certificate it manages. It renews only certificates that are inside the renewal window and normally exits without changing anything when certificates are still sufficiently far from expiry. That makes the command suitable for repeated execution from cron or a systemd timer.

As an Amazon Associate I earn from qualifying purchases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Renewal is a chain of separate operations:

  • Certbot reads each renewal definition under /etc/letsencrypt/renewal/.
  • It decides whether the certificate is close enough to expiry to require action.
  • It proves control of the domain using the configured authenticator, such as a web-server plugin, webroot, or DNS challenge.
  • It obtains a replacement certificate from Let’s Encrypt.
  • It updates the stable files exposed through /etc/letsencrypt/live/.
  • It runs the configured reload or deploy hook so the service begins using the replacement certificate.

A successful renewal command does not automatically prove that every application has loaded the new key. The final reload step must also succeed.

Check for an existing scheduler before adding one

Most Certbot installations come with automatic renewals preconfigured. Distribution packages and snap installations commonly provide either a systemd timer, a cron entry, or both. Adding another job can cause duplicate validation requests, confusing logs, and unnecessary load, so inspect the host first.

#1 Best Overall
Sale
Gaoye Blue Light Blocking Glasses
  • BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
  • EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
  • COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
  • LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
  • WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.

Inspect cron

Search the traditional system-wide locations for the renewal command:

sudo grep -R "certbot renew" /etc/crontab /etc/cron.* 2>/dev/null

A result may appear in /etc/crontab, a file under /etc/cron.d/, or another distribution-managed cron directory. Read the entire line, including its user, options, and frequency, before deciding whether it needs modification.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Inspect systemd timers

systemctl list-timers --all | grep -i certbot

The timer name varies with the installation method. A snap installation may expose a unit such as snap.certbot.renew.timer, while a distribution package can use a different name. Use the name shown by list-timers rather than assuming a particular unit.

To see the associated service and its recent output after you identify a timer, inspect the unit directly:

systemctl status <timer-name>
systemctl cat <service-name>

Do not disable a package-managed timer merely because you prefer cron. Pick one scheduler and keep the package’s update path understandable.

Confirm the certificates and renewal files

List the certificates Certbot knows about:

sudo certbot certificates

This shows certificate names, covered domains, expiry dates, and the certificate and key paths. Check the filesystem locations as well:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
sudo ls -la /etc/letsencrypt/live/
sudo ls -la /etc/letsencrypt/renewal/

Files in /etc/letsencrypt/live/ are stable symlinks intended for services to reference. The targets change when a new certificate is issued, so configure nginx, Apache, or another daemon to use those stable paths instead of a numbered archive file.

Renewal definitions in /etc/letsencrypt/renewal/ contain the authenticator, domains, account information, and other settings needed for a repeat renewal. Avoid hand-editing them unless there is a specific reason. Back up a file before changing it, and always validate the result with a dry run.

Rank #2
Windex Gaming Cleaning Wipes, Pre-Moistened Wipes to Instantly Clean all Gaming Gear and Electronics, Resealable Packaging for a Freshness Lock, 25 count (Pack of 1)
  • WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
  • AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
  • PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
  • ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
  • COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed

Run a staging dry run before relying on unattended renewal

Test the complete process with:

sudo certbot renew --dry-run

Certbot uses the Let’s Encrypt staging service for this test by default. The command exercises the renewal configuration and domain challenge without replacing the production certificate, so it is the correct first test after installation, a DNS change, a firewall change, or an authenticator change.

A successful dry run should show that the relevant certificates would renew successfully. Treat any challenge, DNS, permission, firewall, or reload error as a production setup failure, even though the staging run does not alter the live certificate.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

What a dry run does not prove

  • It does not guarantee that a future DNS provider response will be available if your DNS challenge credentials later expire or change.
  • It does not make an application reload itself if no deploy hook is configured.
  • It does not test a certificate that is not managed by Certbot.
  • It does not justify repeatedly forcing production renewals.

After a successful test, leave the scheduler to run the normal command. Do not use --force-renewal as a daily or twice-daily job; forcing issuance can run into certificate-authority rate limits and defeats the purpose of the renewal window.

Understand when Certbot decides to renew

The renewal command is deliberately safe to run often. Certbot normally renews only when a certificate has less than one third of its lifetime remaining. For certificates with lifetimes of 10 days or less, the current Certbot documentation uses a one-half threshold. The threshold is evaluated from the certificate’s actual lifetime, not from a fixed number of calendar days.

This is why a scheduler can run twice a day without requesting a new certificate every time. If a certificate is outside the renewal window, Certbot exits without replacing it. A certificate that has entered the window is attempted during the next scheduled run.

Add a scheduler only if the installation has none

If both the cron search and systemd-timer inspection show no renewal job, create one appropriate for the host. The documented cron pattern runs the command at midnight and noon, adds a random delay of up to one hour, and uses quiet output:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
SLEEPTIME=$(awk 'BEGIN{srand(); print int(rand()*(3600+1))}')
echo "0 0,12 * * * root sleep $SLEEPTIME && certbot renew -q" | sudo tee -a /etc/crontab >/dev/null

The randomized sleep spreads requests instead of making every machine contact the certificate authority at exactly the same minute. The command writes a system-wide crontab entry, so the explicit root user field is required.

After adding it, verify the resulting line and check that the cron service is enabled and running according to your distribution. Then run sudo certbot renew --dry-run manually; waiting for the first scheduled execution is not a useful validation strategy.

Rank #3
Sale
LISEN Cell Phone Stand Phone Holder for Desk, Office Decor Gadgets for Men
  • Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
  • Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
  • Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
  • ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
  • Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)

Choosing cron or systemd

Scheduler What to inspect Operational considerations
systemd timer systemctl list-timers --all | grep -i certbot Use the service and timer units supplied by the package. Unit names differ between snap and distribution packages.
cron /etc/crontab and files under /etc/cron.* Check the execution user, command options, and whether output is logged or mailed.
No scheduler Neither inspection returns a renewal job Add one method, not both, then perform a staging dry run.

Configure the service to use the renewed certificate

Point the TLS service at the stable live paths. A typical nginx server block uses:

ssl_certificate     /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;

Replace example.com with the certificate name shown by certbot certificates. The full chain file is normally presented to clients, while the private-key file must remain readable only by the service and authorized administrators.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

nginx and Apache plugins

When the certificate was configured through Certbot’s nginx or Apache plugin, the plugin can arrange the service reload after a successful renewal. Confirm the behavior with a dry run and inspect the service status afterward. A certificate can be renewed successfully while a reload fails because of a syntax error, a missing unit, or insufficient permissions.

Other daemons need a deploy hook

Mail and directory services, proxies, and custom applications generally need an explicit executable hook. Create the deploy-hook directory and a script such as:

sudo install -d -m 755 /etc/letsencrypt/renewal-hooks/deploy
sudo tee /etc/letsencrypt/renewal-hooks/deploy/reload-service.sh >/dev/null <<'EOF'
#!/bin/sh
systemctl reload <your-service>
EOF
sudo chmod 755 /etc/letsencrypt/renewal-hooks/deploy/reload-service.sh

Replace <your-service> with the actual daemon name, for example the unit used by a mail transfer service, IMAP service, or LDAP server. The angle-bracket text is a placeholder and must not remain in the installed script.

A deploy hook runs after a successful renewal, not after a failed challenge. Keep the script small, use the daemon’s supported reload operation, and make sure the command returns a failure status when the reload fails. That makes the error visible in the renewal logs.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Reload versus restart

Use systemctl reload when the daemon supports re-reading certificates without dropping active connections. A full restart may interrupt traffic and should be used only when the service does not implement a reliable reload operation. Check the service’s documentation and unit capabilities rather than assuming every daemon treats reload and restart identically.

Validate the live configuration after renewal

First validate the daemon’s configuration using its native command, then perform the least disruptive reload. For nginx, for example, run its configuration test before reloading. The exact command depends on how the service was installed and which unit owns it.

Rank #4
Ledagic IC+RGBW USB Powered Led Light Bar with App & Remote Control, 2 Pack
  • Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
  • Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
  • 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
  • Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
  • USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC

After the hook or manual reload, verify that the process has opened the new certificate. Useful checks include:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Inspecting the daemon’s status and recent journal entries.
  • Connecting to the hostname with a TLS client from an external machine and checking the presented expiry date.
  • Confirming that every hostname covered by the certificate resolves to the VPS and reaches the intended service.

Testing from outside the VPS matters because a local check can miss a firewall, load balancer, or DNS path that real visitors use.

Monitor timers, logs, and renewal results

For a systemd-managed installation, list timers and inspect recent Certbot service logs:

systemctl list-timers --all | grep -i certbot
sudo journalctl -u snap.certbot.renew.service --since "7 days ago"

The journal unit in the example is specific to a snap installation. If it produces no output, identify the actual service name from systemctl list-timers or the package’s unit definition instead of assuming that snap.certbot.renew.service exists.

For cron, review the host’s cron logs and any mail or redirected output configured for the job. A quiet option suppresses routine output, so it is especially important to have another way to notice failures.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Run the dry run again after changing DNS records, HTTP routing, firewall policy, web-root permissions, Certbot packages, or deploy hooks. Renewal is unattended only when the complete path remains valid over time.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose the authenticator that matches your VPS

Web-server or plugin validation

The nginx and Apache plugins can discover the web-server configuration, complete the HTTP challenge, install the certificate, and arrange a reload. They are convenient when the VPS terminates HTTP and HTTPS directly and the service configuration is conventional.

Webroot validation

A webroot challenge places a temporary token in a directory that the web server already publishes. It avoids letting Certbot rewrite the server configuration, but the specified directory must map to the public path for every requested hostname. Port 80 must be reachable for HTTP-01 validation.

Best Value
Sale
HUANUO FlowLift™ Dual Monitor Stand, Fully Adjustable Gaming Monitor Desk Mount for 13–32″ Computer Screens, Full Motion VESA 75x75/100x100 with C-Clamp & Grommet Base, Each Arm Holds 4.4 to 19.8 lbs
  • Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
  • Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
  • Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
  • Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
  • Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.

DNS validation

DNS-01 validation is useful when the service is not publicly reachable on port 80, when a wildcard certificate is required, or when DNS is the controlled boundary. The renewal process depends on credentials and DNS propagation. Store those credentials with restrictive permissions and test that the provider can create and remove the required records.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot the failures that stop renewal

HTTP-01 cannot reach the VPS

Check that the hostname resolves to the correct public address, port 80 is allowed through the VPS firewall and any cloud security group, and the web server routes the challenge path to the configured webroot. Redirects, reverse proxies, and restrictive access rules can prevent the temporary token from being read.

DNS-01 validation fails or times out

Verify the API credentials, the zone selected by the authenticator, and the permissions required to create TXT records. DNS changes may take time to propagate. A dry run that fails during propagation should not be “fixed” by forcing repeated production attempts; correct the DNS path and test again.

Permission or ownership errors

Certbot normally runs with root privileges because private keys and renewal configuration are protected. Check ownership and mode bits on the renewal directories, webroot, hook scripts, and any credential file. Do not make the entire Let’s Encrypt directory world-readable to solve a service access problem.

The certificate renews but clients still see the old expiry

This usually means the daemon did not reload, the hook targeted the wrong unit, or another proxy is presenting a different certificate. Check the hook’s exit status, inspect the daemon journal, and identify which process owns the public TLS port. Then reload the correct service and test from outside the VPS.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The timer appears active but nothing happens

“Active” only means the timer is installed and scheduled. Read the associated service logs, confirm that the service ran recently, and execute sudo certbot renew --dry-run manually. If the dry run succeeds but the scheduled service fails, compare the service’s environment, working directory, and permissions with the interactive shell.

A renewal file was edited incorrectly

Restore the backup or recreate the certificate configuration using the supported Certbot command for your authenticator. Do not guess at option names inside the file. Once corrected, run a staging dry run and inspect the resulting logs before waiting for the next expiry window.

Security and maintenance practices

  • Keep private keys and DNS API credentials readable only by the accounts that need them.
  • Back up the Let’s Encrypt configuration before changing authenticators, domains, or hooks, while protecting the backup as carefully as the live private key.
  • Use the stable /etc/letsencrypt/live/ paths in service configuration; do not hard-code an archive file that will become stale.
  • Keep the Certbot package and its plugins maintained through the Linux distribution or installation method you selected.
  • Review certificate names and domains with sudo certbot certificates so retired hostnames do not remain in renewal attempts.
  • Do not suppress every error without an alerting path. A quiet scheduler is acceptable only when logs, monitoring, or administrative mail are reviewed.
  • Repeat a dry run after any network, DNS, web-server, package, or hook change.

A repeatable operational checklist

  1. Run sudo certbot certificates and record the certificate names, domains, and expiry dates.
  2. Confirm that the service references /etc/letsencrypt/live/<certificate-name>/fullchain.pem and privkey.pem.
  3. Search cron and systemd timers for an existing certbot renew job.
  4. Run sudo certbot renew --dry-run and resolve every reported error.
  5. Confirm that nginx or Apache reloads successfully, or install an executable deploy hook for another daemon.
  6. Inspect the scheduler’s recent logs and verify the certificate presented on the public hostname.
  7. Re-run the dry run whenever DNS, firewall, routing, credentials, or service configuration changes.

With one verified scheduler, a passing staging dry run, stable certificate paths, and a working reload hook, renewal becomes a routine unattended maintenance task rather than an emergency performed immediately before expiry.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More quests from Patch Notes

  1. How to Set Up a RedM (RDR2) Server in 2026: License Key, txAdmin and server.cfg, Step by StepBlog11min
  2. Best RedM (RDR2) Server Hosting in 2026: Comparing Four Hosts on Slots, Memory and PriceBlog10min
  3. How to Host a Mindustry Server in 2026: server-release.jar, Port 6567 and the Commands That MatterBlog7min
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.