Report this

What is the reason for this report?

How can I configure "Trusted Sources" for my postgres cluster to accept connections from my linux PC?

Posted on April 15, 2023

Hi! I’ve tried appending every IP I could find(hostname -I, curl ifconfig.io etc. - all the same) but I can only connect to my database if I disable the trusted sources list what I don’t want to do.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello @stevendobay

I’ll recommend you double-check your public IP address as this will be the IP from which the connection will be established.

ifconfig.io](http://ifconfig.io/) should return the correct public IP address

You can check our documentation about adding IPs as trusted sources here:

https://docs.digitalocean.com/products/databases/postgresql/how-to/secure/

Hope that this helps!

Hi @alexdo!

Thanks for the reply! That site gives me the same I’ve got from hostname -I and curl ifconfig.io - today, I had to refresh it but it still doesn’t work. Yes, I’ve read the guide and now I know how to add IPs on the site and with doctl but the firewall doesn’t accept my connections anyway.

Hi @alexdo! With the firewall disabled, I’m able to the database with the host/port/db/user/password/ssl-cert settings with DBeaver, node.js and psql. Example for the latter: psql -U doadmin -h HOST -p 25060 -d DB --set=sslmode=require --set=sslrootcert=ca-certificate.crt

The developer cloud

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

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.