# PostgreSQL Cluster with SSL

**URL:** <https://forums.percona.com/t/postgresql-cluster-with-ssl/38130>\
**Category:** PostgreSQL\
**Created:** [May 28, 2025, 10:17am UTC](https://forums.percona.com/t/postgresql-cluster-with-ssl/38130 "2025-05-28T10:17:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramadhaniawy](https://avatars.discourse-cdn.com/v4/letter/r/3da27b/32.png) [@ramadhaniawy](https://forums.percona.com/u/ramadhaniawy)\
**Post date:** [May 28, 2025, 10:17am UTC](https://forums.percona.com/t/postgresql-cluster-with-ssl/38130/1 "2025-05-28T10:17:34Z")

</div>

Hi there!  
I want to ask about postgresql with ssl. is anyone here have been try to use postgresql 14 cluster (that run on patroni and etcd) and also using ssl?  
Or if not, does anyone build and use postgresql with ssl generally? Cause I wonder, about the SSL in the postgresql  
Thank you

---

<div class="post-metadata">

**Author:** ![laudares](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/laudares/32/10_2.png) [@laudares](https://forums.percona.com/u/laudares)\
**Post date:** [May 28, 2025, 3:55pm UTC](https://forums.percona.com/t/postgresql-cluster-with-ssl/38130/2 "2025-05-28T15:55:47Z")

</div>

Hi @ramadhaniawy, SSL is a regular part of PostgreSQL, yes. You can have more information on how to secure your server in the following blog posts from my colleague Jobin:

> **[Securing Patroni REST API End Points - Part 1](https://www.percona.com/blog/securing-patroni-rest-api-end-points-part-1/)**
>
> One feature of Patroni is its powerful set of REST APIs, which can be broadly classified as Safe and Unsafe APIs. Here's how to secure the unsafe ones.

> **[Securing Patroni REST API End Points Part 2: Using SSL Certificates](https://www.percona.com/blog/securing-patroni-rest-api-end-points-part-2-using-ssl-certificates/)**
>
> In the first part of the article, we discussed how to achieve minimum security by adding a username and password to Patroni REST API and switching from HTTP traffic to HTTPS. In this article, we will be covering how to secure REST APIs using...

Note that etcd can also be configured with TLS (settings ETCD\_KEY\_FILE and ETCD\_CERT\_FILE).  
I hope this helps!

---

<div class="post-metadata">

**Author:** ![ramadhaniawy](https://avatars.discourse-cdn.com/v4/letter/r/3da27b/32.png) [@ramadhaniawy](https://forums.percona.com/u/ramadhaniawy)\
**Post date:** [May 30, 2025, 2:00am UTC](https://forums.percona.com/t/postgresql-cluster-with-ssl/38130/3 "2025-05-30T02:00:24Z")

</div>

Dear Laudares,  
Thank you, I’ll try it. Anyway, I also wonder, since I use postgresql cluster, I do have load balancer (haproxy). In haproxy, there are 3 mode of SSL, Client-side encryption, OCSP stapling, and Server-side encryption ([SSL/TLS | HAProxy config tutorials](https://www.haproxy.com/documentation/haproxy-configuration-tutorials/security/ssl-tls/))

Have you ever try to made the SSL is run in the client side encryption only? So the patroni and etcd will still use the non ssl connection.

Thank you
