Skip to content

PostgreSQL SSL certificate verification fails when connecting from Flowise container (works via OpenSSL and psql) #5351

@mzwk11

Description

@mzwk11

Describe the bug

When connecting Flowise (running inside a Docker container) to a PostgreSQL database that uses an internal corporate CA, the connection fails with:

Status: 500 Error: documentStoreServices.insertIntoVectorStore - Error: unable to verify the first certificate.

The same TLS connection to the same database works perfectly when tested manually with:

  • openssl s_client -connect db:5432 -starttls postgres
  • psql "postgresql://user:pass@db/db?sslmode=verify-full"
  • MCP connection in Flowise, when providing the SSL and certificate parameters manually

This indicates the container has the correct CA chain installed and OpenSSL verification succeeds, but Flowise does not respect the system CA store.

To Reproduce

  1. Run Flowise in Docker
  2. Install and verify CA inside the container
  3. In Flowise GUI → create a new Vector Store → choose PostgreSQL with SSLmode on
  4. Click upsert

Expected behavior

Flowise should reuse system certificates or respect environment variables such as:
PGSSLROOTCERT=/etc/ssl/cert.pem
PGSSLMODE=verify-full

Screenshots

No response

Flow

No response

Use Method

Docker

Flowise Version

3.0.8

Operating System

Linux

Browser

Chrome

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions