Question

connect to droplet running postgresql 9.3 with pgadmin3

Hey Folks. I am running ubuntu 14.04 x64 on my own computer, and I am trying to access a droplet that is running 1404 x64 with postgresql 9.3. So I want to connect to the droplet postgresql instance using pgadmin3. I was not sure how to do this though? Are there any particular permissions or services I have to set on the droplet to remotely connect with pgadmin?

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

First you need to make sure postgres is accessible remotely. Edit the file "/etc/postgresql/9.3/main/postgresql.conf " and change the "listen line from: <br> <br><pre> <br>#listen_addresses = ‘localhost’ <br></pre> <br> <br>to <br> <br><pre> <br>listen_addresses = ‘*’ <br></pre> <br> <br>Then restart postgres with: “service postgresql restart” <br> <br>Now you should be ready to connect using pgadmin3. Take a look at the documentation here: <br> <br>http://www.pgadmin.org/docs/1.18/connect.html <br> <br>In the host field, use the IP address of your droplet. By default, postgres listens on port 5432. The username and password should be for the database user. <br> <br>For some more basic postgres help, check out: <br> <br>https://www.digitalocean.com/community/articles/how-to-install-and-use-postgresql-on-ubuntu-14-04 <br> <br>Let us know how it goes!

@dangelo: Have you set up a firewall? Make sure port 5432 on the server is actually open. On the server, you can run “netstat -plunt” to see a list of which ports are open with something actively listening for connections.

You could use something like: <br> <br><pre> <br>host all all 0.0.0.0/0 md5 <br></pre> <br> <br>to enable connections from all IPs provided you have the password. Though it’s generally considered better practice to restrict access to certain IP ranges. You can provide multiple different ranges if you move between different trusted networks. Check out the documentation here: <br> <br>http://www.postgresql.org/docs/9.3/static/auth-pg-hba-conf.html