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.

I am having trouble connecting to a Digital Ocean managed postgres database for local development, a NodeJS API built with Fastify.
I can connect to the database via psql with the connection string provided by the connection details provided in the Overview tab. When I try and connect my API to the database with the same connection string I get the following error:
no pg_hba.conf entry for host <my ip address>, user <username>, database <defaultdb>, SSL off
Even when I add my computer as a trusted source I still cannot connect.
I’ve downloaded the cert provided in the Overview tab, moved it to ~/.postgresql/postgresql.crt and used chmod 600 on the file. Then I get the following when trying to connect with psql:
psql: certificate present, but not private key file ~/.postgresql.key
And still get the no pg_hba.conf error from above when attempting to connect with the Node API I am attempting to develop.
I’ve tried everything I can think of. Pretty much every solution for this error on StackOverflow mentions changing the pg_hba.conf file, but I don’t think that is possible with a managed database.
Please let me know if I need to provide more detail on the problem I am having.
44698b4d25054ea6a464f4a5215a7b
dolphinnnn
phosphide
xcco3x
Ross
Telmo Valverde
Alexandre Herlinvaux
Lukas Ulrich
72e659fde73744d381097f36c2b3ad
36d56192d3114513857618b22686be
fullammo
StrugglingDeveloper