# Updating own ssl certificate

**URL:** <https://openvidu.discourse.group/t/updating-own-ssl-certificate/2859>\
**Category:** Issues with deployment\
**Tags:** v2\
**Created:** [March 25, 2021, 9:14am UTC](https://openvidu.discourse.group/t/updating-own-ssl-certificate/2859 "2021-03-25T09:14:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@Peter](https://openvidu.discourse.group/u/Peter)\
**Post date:** [March 25, 2021, 9:14am UTC](https://openvidu.discourse.group/t/updating-own-ssl-certificate/2859/1 "2021-03-25T09:14:52Z")

</div>

Dear all,

I’ve got a standard OpenVidu 2.15 deployed on AWS with an own ssl certificate.  
The existing certificate is expiring and I need to renew the certificate for the OpenVidu deployment.  
I’m stuck as to where to find the originally installed certificate and how to update them.  
Can somebody please point me in the right direction?

Best regards,  
Peter

---

<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:** [March 25, 2021, 6:00pm UTC](https://openvidu.discourse.group/t/updating-own-ssl-certificate/2859/2 "2021-03-25T18:00:25Z")

</div>

Are you using `CERTIFICATE_TYPE=owncert`? In this case just delete the `/opt/openvidu/certificates` folder and put the certificate at `/opt/openvidu/owncert` as specified in this section: [OpenVidu Docs](https://docs.openvidu.io/en/2.15.0/deployment/deploying-on-premises/#33-copy-certificatekey-and-certificatecert)

Both files, `certificate.cert` and `certificate.key`, should follow this format: [OpenVidu Docs](https://docs.openvidu.io/en/2.15.0/troubleshooting/#16-my-commercial-certificate-is-not-working-what-can-i-do)

* * *

In the case you’re using `CERTIFICATE_TYPE=letsencrypt`, if you remove `/opt/openvidu/certificates` and restart openvidu with `sudo ./openvidu restart` it should be enough to renew your certificates.

Letsencrypt autorenews are activated from 2.16.0

---

<div class="post-metadata">

**Author:** ![Peter](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@Peter](https://openvidu.discourse.group/u/Peter)\
**Post date:** [March 25, 2021, 7:05pm UTC](https://openvidu.discourse.group/t/updating-own-ssl-certificate/2859/3 "2021-03-25T19:05:34Z")

</div>

Thank you for reply!  
I am using CERTIFICATE\_TYPE=owncert.

Earlier today I already put the new certificate at `/opt/openvidu/owncert`. After restarting openvidu with `sudo ./openvidu restart`, it didn’t show/use the new certificates.

But, I just now deleted the `/opt/openvidu/certificates/` folder, checked if the certificate in the `/opt/openvidu/owncert` was the correct one, followed by a `sudo ./openvidu restart`. This time the correct certficate was being used.

So, thank you for helping me!

Best regards,  
Peter

---

<div class="post-metadata">

**Author:** ![Goutham\_Kamre](https://yyz2.discourse-cdn.com/free1/user_avatar/openvidu.discourse.group/goutham_kamre/32/1845_2.png) [@Goutham\_Kamre](https://openvidu.discourse.group/u/Goutham_Kamre)\
**Post date:** [February 12, 2022, 11:19am UTC](https://openvidu.discourse.group/t/updating-own-ssl-certificate/2859/4 "2022-02-12T11:19:34Z")

</div>

No connection to Openvidu server. This may be a certificate error at “[https://openvidu.example.com](https://openvidu.example.com)”

getting this error after removing letsencrypt directory.

done sudo ./openvidu restart
