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

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi all,
I’m deploying a Node.js app on DigitalOcean App Platform that connects to a DigitalOcean-managed PostgreSQL database. I’m using drizzle-orm for database access.
I’m consistently getting this error during login/auth operations:
Error: self-signed certificate in certificate chain at /workspace/node_modules/pg-pool/index.js:45:11 ... code: 'SELF_SIGNED_CERT_IN_CHAIN'
#What I’ve already tried:
digitalocean-ca.crt) from the database “Connection” page../certs/digitalocean-ca.crt in my repo.db.ts, I’m reading and injecting it like this:import { drizzle } from 'drizzle-orm/node-postgres';
import { Pool } from 'pg';
import fs from 'fs';
import path from 'path';
const certPath = path.resolve(__dirname, '../../certs/digitalocean-ca.crt');
const pool = new Pool({
connectionString: process.env.DATABASE_URL,
ssl: {
rejectUnauthorized: true,
ca: fs.readFileSync(certPath).toString(),
},
});
export const db = drizzle(pool);
fs.existsSync()).sslmode=disable or ?ssl=false I am using sslmode=enable).rejectUnauthorized: false, everything works — but that’s insecure and not an option for production.So my question is: Firstly, why is there not an option to simply disable the SSL requirement? I don’t want the communication between the database server and my app to be secured. I’ve already set trusted apps, so it doesn’t need an SSL layer as well, in my opinion.
exact error
[AUTH] Login error after 80 ms: Error: self-signed certificate in certificate chain
[layerr-app-prod] [2025-06-26 05:39:58] at /workspace/node_modules/pg-pool/index.js:45:11
[layerr-app-prod] [2025-06-26 05:39:58] at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
[layerr-app-prod] [2025-06-26 05:39:58] at async file:///workspace/node_modules/drizzle-orm/node-postgres/session.js:83:22
[layerr-app-prod] [2025-06-26 05:39:58] at async DatabaseStorage.getUserByEmail (file:///workspace/dist/index.js:3306:22)
[layerr-app-prod] [2025-06-26 05:39:58] at async file:///workspace/dist/index.js:4786:20 {
[layerr-app-prod] [2025-06-26 05:39:58] code: 'SELF_SIGNED_CERT_IN_CHAIN'
Thanks in advance.
Aasim
fullammo
4ae272398ee6445a9bf73f4cd632b5
eddie
Taha Aziz Ben Ali
Telmo Valverde
Alexandre Herlinvaux
52d4eff26a544eefb189e2005836b2
EatingAquamarineScubaDiver
JuanPablo
fullammo
aq
a67ecb62f684403a9548d56545d826