{"id":8510,"date":"2020-11-20T05:22:00","date_gmt":"2020-11-20T05:22:00","guid":{"rendered":"https:\/\/ubiq.co\/tech-blog\/?p=8510"},"modified":"2026-01-16T06:02:53","modified_gmt":"2026-01-16T06:02:53","slug":"how-to-setup-remote-connection-to-postgresql","status":"publish","type":"post","link":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/","title":{"rendered":"How to Setup Remote Connection to PostgreSQL"},"content":{"rendered":"\n<p>Often database administrators need to enable remote connections to their PostgreSQL database. You can easily enable remote access in PostgreSQL and allow remote connections from anywhere you want. In this article we will look at how to setup remote connection to PostgreSQL.<\/p>\n\n\n\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#Why_Enable_Remote_Access_in_PostgreSQL\" >Why Enable Remote Access in PostgreSQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#How_to_Setup_Remote_Connection_to_PostgreSQL\" >How to Setup Remote Connection to PostgreSQL<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#1_Modify_PostgreSQLconf\" >1. Modify PostgreSQL.conf<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#2_Modify_pg_hbaconf\" >2. Modify pg_hba.conf<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#3_Update_Firewall\" >3. Update Firewall<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#4_Restart_PostgreSQL_Server\" >4. Restart PostgreSQL Server<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#5_Test_Remote_connection\" >5. Test Remote connection<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#Conclusion\" >Conclusion<\/a><\/li><\/ul><\/nav><\/div>\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Why_Enable_Remote_Access_in_PostgreSQL\"><\/span>Why Enable Remote Access in PostgreSQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Remote access is often required in applications that access database from different IP addresses or geo locations. It is also required if your database developers and software programmers are working remotely. It is also useful if you want to fix issues that require remote assistance. While it is important to <a href=\"https:\/\/ubiq.co\/tech-blog\/enable-remote-access-mysql\/\">allow remote access<\/a> we also need to be careful about not allowing unauthorized access. So before you proceed, it is good to review the <a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-list-all-users-in-postgresql\/\">list of PostgreSQL users<\/a> on your system.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_to_Setup_Remote_Connection_to_PostgreSQL\"><\/span>How to Setup Remote Connection to PostgreSQL<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Here is how to setup remote connection in PostgreSQL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"1_Modify_PostgreSQLconf\"><\/span>1. Modify PostgreSQL.conf<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>PostgreSQL uses two configuration files <em>postgresql.conf<\/em> and <em>pg_hba.conf<\/em> that we need to update, to enable remote connection. Open terminal and run the following command to get the location of <em>postgresql.conf<\/em> file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># psql -U postgres -c 'SHOW config_file'<\/pre>\n\n\n\n<p>You will see the location of postgresql<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \/var\/lib\/pgsql\/data\/postgresql.conf<\/pre>\n\n\n\n<p>Open postgresql.conf file using a text editor<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># sudo vi \/var\/lib\/pgsql\/data\/postgresql.conf<\/pre>\n\n\n\n<p>Add the following line at its end.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">listen_addresses = '*'<\/pre>\n\n\n\n<p>Sometimes you may find the following line already present in your file<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">listen_addresses = 'localhost'<\/pre>\n\n\n\n<p>In such cases, please modify this line to the following, instead of adding it separately.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">listen_addresses = '*'<\/pre>\n\n\n\n<p>Save and close the file.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"2_Modify_pg_hbaconf\"><\/span>2. Modify pg_hba.conf<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Similarly, find the location of <em>pg_hba.conf<\/em> file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># grep pg_hba.conf \/var\/lib\/pgsql\/data\/postgresql.conf<\/pre>\n\n\n\n<p>You will see the location of pg_hba.conf file<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># \/var\/lib\/pgsql\/data\/pg_hba.conf<\/pre>\n\n\n\n<p>If you want to allow remote connection from a specific IP such as 210.201.102.100 then add the following line to pg_hba.conf file.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">host    all         all         <strong>210.201.102.100\/32<\/strong>    trust<\/pre>\n\n\n\n<p>The above line allows remote access from 201.201.102.100 IP, and uses <a href=\"https:\/\/en.wikipedia.org\/wiki\/Classless_Inter-Domain_Routing\">CIDR<\/a> notation to specify the IP address. Using CIDR notation, you can enable access for a single IP, as well as a range of IPs. If you want to allow access to multiple range of IPs, then add a separate line for each IP range.<\/p>\n\n\n\n<p>Also, it uses a trust-based authentication. If you want to use a more secure authentication method like MD5 (recommended), modify the above line to <\/p>\n\n\n\n<pre id=\"block-0110f768-ab2a-4953-a062-8c4e93a75d31\" class=\"wp-block-preformatted\">host    all         all         210.201.102.100\/32    <strong>md5<\/strong><\/pre>\n\n\n\n<p>If you want to allow remote access from all IPs, then use 0.0.0.0\/0 as shown below<\/p>\n\n\n\n<pre id=\"block-6f91c464-6d7c-40f9-9a59-88cf68274e95\" class=\"wp-block-preformatted\">host    all         all         <strong>0.0.0.0\/0<\/strong>    md5<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"3_Update_Firewall\"><\/span>3. Update Firewall<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>PostgreSQL server listens to port 5432. By default, it is closed to remote connections. So you need to open port 5432 for incoming connections. For more security, you may allow only the above mentioned IP address to access port 5432, instead of giving access to all IP addresses.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"4_Restart_PostgreSQL_Server\"><\/span>4. Restart PostgreSQL Server<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>Restart PostgreSQL server to apply changes<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># sudo <code>\/etc\/init.d\/postgresql restart<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"5_Test_Remote_connection\"><\/span>5. Test Remote connection<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>From your remote machine at 210.201.102.100, run the following command, to log into your PostgreSQL server (e.g IP &#8211; 144.41.14.44). Replace <em>your_username<\/em> below with your database username<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"># psql -U <strong>your_username<\/strong> -h 144.41.14.44 \nWelcome to psql 8.1.11 (server 8.4.18), the PostgreSQL interactive terminal. \npostgres=#<\/pre>\n\n\n\n<p>We have assumed that you are using an existing user for above step. You may also <a href=\"https:\/\/ubiq.co\/tech-blog\/create-user-postgresql\/\">create new user<\/a> and then try remote connection.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Conclusion\"><\/span>Conclusion<span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p>In this article, we have learnt how to enable remote access to PostgreSQL database to support remote connections. Allowing remote connection is a common requirement for all database administrators. It is important to be careful while allow remote access. Give access to only specific IP addresses and ranges, instead of all IP addresses. If you need to give only temporary access, the undo step #1 or #2, once the requirement is over. That will disable remote access once again. Hopefully, the above article will help you enable remote access to PostgreSQL server. <\/p>\n\n\n\n<p><a href=\"https:\/\/ubiq.co\/\">Ubiq<\/a> makes it easy to visualize data, and monitor them in real-time dashboards from PostgreSQL database. <a href=\"https:\/\/ubiq.co\/accounts\/register\">Try Ubiq<\/a> for free.<\/p>\n\n\n\n<p>Also read:<br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-compare-two-schemas-in-postgresql\/\">How to Compare Two Schemas in PostgreSQL<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/top-5-free-database-design-tools\/\">Top Free Database Design Tools<\/a><br><a href=\"https:\/\/ubiq.co\/tech-blog\/how-to-enable-ssl-in-postgresql\/\">How to Enable SSL in PostgreSQL<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can easily enable remote access in PostgreSQL databases. Here is how to setup remote connection in PostgreSQL.<\/p>\n","protected":false},"author":1,"featured_media":8513,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[348],"tags":[478],"class_list":["post-8510","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-postgresql","tag-remote-connection"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Setup Remote Connection to PostgreSQL - Ubiq BI<\/title>\n<meta name=\"description\" content=\"You can easily enable remote access in PostgreSQL databases. Here is how to setup remote connection in PostgreSQL.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Setup Remote Connection to PostgreSQL - Ubiq BI\" \/>\n<meta property=\"og:description\" content=\"You can easily enable remote access in PostgreSQL databases. Here is how to setup remote connection in PostgreSQL.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/\" \/>\n<meta property=\"og:site_name\" content=\"Ubiq BI\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ubiqbi\" \/>\n<meta property=\"article:published_time\" content=\"2020-11-20T05:22:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-01-16T06:02:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/remote-connection-postgresql.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"730\" \/>\n\t<meta property=\"og:image:height\" content=\"410\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Sreeram Sreenivasan\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:site\" content=\"@UbiqBI\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Sreeram Sreenivasan\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/\"},\"author\":{\"name\":\"Sreeram Sreenivasan\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"headline\":\"How to Setup Remote Connection to PostgreSQL\",\"datePublished\":\"2020-11-20T05:22:00+00:00\",\"dateModified\":\"2026-01-16T06:02:53+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/\"},\"wordCount\":625,\"commentCount\":0,\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/remote-connection-postgresql.webp?fit=730%2C410&ssl=1\",\"keywords\":[\"remote connection\"],\"articleSection\":[\"PostgreSQL\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/\",\"name\":\"How to Setup Remote Connection to PostgreSQL - Ubiq BI\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/remote-connection-postgresql.webp?fit=730%2C410&ssl=1\",\"datePublished\":\"2020-11-20T05:22:00+00:00\",\"dateModified\":\"2026-01-16T06:02:53+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\"},\"description\":\"You can easily enable remote access in PostgreSQL databases. Here is how to setup remote connection in PostgreSQL.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/remote-connection-postgresql.webp?fit=730%2C410&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/ubiq.co\\\/tech-blog\\\/wp-content\\\/uploads\\\/2020\\\/11\\\/remote-connection-postgresql.webp?fit=730%2C410&ssl=1\",\"width\":730,\"height\":410,\"caption\":\"remote connection in postgresql\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/how-to-setup-remote-connection-to-postgresql\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Setup Remote Connection to PostgreSQL\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#website\",\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/\",\"name\":\"Ubiq BI\",\"description\":\"Build dashboards &amp; reports in minutes\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/#\\\/schema\\\/person\\\/db98d49a766a3a111d8510935ab90abc\",\"name\":\"Sreeram Sreenivasan\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g\",\"caption\":\"Sreeram Sreenivasan\"},\"description\":\"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.\",\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/in\\\/sreeram-sreenivasan\\\/\"],\"url\":\"https:\\\/\\\/ubiq.co\\\/tech-blog\\\/author\\\/wordpress\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Setup Remote Connection to PostgreSQL - Ubiq BI","description":"You can easily enable remote access in PostgreSQL databases. Here is how to setup remote connection in PostgreSQL.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/","og_locale":"en_US","og_type":"article","og_title":"How to Setup Remote Connection to PostgreSQL - Ubiq BI","og_description":"You can easily enable remote access in PostgreSQL databases. Here is how to setup remote connection in PostgreSQL.","og_url":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/","og_site_name":"Ubiq BI","article_publisher":"https:\/\/www.facebook.com\/ubiqbi","article_published_time":"2020-11-20T05:22:00+00:00","article_modified_time":"2026-01-16T06:02:53+00:00","og_image":[{"width":730,"height":410,"url":"https:\/\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/remote-connection-postgresql.webp","type":"image\/webp"}],"author":"Sreeram Sreenivasan","twitter_card":"summary_large_image","twitter_creator":"@UbiqBI","twitter_site":"@UbiqBI","twitter_misc":{"Written by":"Sreeram Sreenivasan","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#article","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/"},"author":{"name":"Sreeram Sreenivasan","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"headline":"How to Setup Remote Connection to PostgreSQL","datePublished":"2020-11-20T05:22:00+00:00","dateModified":"2026-01-16T06:02:53+00:00","mainEntityOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/"},"wordCount":625,"commentCount":0,"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/remote-connection-postgresql.webp?fit=730%2C410&ssl=1","keywords":["remote connection"],"articleSection":["PostgreSQL"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/","url":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/","name":"How to Setup Remote Connection to PostgreSQL - Ubiq BI","isPartOf":{"@id":"https:\/\/ubiq.co\/tech-blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#primaryimage"},"image":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/remote-connection-postgresql.webp?fit=730%2C410&ssl=1","datePublished":"2020-11-20T05:22:00+00:00","dateModified":"2026-01-16T06:02:53+00:00","author":{"@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc"},"description":"You can easily enable remote access in PostgreSQL databases. Here is how to setup remote connection in PostgreSQL.","breadcrumb":{"@id":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#primaryimage","url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/remote-connection-postgresql.webp?fit=730%2C410&ssl=1","contentUrl":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/remote-connection-postgresql.webp?fit=730%2C410&ssl=1","width":730,"height":410,"caption":"remote connection in postgresql"},{"@type":"BreadcrumbList","@id":"https:\/\/ubiq.co\/tech-blog\/how-to-setup-remote-connection-to-postgresql\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/ubiq.co\/tech-blog\/"},{"@type":"ListItem","position":2,"name":"How to Setup Remote Connection to PostgreSQL"}]},{"@type":"WebSite","@id":"https:\/\/ubiq.co\/tech-blog\/#website","url":"https:\/\/ubiq.co\/tech-blog\/","name":"Ubiq BI","description":"Build dashboards &amp; reports in minutes","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ubiq.co\/tech-blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/ubiq.co\/tech-blog\/#\/schema\/person\/db98d49a766a3a111d8510935ab90abc","name":"Sreeram Sreenivasan","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4b3127ed2d4bb8efb3fa0bbb52cf2efd4d0156c97fc05a503537c883e8279947?s=96&d=mm&r=g","caption":"Sreeram Sreenivasan"},"description":"Sreeram Sreenivasan is the Founder of Ubiq. He has helped many Fortune 500 companies in the areas of BI &amp; software development.","sameAs":["https:\/\/www.linkedin.com\/in\/sreeram-sreenivasan\/"],"url":"https:\/\/ubiq.co\/tech-blog\/author\/wordpress\/"}]}},"jetpack_featured_media_url":"https:\/\/i0.wp.com\/ubiq.co\/tech-blog\/wp-content\/uploads\/2020\/11\/remote-connection-postgresql.webp?fit=730%2C410&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pbGGTT-2dg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8510","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/comments?post=8510"}],"version-history":[{"count":6,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8510\/revisions"}],"predecessor-version":[{"id":10291,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/posts\/8510\/revisions\/10291"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media\/8513"}],"wp:attachment":[{"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/media?parent=8510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/categories?post=8510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubiq.co\/tech-blog\/wp-json\/wp\/v2\/tags?post=8510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}