Cloud + postgres certificate

Hello everyone, could you please help me with following problem?

I am trying to connect to CockroachDB from Streamlit cloud app and get following error? How can I add root.crt file to the app? Is there any other solution? Can you pass a certificate as env variable for example? Alternatively, can anyone suggest how can I disable cert verification? Just to note that all works perfect locally.

sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server at "free-tier5.gcp-europe-west1.cockroachlabs.cloud" (35.205.46.41), port 26257 failed: root certificate file "/home/appuser/.postgresql/root.crt" does not exist

Either provide the file or change sslmode to disable server certificate verification.

(Background on this error at: https://sqlalche.me/e/14/e3q8)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.