I am trying to enable remote connections to my postgresql 9.1 db running on ubuntu 12.04.

This tutorial says to "set tcpip_socket to true" -- but it is for a centos server. I am on ubuntu.

I don't see this line included in my postgresql.conf.

$cat /etc/postgresql/9.1/main/postgresql.conf | grep tcpip_socket

And when I add it in, I get the error:

 "FATAL:  unrecognized configuration parameter "tcpip_socket"

Do I need to tell postgres 9.1 to "turn on" tcp_ip connections if its running on ubuntu 12.04?


All you should need is:

listen_addresses = '*'

and then to modify pg_hba.conf to permit connections from the desired source.

This is stated in the comments on the (very old) article you were reading.

Try using the main PostgreSQL documentation, or up to date tutorials, in future.


  • In my humble opinion, listen_addresses should be set to this by default. Because first I thought it was my VPN that was the issue. So I ran netcat to see if I could get data through. Then I thought it was UFW that was the issue, but the tcp/udp ports 5432 were already open. Then I thought shorewall was issue, but couldn't be since it was through VPN. I already had pg_hba.conf configured to accept an connections within VPN. And finally when I was about to lose hope, I came across this listen_addresses flag, which worked. – JohnMerlino Jun 27 '14 at 23:20
  • It's an ease of use vs secure-by-default tradeoff. Servers shouldn't listen on outside interfaces by default - even if it's more convenient if they do. – Craig Ringer Jun 28 '14 at 1:51
  • 1
    Note: The official Docker image uses listen_addresses = '*' per default. Also it trusts any host (ignoring passwords). – luckydonald Feb 9 '17 at 16:53
  • @luckydonald sigh. That's very silly of them. – Craig Ringer Feb 10 '17 at 8:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.