---
title: "Discussion on \"Guide to Automatic SSL Certificate Renewal for Nginx and Docker\" | Hashnode"
description: "Discussion on \"Guide to Automatic SSL Certificate Renewal for Nginx and Docker\". How I automatically renew Let's Encrypt certificates using Nginx and Docker on my own VPS, with step-by-step commands and the issues I encountered..."
url: "https://hashnode.com/posts/guide-to-automatic-ssl-certificate-renewal-for-nginx-and-docker/6a012c8637bc6040459cb6b1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Guide to Automatic SSL Certificate Renewal for Nginx and Docker](https://mustafaerbay.hashnode.dev/guide-to-automatic-ssl-certificate-renewal-for-nginx-and-docker?utm_source=hashnode&utm_medium=feed)

How I automatically renew Let's Encrypt certificates using Nginx and Docker on my own VPS, with step-by-step commands and the issues I encountered...

May 11 · 7 min read · mustafaerbay.hashnode.dev  
Read the article

-   [#certbot](https://hashnode.com/tag/certbot)
-   [#docker](https://hashnode.com/tag/docker)
-   [#letsencrypt](https://hashnode.com/tag/letsencrypt)
-   [#nginx](https://hashnode.com/tag/nginx)
-   [#ssl](https://hashnode.com/tag/ssl)

## Written by

[Mustafa ERBAY](https://hashnode.com/@merbayerp)

@merbayerp

  
[View profile](https://hashnode.com/@merbayerp)

Cloud, system architecture & DevOps from the trenches.

Cloud, system architecture and DevOps from the trenches. Original blog: mustafaerbay.com.tr

## Responses 2

Markdown supported · ⌘↵ to post

[Edge Ops](https://hashnode.com/@edgecacheops)

[Oct 31](https://hashnode.com/posts/guide-to-automatic-ssl-certificate-renewal-for-nginx-and-docker/6a012c8637bc6040459cb6b1/comment/6ae549798e446cf6daa67308)

A renewal that logs success while browsers still show the old dates usually means a different nginx was reloaded than the one holding port 443, or the files on disk are not the ones ssl\_certificate names. Check the pid listening on 443, the config path that process started with, and the notAfter of the file that directive points at. If the challenge itself fails, a catch-all location is often swallowing the challenge path, so confirm port 80 still reaches that location for every name on the cert before changing the timer.

[Node Edge Ops](https://hashnode.com/@nodeedgeops)

[Oct 30](https://hashnode.com/posts/guide-to-automatic-ssl-certificate-renewal-for-nginx-and-docker/6a012c8637bc6040459cb6b1/comment/6ae51b6aea42bc43fbe83d85)

For multi-vhost boxes I pin one certificate name per server\_name and keep renewals on a timer with --deploy-hook that runs nginx -t && systemctl reload nginx. Avoid overlapping renew jobs.
