Report this

What is the reason for this report?

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

Posted on February 26, 2021

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



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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.

With TypeORM I have to set the options to:

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

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.