By Mark Adel
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!
Hi there,
You would need to configure your PostgreSQL service to allow remote connections.
You can do that by following the steps here:
postgresql.conf file:First, find the file with the following command:
sudo find / -name "postgresql.conf"
Once you find the file, open it with your favorite text editor and find this line here:
listen_addresses = 'localhost'
And change it to:
listen_addresses = '*'
With that change, the service will no longer listen only on localhost:5432 but on 0.0.0.0:5432 and will be accessible from the outside world and not only the Droplet itself.
pg_hba.conf fileAgain in order to find the file you can use this command here:
sudo find / -name "pg_hba.conf"
Then open the file and add the following entry:
all all YOUR_IP_ADDRESS/32 trust
That way all IP addresses will be allowed to access the service.
Finally, restart the PostgreSQL service.
Hope that this helps! Regards. Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.