# Automatic certificate upgrade · Free SSL certificates with Let’s Encrypt · Getting Started

Schedule certificate renewal with certbot in /etc/crontab. Running the reverse proxy on the host simplifies replacement of the renewed certificates.

Canonical: https://docs.mintsd.com/docs/mint-service-desk/getting-started-automatic-certificate-upgrade
Language: en-GB
Revision: 2a2d39f1e31deba465d9905cd685a5a3416966a588eb6151bba19ba5bc3c7cc9

<a id="element-01a1452d-ec52-76d9-8d7b-21f4db922724"></a>

Add a `certbot` renewal command to `/etc/crontab` to run it at scheduled intervals.

<a id="element-01a1452d-ec52-72fa-8aa0-918a6434f0c2"></a>

Example entry in `/etc/crontab`:

<a id="element-01a1452d-ec53-71c4-bc7d-2dc57d10cc46"></a>

```default
$ echo "0 0,12 * * * root python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew -q" \
  sudo tee -a /etc/crontab > /dev/null
```

<a id="element-01a1452d-ec54-71f4-911a-f037f8dbdfde"></a>

Replacing the certificate secret while the `Reverse Proxy` service is running requires additional steps. Move the reverse proxy configuration to the host so that `certbot` can replace the certificate files directly.

<a id="element-01a1452d-ec54-7ce7-947d-1717a69a497e"></a>

The next section describes how to configure the reverse proxy on the host.

