How to Install pgAdmin4 on Ubuntu 20.04

Install pgAdmin4 on Ubuntu 20.04

In this article, we will have explained the necessary steps to install and configure pgAdmin4 on Ubuntu 20.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

pgAdmin pgAdmin is one of the most popular tools for managing PostgreSQL database. It was a feature-rich PostgreSQL administration tool. A complete rewrite from the previous pgAdmin version, built with Python and JavaScript.

Install pgAdmin4 on Ubuntu 20.04

Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.

Step 2. Install PostgreSQL on Ubuntu.

Run the following commands to install PostgreSQL server on Ubuntu:

Once the installation is completed, the PostgreSQL service will start automatically. To check the Postgres version and confirm installation run following psql command:

Step 3. Install pgAdmin on Ubuntu.

First, add pgAdmin4 Key and Repository for Ubuntu 20.04:

Then, add the pgAdmin4 repository:

Now Install pgAdmin4 packages with additional packages for Apache UwsGI application using the apt command:

Step 4. Setup PostgreSQL Authentication.

Log in to the PostgreSQL shell using the ‘psql’ command below:

Now change the password for the ‘postgres’ user using the following query:

Step 5. Accessing pgAdmin 4.

Open your web browser and type the server IP address following by the ‘pgadmin4’ path URL:

On the pgAdmin4 login page, type your email address and password, then click the ‘Login‘ button.

That’s all you need to do to install pgAdmin4 on Ubuntu 20.04 LTS Focal Fossa. I hope you find this quick tip helpful. Don’t forget to share your valuable queries/suggestions in the below comment box & also drop your worthwhile feedback.