> For the complete documentation index, see [llms.txt](https://docs.emaildelivery.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.emaildelivery.com/docs/options-for-adding-https/free-native-ssl-via-lets-encrypt.md).

# Free Native SSL via Let's Encrypt

{% hint style="info" %}
Before you begin, make sure Port 443 is open and unblocked by any other application, firewall, or SELinux policies on your server.&#x20;
{% endhint %}

{% hint style="info" %}
This will enable HTTPS:// for your ESP, and also replace your Transactional SMTP Relay self-signed certificate with a real certificate so TLS will work with all SMTP Relay connecting applications.&#x20;
{% endhint %}

{% hint style="success" %}
Instructions for automating the renewal of your Let's Encrypt certificate every 30 days are at the end of this document, this is a one-time "set it and forget it" process.&#x20;
{% endhint %}

Log into your VPS using SSH on macOS or PuTTY on Windows .

Change directory to your ESP installation:

```
cd edcom-install
```

Run this command and provide your ESP subdomain and domain as an argument.

```
./generate_letsencrypt_certificate.sh esp.yourdomain.com
```

**\*\*\* Note:** Use the the real subdomain and domain of your VPS above, not esp.yourdomain.com, this is just a placeholder. This is the domain you use to access your ESP with http\:// currently.

Convert your ESP to use HTTPS:// from now on:&#x20;

```
./convert_to_ssl.sh
```

Restart your ESP:&#x20;

```
./restart.sh
```

{% hint style="info" %}
**Create an automated cron job that renews your Let's Encrypt certificate every 30 days.**&#x20;
{% endhint %}

Run the following command and when you're asked which editor to use, select nano:

```
crontab -e
```

<figure><img src="/files/3W8eZFLz8yQrW3Ay0fkR" alt=""><figcaption></figcaption></figure>

Copy and paste the following into the bottom of the editor, change the placeholder domain to your real ESP domain, and hit ctrl-x to save:

{% code overflow="wrap" %}

```
* * */30 * * cd /root/edcom-install && ./renew_letsencrypt_certificate.sh esp.yourdomain.com > data/logs/certbot.log 2>&1
```

{% endcode %}

**\*\*\* Note:** Use the the real subdomain and domain of your VPS above, not esp.yourdomain.com, this is just a placeholder. This is the domain you use to access your ESP with http\:// currently.

<figure><img src="/files/OduG2ytjVeP4HqIxC0Pm" alt=""><figcaption></figcaption></figure>

**\*\*\* Note:** If your ESP is installed somewhere else other than /root/edcom-install you will need to modify that as well.

{% hint style="success" %}
**You're done!**\
Access your ESP using https\:// from now on, and use https\:// for all related configuration, such as the mta.conf file, API connections, Pabbly integrations, etc.&#x20;
{% endhint %}
