Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check 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×
FREEDOM251

Freedom251 › Blog › Certbot

How to configure automatic TLS certificate renewal on Nginx

By Freedom251 Team · · 10 min read

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

Configure renewal in five checks: use Certbot instructions for your operating system and installation method, choose whether Certbot should edit Nginx, confirm a cron job or systemd timer exists, run sudo certbot renew --dry-run, and arrange a deploy hook if Nginx must be explicitly reloaded after a certificate is renewed. A certificate that works today does not, by itself, prove that unattended renewal is configured.

The exact scheduler and service-reload command depend on how Certbot and Nginx were installed. Treat the commands below as a verification runbook, not as a universal package recipe.

As an Amazon Associate I earn from qualifying purchases.

What automatic renewal actually does

Certbot manages certificates that it has previously obtained. Its renew command checks those managed certificates and renews the ones that are eligible; it can finish without changing anything when a certificate is not yet due. The command is designed for repeated, unattended execution.

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

Renewal has two separate outcomes:

  • Certificate issuance: the ACME challenge succeeds and Certbot writes the new certificate files.
  • Service deployment: Nginx starts using those new files. This may happen through configuration managed by Certbot or through a deploy hook that reloads Nginx after a successful renewal.

Keep those outcomes distinct when troubleshooting. A successful renewal event does not guarantee that an already-running Nginx process has re-read the certificate.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

Establish your server’s starting point

Before changing anything, identify the operating system, how Certbot was installed, how Nginx is managed, and whether an existing certificate is already present. Certbot’s official instructions are generated for a specific operating system and web server combination; the example page for CentOS/RHEL 7 with Nginx is Certbot’s CentOS/RHEL 7 Nginx instructions. Select the page that matches your host instead of copying a package command intended for another distribution.

Record the facts that affect renewal

  • Operating system and release: package names, service managers, and scheduler defaults vary.
  • Certbot source: a system package, a snap, or another installation method can place the executable and scheduler in different locations.
  • Nginx service manager: determine whether your host uses systemd, another init system, or a manually managed process.
  • Certificate ownership: note whether Certbot created the certificate and renewal configuration. The renew command acts on certificates that Certbot manages.
  • Challenge reachability: if the selected validation method uses HTTP-01, the public site must be reachable in the way that method requires.

Do not assume that a certificate obtained by some other client is automatically covered by Certbot’s renewal scheduler. First establish which tool owns the certificate and its renewal configuration.

Choose how Certbot should integrate with Nginx

The official Nginx setup presents two alternative paths. Select one based on who should maintain the Nginx configuration; do not run both indiscriminately on the same host.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Path Command Who changes Nginx configuration? When it fits
Installer and certificate acquisition sudo certbot --nginx Certbot obtains the certificate and can edit Nginx configuration to install it. Use when you want Certbot to perform the Nginx integration as part of setup.
Certificate-only acquisition sudo certbot certonly --nginx You obtain the certificate; you manage the Nginx configuration yourself. Use when your configuration is centrally managed, templated, or otherwise must not be edited by Certbot.

When to use sudo certbot --nginx

This combined mode is the shorter route for a conventional Nginx site. Certbot requests the certificate and is allowed to update the relevant Nginx server configuration. Review the changes on a staging or maintenance host first if your configuration is generated, unusually complex, or maintained by another deployment system.

When to use sudo certbot certonly --nginx

Certificate-only mode separates issuance from deployment. Certbot performs the Nginx-assisted challenge and writes the certificate, but it does not install the certificate into Nginx for you. Your configuration management process must point Nginx at the correct certificate files and provide any required reload action.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

This separation is useful when a generated configuration would be overwritten by an automation system, or when one certificate is distributed to several services. It also means that a successful Certbot run alone is not proof that the live Nginx process uses the new certificate.

Install or update Certbot using the matching instructions

Open the platform-specific generator at certbot.eff.org/instructions, select your operating system and Nginx, and follow the installation method shown for that combination. The generated page is the authority for package commands and prerequisites on that platform; there is no single installation command that is correct for every Linux distribution.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. Choose the operating system and release that are actually running on the server.
  2. Select Nginx as the web server.
  3. Install Certbot and the Nginx integration shown by the generated instructions.
  4. Run the selected acquisition command, either sudo certbot --nginx or sudo certbot certonly --nginx.
  5. Complete the prompts for the site names and contact information, then record where Certbot says the managed certificate and renewal configuration are stored.

