# Automated TLS Certificate Renewal for Docker Gateway

**URL:** <https://forum.inductiveautomation.com/t/automated-tls-certificate-renewal-for-docker-gateway/89976>\
**Category:** Ignition\
**Tags:** docker\
**Created:** [May 6, 2024, 4:30pm UTC](https://forum.inductiveautomation.com/t/automated-tls-certificate-renewal-for-docker-gateway/89976 "2024-05-06T16:30:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nick\_Gendron1](https://avatars.discourse-cdn.com/v4/letter/n/5daacb/32.png) [@Nick\_Gendron1](https://forum.inductiveautomation.com/u/Nick_Gendron1)\
**Post date:** [May 6, 2024, 4:30pm UTC](https://forum.inductiveautomation.com/t/automated-tls-certificate-renewal-for-docker-gateway/89976/1 "2024-05-06T16:30:19Z")

</div>

I am trying to setup automated TLS certificate renewal for my gateway running 8.1.39 in Docker. My system is running on Ubuntu 22.04 and I am using certbot 2.10.0.

To generate the certificate, I am using certbot's standalone webserver by using `certbot certonly --standalone` to generate my certificate. Once generated if I manually add the certificate to the gateway everything works as expected. However, when I export the certificate using `openssl pkcs12 -export -out ${IGNITION_DOCKER_VOLUME}/data/local/ssl.pfx -inkey privkey.pem -in fullchain.pem -certfile root.pem`and move the file to `${IGNITION_DOCKER_VOLUME}/data/local` as outlined [here](https://forum.inductiveautomation.com/t/self-signed-certs-on-docker-containers/62356/2), I do not see the TLS certificate applying inside of the gateway.

While the manual procedure does work, I am looking for a solution that will handle the automatic renewal of the TLS certs. Has anyone done something similar such that TLS certificates will automatically renew on the gateway running in Docker?

---

<div class="post-metadata">

**Author:** ![ggross](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/ggross/32/12668_2.png) [@ggross](https://forum.inductiveautomation.com/u/ggross)\
**Post date:** [May 6, 2024, 4:51pm UTC](https://forum.inductiveautomation.com/t/automated-tls-certificate-renewal-for-docker-gateway/89976/2 "2024-05-06T16:51:43Z")

</div>

@Nick_Gendron1, I think you would need to create a custom Ignition docker image that adds a cronjob that calls a script similar to the one noted in the **Automated Renewal** section of the following guide:

> **[Let's Encrypt Guide for Ignition](https://inductiveautomation.com/resources/article/lets-encrypt-guide-for-ignition#hot-reloading-the-key-store)**
>
> Ignition 8.0.3 introduces support for hot-reloading the Gateway’s SSL keystore. This capability enables Ignition to play well with services such as Let’s Encrypt which provide for automatic SSL certificate management. This article walks through one...

Garth
