By default, the localhost connections to the PostgreSQL database do not use TLS. To enable TLS, you have to either generate a self-signed certificate with OpenSSL or provide your own certificate.

To enable TLS on localhost connections to PostgreSQL, complete the following steps:


Generate or Provide Your Own Self-Signed Certificate with OpenSSL


Install the Certificate for PostgreSQL


Enable TLS on PostgreSQL