# Postgres SSL certificate

**URL:** https://meta.discourse.org/t/postgres-ssl-certificate/139954
**Category:** Self-hosting
**Created:** [January 28, 2020, 4:06pm UTC](https://meta.discourse.org/t/postgres-ssl-certificate/139954 "2020-01-28T16:06:21Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ron.prince](https://avatars.discourse-cdn.com/v4/letter/r/b9bd4f/32.png) [@ron.prince](https://meta.discourse.org/u/ron.prince)
#### Post date: [January 28, 2020, 4:06pm UTC](https://meta.discourse.org/t/postgres-ssl-certificate/139954/1 "2020-01-28T16:06:22Z")

</div>

Does discourse use ssl when connecting to an externally configured postgres database?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [January 28, 2020, 11:15pm UTC](https://meta.discourse.org/t/postgres-ssl-certificate/139954/2 "2020-01-28T23:15:39Z")

</div>

As long as you properly configure your external server… yes.

> <https://stackoverflow.com/questions/23839920/how-do-i-make-rails-use-ssl-to-connect-to-postgresql>

---

<div class="post-metadata">

### Author: ![kincjf](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kincjf/32/317514_2.png) [@kincjf](https://meta.discourse.org/u/kincjf)
#### Post date: [July 26, 2023, 12:46am UTC](https://meta.discourse.org/t/postgres-ssl-certificate/139954/3 "2023-07-26T00:46:09Z")

</div>

hello. discourse docker version postgres ssl connection - is there a way to set it to use a .crt file?

The digitalocean database can be used only when the db ssl connection using the .crt file is set as default.