If Certbot reports that an existing certificate or renewal configuration is already present, stop and inspect it rather than creating a second, competing configuration. Multiple certificates for the same names make it harder to determine which files and scheduler entries Nginx should use.

Check that an automatic scheduler exists

Most Certbot installations include automatic renewal out of the box, according to the Certbot User Guide. “Most” is not “all”: installation method and distribution packaging determine whether the job is a cron entry, a systemd timer, or another mechanism. Verify the actual server.

Inspect cron configuration

Check the locations identified by Certbot’s setup guidance:

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord | 6.35mm Jack, Durable Design, Stage and Home Studio Use, Low Noise Shielded Electric Cord for Bass, Keyboard, Amp, Mixer
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by
  • /etc/crontab
  • Files under /etc/cron.*/*, such as the system-wide hourly or daily directories

Search for a command that invokes Certbot or an equivalent renewal wrapper. A scheduler entry should run with sufficient privileges and should invoke the same Certbot installation that owns the managed certificates. Do not create a second cron job until you know one is not already present.

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

Inspect systemd timers

On a systemd host, list timers with:

systemctl list-timers

Look for a Certbot-related timer and its associated service. Check its last and next run times, then inspect the service output using the host’s normal systemd logging tools if a run failed. Timer names differ by package, so verify the command they execute instead of relying on a particular unit name.

What a scheduler check proves

Finding a cron entry or timer proves that something is scheduled, not that renewal can succeed. The job may fail authentication, be unable to reach the challenge path, or run a different Certbot binary. The dry-run test is the next required check.

Run the official renewal test

Run this command with the privileges used by your scheduler:

sudo certbot renew --dry-run

Certbot’s setup instructions explicitly recommend this test. It exercises the renewal process without replacing the live certificate, allowing you to detect challenge, permission, or configuration problems before a real renewal window.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

Read the result correctly

  • Successful dry run: the configured renewal path can complete under test conditions. Keep the scheduler enabled and verify the live site after the next real renewal.
  • No action because certificates are not due: this is normal for renew; it is designed to skip certificates that are not eligible yet. A no-op is not the same as a failed renewal.
  • Challenge or connection failure: fix DNS, firewall, virtual-host, or challenge-path issues and repeat the dry run.
  • Permission or executable failure: confirm that the scheduled user, Certbot installation, certificate files, and hook files are accessible to the renewal process.

Keep the complete output in your operations record. It identifies which managed certificate failed and usually points to the stage that needs correction.

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

Make Nginx load a renewed certificate

When Nginx reads certificate files only at startup, writing a replacement file does not automatically change the certificate presented by an already-running worker process. Certbot provides hooks for actions associated with renewal. The User Guide distinguishes deploy hooks from pre-hooks and post-hooks: use a deploy hook for an action that should run after a certificate has been successfully issued or renewed.

Choose the reload action for your host

Select the reload command that matches the service manager and deployment model on your server. On a systemd-managed Nginx service, a common example is:

sudo systemctl reload nginx

That command is an example, not a universal requirement. Some hosts use a different service name, an init script, a container supervisor, or a controlled deployment command. Use the mechanism that your host documents, and test it independently before putting it in a hook.

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

Use a deploy hook, not a blanket post-hook

A deploy hook runs after a certificate has actually been deployed by a successful renewal. This avoids reloading Nginx on every scheduler invocation when no certificate changed. The command reference documents the --deploy-hook option and related renewal options at Certbot’s command reference.

You can supply a hook on the command line or place an executable hook file in Certbot’s renewal-hook directories. A typical deploy-hook file is placed under /etc/letsencrypt/renewal-hooks/deploy/; confirm the path used by your package before creating it.

#!/bin/sh
systemctl reload nginx

Save the script with a descriptive name, make it executable, and run the same reload command manually to confirm that it works for the account used by the scheduler. If your environment requires a configuration test before reload, include that check in the deployment procedure and define what should happen when validation fails. Do not let a failed hook go unnoticed: inspect the scheduler or Certbot logs after the dry run and after each real renewal.

Validate the deployment result

After a successful renewal and hook execution:

  1. Confirm that the hook completed without an error.
  2. Confirm that Nginx remains healthy under its service manager.
  3. Connect to the HTTPS site and inspect the certificate presented by the live endpoint.
  4. Check every hostname covered by the renewal if the certificate serves more than one virtual host.

The Certbot setup guidance also recommends visiting the HTTPS site to confirm that it is working. A file timestamp on disk is not sufficient evidence that the public service is presenting that file.

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

Keep HTTP-01 validation reachable

If your selected challenge method is HTTP-01, the validation request must reach the correct site. Certbot instructions commonly assume an accessible website on port 80, but applicability depends on the challenge method and host configuration.

Check the challenge path

For a webroot-based arrangement, the path /.well-known/acme-challenge must be served from the directory Certbot uses for challenge files. Nginx location rules, redirects, authentication, access-control lists, a proxy layer, or a CDN can prevent the request from reaching that directory.

  • Verify that the hostname resolves to the server handling the challenge.
  • Verify that inbound HTTP traffic on port 80 reaches the intended Nginx virtual host when HTTP-01 is in use.
  • Ensure that Nginx does not deny or rewrite /.well-known/acme-challenge unexpectedly.
  • If several front ends serve the hostname, ensure each one can return the challenge file or that traffic is consistently routed to the host running Certbot.

Do not apply these HTTP-01 checks to every possible validation method. They matter when the chosen challenge depends on HTTP reachability.

Troubleshoot the common failure branches

Symptom Likely explanation Next action
certbot renew --dry-run reports no certificates due The command found managed certificates but none currently require renewal. Record the successful test and verify the scheduler and deployment hook; do not force a replacement solely to turn a no-op into a change.
No Certbot cron entry or timer is visible The package did not install a scheduler, or the scheduler is managed elsewhere. Recheck the installation instructions for the actual package source and create one deliberate scheduler only after confirming ownership and privileges.
Dry run cannot complete the challenge The validation request cannot reach the expected hostname, port, virtual host, or challenge directory. Check DNS, firewall rules, port 80 where HTTP-01 applies, and Nginx handling of /.well-known/acme-challenge; then rerun the dry test.
Renewal succeeds but the live site shows the old certificate The files changed but Nginx was not reloaded, or Nginx points at different files. Confirm the certificate paths in the active Nginx configuration, test the host’s reload command, and use a deploy hook for successful renewals.
Certbot edits configuration that automation later replaces The installer path and configuration-management ownership conflict. Use certbot certonly --nginx and have the configuration-management system install the certificate paths and perform the controlled reload.
The hook runs but Nginx does not reload The hook is not executable, uses the wrong service name, lacks privileges, or calls a command unsuitable for the host. Run the command manually as the scheduler’s user, correct permissions and service-manager details, then repeat sudo certbot renew --dry-run.

Use a repeatable operating procedure

  1. Identify ownership: document the Certbot binary, managed certificate names, Nginx service manager, and configuration owner.
  2. Choose one integration mode: use sudo certbot --nginx when Certbot should install the certificate, or sudo certbot certonly --nginx when your team will manage Nginx.
  3. Confirm scheduling: inspect /etc/crontab, /etc/cron.*/*, and systemctl list-timers as applicable.
  4. Test safely: run sudo certbot renew --dry-run and retain the output.
  5. Deploy deliberately: configure a deploy hook only when a successful renewal needs an explicit service action, and make the hook executable.
  6. Verify the endpoint: after a real renewal, confirm Nginx health and inspect the certificate served by each relevant HTTPS hostname.
  7. Re-test after changes: repeat the dry run whenever you change DNS, Nginx virtual hosts, firewall policy, Certbot packaging, or the hook script.

Key decisions at a glance

Question Decision
Should Certbot edit Nginx? Choose sudo certbot --nginx if yes; choose sudo certbot certonly --nginx if configuration remains under your control.
How is renewal scheduled? Use the cron entry or systemd timer installed by the actual Certbot package; verify it rather than assuming a default.
How does Nginx learn about new files? Use the host’s tested reload mechanism, attached as a deploy hook when the service must react after successful renewal.
How do you prove the arrangement works? Run sudo certbot renew --dry-run, inspect scheduler results, and verify the live HTTPS endpoint after deployment.

For renewal behavior, hook semantics, and available command options, consult the Certbot User Guide and Certbot command reference. For package and platform steps, use the matching page generated by Certbot’s instructions site.

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.

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.

CertbotCronLinux administrationNGINXSSL certificatessystemdTLS

Leave a Reply

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

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.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

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.