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

To activate TLS on localhost connections to PostgreSQL, complete the following steps:
  1. Generate or Provide Your Own Self-Signed Certificate with OpenSSL
  2. Install the Certificate for PostgreSQL
  3. Activate TLS on PostgreSQL