Question

not - connected { Error: self signed certificate in certificate chain while connecting to postgres

Posted February 26, 2021 723 views
UbuntuPostgreSQL

Hi,

I have created a postgres database. I have integrated my backend which is in nodejs with postgres.
When i deploy my code on server ,I get below error

not - connected { Error: self signed certificate in certificate chain
..
Pls guide.

Thanks
Swati

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hi there,

Is it a Managed PostgreSQL cluster that you are using or is it a PostgreSQL service installed on a Droplet?

Note that with the Managed clusters, you need to set the sslmode to require.

Regards,
Bobby

With TypeORM I have to set the options to:

{
  // other settings
  ssl: {
    rejectUnauthorized: false
  }
}