Postgres SSL cerificat

i’m using postgres like a SGBD for my backend, and i deployed my project to production in a ubuntu server, and it worked fine but when i wanna enable ssl in postgres after that i have this screen


.env file

the postgresql.crt file i get it from scalegrid

and if i add this line in the .env the app work again DATABASE_REJECT_UNAUTHORIZED=false
but i know that is not recommended for production environment

so the question is where can i find the root and the ca certificate

Hi @Omar_OUKIL,

The way authentication is made between your server and your database depends on how the database is hosted/managed. To avoid a self-signed certificate, please refer to your database provider about how to obtain the certificates.


1 Like