The TLS errors you’re seeing with DigitalOcean Managed PostgreSQL are related to SSL certificate handling between Prisma and DO’s self‑signed CA.
From the docs and current open issue, there are two main approaches:
1. Recommended: provide DO’s CA cert file
Download the CA certificate from your DigitalOcean Managed DB dashboard and mount it with your app. Then use a connection string like:
DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DB?sslmode=verify-full&sslrootcert=/app/ca-cert.crt"
This is confirmed to work with Prisma 7 on DigitalOcean managed Postgres.[DO TLS issue]
2. Using sslaccept=accept_invalid_certs (currently unreliable)
Prisma documents sslaccept=accept_invalid_certs to bypass strict certificate checks.[SSL options]
However, multiple users report that with Prisma 7 this flag is not honored for DigitalOcean and they still receive:
Error opening a TLS connection: self-signed certificate in certificate chain
even with:
DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DB?sslmode=require&sslaccept=accept_invalid_certs"
This worked in Prisma 6.9 but is broken in Prisma 7.[DO TLS issue]
What you can do now
- Use the CA-cert approach (
sslmode=verify-full&sslrootcert=...) in App Platform.
- Ensure your
DATABASE_URL in App Platform matches exactly what works locally.
- If you’re on Prisma 7 and want
accept_invalid_certs, be aware this is a known open issue and may not currently work with DigitalOcean.
If you still hit TLS errors even with sslrootcert, the knowledge sources don’t provide more specific DigitalOcean/App Platform fixes beyond this.