{"id":16438,"date":"2025-02-03T10:35:47","date_gmt":"2025-02-03T10:35:47","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=16438"},"modified":"2025-02-03T10:35:49","modified_gmt":"2025-02-03T10:35:49","slug":"setting-up-a-remote-postgres-database-server-on-ubuntu-18-04","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/","title":{"rendered":"Setting up a Remote Postgres Database Server on Ubuntu 18.04"},"content":{"rendered":"\n<p>Postgres is a robust database management system that handles large workloads from a single machine or a data center. It is highly scalable and widely popular. In this knowledge base, we will learn how to set up a remote Postgres database server for your project. Following this article will allow you to set up a Postgres connection from any IP address and will not cover specific\/authorized IP connections.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Well-known expertise of CLI (Command Line Interface).<\/li>\n\n\n\n<li>An Ubuntu server.<\/li>\n\n\n\n<li>Time to install Postgres local machine.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">How to Install Postgres?<\/h2>\n\n\n\n<p>First, you need to install the Postgres on the server. You can execute the following command to set up SSH into your server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh server_user@server_ip<\/code><\/pre>\n\n\n\n<p>Note:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server_user: Your server user&nbsp;<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>server_ip: Server's IP address<\/code><\/pre>\n\n\n\n<p>Input the relevant user password or SSH key password, if any. Then,&nbsp; update your server packages by running the command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update<\/code><\/pre>\n\n\n\n<p>Proceed further in the installation process by running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install postgresql postgresql-contrib<\/code><\/pre>\n\n\n\n<p>This process will install PostgreSQL along with its required dependencies. Once the installation is complete, switch to the PostgreSQL user to execute commands using the default PostgreSQL account by running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>su \u2013 postgres<\/code><\/pre>\n\n\n\n<p>The server user will switch from root to Postgres. Access the Postgres shell by running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>psql<\/code><\/pre>\n\n\n\n<p>You will be shown something similar to this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres@logrocket:~$ psql<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>psql (10.12 (Ubuntu 10.12-0ubuntu0.18.04.1))<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Type \"help\" for help<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>postgres=#<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Create User<\/h2>\n\n\n\n<p>Here, we will discuss creating a new user that will be used to access your Postgres database remotely. Execute this command to create a new one.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\\q<\/code><\/pre>\n\n\n\n<p>If you are still logged in to Postgres, run the following command to create a new user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>createuser --interactive \u2013pwprompt<\/code><\/pre>\n\n\n\n<p>A prompt will appear that asks you to input details like user role, name, and password to become a superuser from the user. Here is an example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Enter name of role to add: cleopatra<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Enter password for new role:<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Enter it again:<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Shall the new role be a superuser? (y\/n) y<\/code><\/pre>\n\n\n\n<p>We have considered cleopatra as the superuser. A superuser is a user having all privliges available on the Postgres instance. Next, we will assign our superuser cleopatra to a database by running this command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>createdb -O cleopatra egypt<\/code><\/pre>\n\n\n\n<p>This command above will create a new database named Egypt and assign Cleopatra to be the database user.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Allow Remote Access<\/h2>\n\n\n\n<p>In this step, we will learn how to configure PostgreSQL to accept external connections. First, open the configuration file using your preferred text editor:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/postgresql\/10\/main\/postgresql.conf<\/code><\/pre>\n\n\n\n<p>Navigate to this line in your file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#listen_addresses = 'localhost'<\/code><\/pre>\n\n\n\n<p>Change the value to \u201c*\u201d and uncomment. It allows Postgres conections from anyone.&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>listen_addresses = '*'<\/code><\/pre>\n\n\n\n<p>Save and exit the file. Next, modify the command pg_hba.conf to allow connections from everyone. Open the file with your preferred editor:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>nano \/etc\/postgresql\/10\/main\/pg_hba.conf<\/code><\/pre>\n\n\n\n<p>Modify this section:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># IPv4 local connections:<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>host&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 127.0.0.1\/32&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; md5&nbsp;<\/code><\/pre>\n\n\n\n<p>To this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># IPv4 local connections:<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>host&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; all&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.0.0.0\/0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; md5<\/code><\/pre>\n\n\n\n<p>The file stores information about client authentication, such as IP address ranges, database names, usernames, and authentication methods. Since we grant access to all databases with any IP address range, any IP address will be able to connect to our database. Save the file and exit. By executing the following command, you can allow port 5432 to pass through your firewall:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo ufw allow 5432\/tcp<\/code><\/pre>\n\n\n\n<p>Finally, apply all changes after restarting Postgres that you have made to its configuration by running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo systemctl restart postgresql<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Connect to Postgres Remotely<\/h2>\n\n\n\n<p>In this step, you will be connecting to the server from an external machine. Connect to the remote Postgres database by running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>psql -h {server_ip} -d egypt -U cleopatra<\/code><\/pre>\n\n\n\n<p>In this, {server_ip} denotes to the server IP address and you will get a prompt to type the user password. If the credentials match, you will be logged into the Postgres shell for cleopatra and database egypt.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"534\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-1.png\" alt=\"screen-1\" class=\"wp-image-16440\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-1.png 730w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-1-300x219.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<p>Create a new table and name it pharaohs by executing the following in the Postgres shell:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>create table pharaohs(name text);<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"512\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-2.png\" alt=\"screen-2\" class=\"wp-image-16442\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-2.png 730w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-2-300x210.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<p>In the Postgres shell, add Tutankhamun as a string to the pharaohs table by running the following:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>insert into pharaohs (name) values ('Tutankhamun');<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"512\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-3.png\" alt=\"screen-3\" class=\"wp-image-16443\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-3.png 730w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-3-300x210.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<p>Next, we will be accessing the database using GUI (Graphical User Interface) tools like tablePlus, which enables you to visualize data away from the command line interface to see if we can find the records we created. Open TablePlus and click on Create a new connection.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"526\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-4.png\" alt=\"screen-4\" class=\"wp-image-16445\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-4.png 730w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-4-300x216.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<p>From the dropdown, select the Postgres.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-5.png\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"526\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-5.png\" alt=\"screen-5\" class=\"wp-image-16447\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-5.png 730w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-5-300x216.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/a><\/figure>\n\n\n\n<p>Input credentials<\/p>\n\n\n\n<p>Note:<\/p>\n\n\n\n<p>Postgres default port is 5432<\/p>\n\n\n\n<p>Ignore the SSL regions (we won\u2019t cover this topic in this post)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"605\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-6.png\" alt=\"screen-6\" class=\"wp-image-16449\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-6.png 730w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-6-300x249.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<p>If the credentials are right, you will come across the GUI panel to view database records in which you will find the table created and the record we added to it.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"730\" height=\"468\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-7.png\" alt=\"screen-7\" class=\"wp-image-16451\" srcset=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-7.png 730w, https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-7-300x192.png 300w\" sizes=\"auto, (max-width: 730px) 100vw, 730px\" \/><\/figure>\n\n\n\n<p>As shown in the image, we can see the pharaohs table we created earlier and the record we added to it. Our remote database is ready!<\/p>\n\n\n\n<div class=\"vlt-box \">\n<div class=\"box-title\" style=\"background:#D5EAFF; color:#000\">Conclusion<\/div>\n<div class=\"box-content\" >\n<p>We have seen how to configure a Postgres database server for remote access. You can, therefore, host a database server for your next project. For production, security measures will have to be kept in mind. For example: only accepting specific IP addresses; you will not allow anybody to access your server by root. You will learn how to configure such settings in this tutorial.<\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Postgres is a robust database management system that handles large workloads from a single machine or a data center. It is highly scalable and widely popular. In this knowledge base, we will learn how to set up a remote Postgres database server for your project. Following this article will allow you to set up a [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[230],"tags":[],"class_list":["post-16438","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-database"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Setting up a Remote Postgres Database Server on Ubuntu 18.04<\/title>\n<meta name=\"description\" content=\"Securely access your PostgreSQL database from anywhere! This guide shows you how to configure a remote Postgres server on Ubuntu 18.04, covering firewall rules, user permissions, and more.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Setting up a Remote Postgres Database Server on Ubuntu 18.04\" \/>\n<meta property=\"og:description\" content=\"Securely access your PostgreSQL database from anywhere! This guide shows you how to configure a remote Postgres server on Ubuntu 18.04, covering firewall rules, user permissions, and more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2025-02-03T10:35:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-02-03T10:35:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"730\" \/>\n\t<meta property=\"og:image:height\" content=\"534\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Ujwala\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Ujwala\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/\",\"name\":\"Setting up a Remote Postgres Database Server on Ubuntu 18.04\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-1.png\",\"datePublished\":\"2025-02-03T10:35:47+00:00\",\"dateModified\":\"2025-02-03T10:35:49+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8\"},\"description\":\"Securely access your PostgreSQL database from anywhere! This guide shows you how to configure a remote Postgres server on Ubuntu 18.04, covering firewall rules, user permissions, and more.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-1.png\",\"contentUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-1.png\",\"width\":730,\"height\":534,\"caption\":\"screen-1\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Setting up a Remote Postgres Database Server on Ubuntu 18.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8\",\"name\":\"Ujwala\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8d26ea4b9b2d83ae90b67f6bf5eefbca?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/8d26ea4b9b2d83ae90b67f6bf5eefbca?s=96&d=blank&r=g\",\"caption\":\"Ujwala\"},\"description\":\"My aim is to create enriching content on topics related to SEO, web hosting and social media. The idea is to elevate the readers to new levels of usability, accessibility and understanding.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/ujwala\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Setting up a Remote Postgres Database Server on Ubuntu 18.04","description":"Securely access your PostgreSQL database from anywhere! This guide shows you how to configure a remote Postgres server on Ubuntu 18.04, covering firewall rules, user permissions, and more.","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:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/","og_locale":"en_GB","og_type":"article","og_title":"Setting up a Remote Postgres Database Server on Ubuntu 18.04","og_description":"Securely access your PostgreSQL database from anywhere! This guide shows you how to configure a remote Postgres server on Ubuntu 18.04, covering firewall rules, user permissions, and more.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2025-02-03T10:35:47+00:00","article_modified_time":"2025-02-03T10:35:49+00:00","og_image":[{"width":730,"height":534,"url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-1.png","type":"image\/png"}],"author":"Ujwala","twitter_misc":{"Written by":"Ujwala","Estimated reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/","name":"Setting up a Remote Postgres Database Server on Ubuntu 18.04","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-1.png","datePublished":"2025-02-03T10:35:47+00:00","dateModified":"2025-02-03T10:35:49+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8"},"description":"Securely access your PostgreSQL database from anywhere! This guide shows you how to configure a remote Postgres server on Ubuntu 18.04, covering firewall rules, user permissions, and more.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/#primaryimage","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-1.png","contentUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2025\/02\/screen-1.png","width":730,"height":534,"caption":"screen-1"},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/setting-up-a-remote-postgres-database-server-on-ubuntu-18-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"Setting up a Remote Postgres Database Server on Ubuntu 18.04"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/485f82549b85b9f4c82dc208c42964a8","name":"Ujwala","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/8d26ea4b9b2d83ae90b67f6bf5eefbca?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/8d26ea4b9b2d83ae90b67f6bf5eefbca?s=96&d=blank&r=g","caption":"Ujwala"},"description":"My aim is to create enriching content on topics related to SEO, web hosting and social media. The idea is to elevate the readers to new levels of usability, accessibility and understanding.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/ujwala\/"}]}},"views":0,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/16438","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=16438"}],"version-history":[{"count":7,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/16438\/revisions"}],"predecessor-version":[{"id":16453,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/16438\/revisions\/16453"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=16438"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=16438"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=16438"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}