> For the complete documentation index, see [llms.txt](https://docs.enginsight.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enginsight.com/docs/knowledge-base/english/configuration/how-do-i-update-a-ssl-tls-certificate-by-lets-encrypt-in-enginsight.md).

# How do I update a SSL/TLS certificate by Let's Encrypt in Enginsight?

For security reasons, SSL/TLS certificates from Let's Encrypt are only valid for 3 months and must be renewed after this period expires.

If you use a Let's Encrypt certificate for the secure connection to the Enginsight user interface, you can follow the steps below to update the certificate:

***

## Manual Update

{% stepper %}
{% step %}
Log in to the Enginsight Application Server.
{% endstep %}

{% step %}
Use [Certbot](https://certbot.eff.org/) to update the certificate. Certbot is a tool that automates the creation and installation of SSL/TLS certificates from Let's Encrypt.

If you have not installed Certbot yet, you can do so using the following command:

```
sudo apt-get install certbot
```

{% endstep %}

{% step %}
Stop the nginx service using the following command:

```
sudo systemctl stop nginx
```

{% endstep %}

{% step %}
Run the following command to have Certbot check the validity of your Let's Encrypt certificate and automatically renew it if it expires within the next 30 days:

```
sudo certbot renew
```

{% endstep %}

{% step %}
Start the nginx service again so that the renewed certificate is loaded correctly:

```
sudo systemctl start nginx
```

{% endstep %}
{% endstepper %}

***

## Automated Update

To update your Let's Encrypt certificate automatically, you can optionally create a cron job.

Follow these steps:

{% stepper %}
{% step %}
Log in to the Enginsight Application Server.
{% endstep %}

{% step %}
Create a cron job using the following command:

```
sudo crontab -e
```

{% endstep %}

{% step %}
Copy the following line into the editor that opens:

```
30 2 1,15 * * certbot renew --quiet
```

{% hint style="info" %}
You can adjust the cron job values as needed. In this example, Certbot checks the certificate on the 1st and 15th day of each month.
{% endhint %}
{% endstep %}

{% step %}
Save your entries.
{% endstep %}
{% endstepper %}

***
