# Letsencrypt certificate

**URL:** <https://openvidu.discourse.group/t/letsencrypt-certificate/1886>\
**Category:** Issues with deployment\
**Tags:** v2\
**Created:** [August 22, 2020, 7:06am UTC](https://openvidu.discourse.group/t/letsencrypt-certificate/1886 "2020-08-22T07:06:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Upendra\_Kumar](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/upendra_kumar/32/924_2.png) [@Upendra\_Kumar](https://openvidu.discourse.group/u/Upendra_Kumar)\
**Post date:** [August 22, 2020, 7:06am UTC](https://openvidu.discourse.group/t/letsencrypt-certificate/1886/1 "2020-08-22T07:06:29Z")

</div>

letsencrypt certificate created manually by dns-01 challenge , how to use this in openvidu deployment 2.15.0 CE on premise ubuntu server 20.04

---

<div class="post-metadata">

**Author:** ![cruizba](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/cruizba/32/18_2.png) [@cruizba](https://openvidu.discourse.group/u/cruizba)\
**Post date:** [August 24, 2020, 8:39am UTC](https://openvidu.discourse.group/t/letsencrypt-certificate/1886/2 "2020-08-24T08:39:37Z")

</div>

Hi @Upendra_Kumar

This is automatically generated by OpenVidu if you’ve followed the instructions from [here](https://docs.openvidu.io/en/2.15.0/deployment/deploying-on-premises/)  
You need to write these parameters in your `/opt/openvidu/.env` file:

```auto
# Domain name. If you do not have one, the public IP of the machine.
# For example: 198.51.100.1, or openvidu.example.com
DOMAIN_OR_PUBLIC_IP=<YOUR_DOMAIN NAME>

# OpenVidu SECRET used for apps to connect to OpenVidu server and users to access to OpenVidu Dashboard
OPENVIDU_SECRET=<YOUR_SECRET>

# Certificate type:
# - selfsigned: Self signed certificate. Not recommended for production use.
# Users will see an ERROR when connected to web page.
# - owncert: Valid certificate purchased in a Internet services company.
# Please put the certificates files inside folder ./owncert
# with names certificate.key and certificate.cert
# - letsencrypt: Generate a new certificate using letsencrypt. Please set the
# required contact email for Let's Encrypt in LETSENCRYPT_EMAIL
# variable.
CERTIFICATE_TYPE=letsencrypt

# If CERTIFICATE_TYPE=letsencrypt, you need to configure a valid email for notifications
LETSENCRYPT_EMAIL=<YOUR_EMAIL>

```

After that, just execute as root in `/opt/openvidu`

```auto
./openvidu restart

```

Regards,  
Carlos
