# Need to include a TLS certificate to connect to a database

**URL:** <https://community.openfn.org/t/need-to-include-a-tls-certificate-to-connect-to-a-database/129>\
**Category:** Self-Hosting\
**Created:** [August 1, 2021, 5:02pm UTC](https://community.openfn.org/t/need-to-include-a-tls-certificate-to-connect-to-a-database/129 "2021-08-01T17:02:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![brendonGS](https://community.openfn.org/letter_avatar_proxy/v4/letter/b/ecccb3/32.png) [@brendonGS](https://community.openfn.org/u/brendonGS)\
**Post date:** [August 1, 2021, 5:02pm UTC](https://community.openfn.org/t/need-to-include-a-tls-certificate-to-connect-to-a-database/129/1 "2021-08-01T17:02:39Z")

</div>

Hello,

I want to connect to a Postgres database but it requires a TLS certificate. How do I include the TLS certificate when I create credentials to connect to the the database?

---

<div class="post-metadata">

**Author:** ![taylordowns2000](https://community.openfn.org/user_avatar/community.openfn.org/taylordowns2000/32/165_2.png) [@taylordowns2000](https://community.openfn.org/u/taylordowns2000)\
**Post date:** [August 2, 2021, 3:08pm UTC](https://community.openfn.org/t/need-to-include-a-tls-certificate-to-connect-to-a-database/129/2 "2021-08-02T15:08:04Z")

</div>

Hi @brendonGS , looks like we’re in touch over email. For the public record, this would need an adjustment to how the client is created in `language-postgres`.

Looks quite doable:

1. [SSL – node-postgres](https://node-postgres.com/features/ssl)
2. [language-postgresql/src/Adaptor.js at master · OpenFn/language-postgresql · GitHub](https://github.com/OpenFn/language-postgresql/blob/master/src/Adaptor.js#L46-L67)

For use on platform, I’ll also extend the credential form for the postgres adaptor so you can add in cert strings.
