pgAdmin4 is a feature-rich, cross-platform, web-based interface that allows you to administer and manage PostgreSQL database instances in a web browser. In this guide, you will learn how to install pgAdmin4 on Ubuntu 18.04 LTS.
Before proceeding, ensure that you have PostgreSQL database installed on Ubuntu server 18.04 LTS
To verify that PostgreSQL is running on your system execute
# /etc/init.d/postgres status
By default, PostgreSQL runs on port 5432. To verify this, run the netstat command as shown
# netstat -pnltu | grep "5432"
Installing pgAdmin4 on Ubuntu 18.04
Now that you have verified that PostgreSQL is up and running, proceed to update & upgrade the system as shown
# sudo apt update -y && sudo apt upgrade -y
Next, run the command below to install pgAdmin4.
This will also install a host of other extra software packages and dependencies.
# sudo apt install pgadmin4 pgadmin4-apache2
The pgadmin4-apache2 package will get integrated with pgAdmin4 and Apache2 web server.
During this setup, you will be prompted for an email address. Provide your preferred email address
and hit "Ok"
Next, provide the password you are going to use during log in and hit "Ok"
Thereafter, the setup will continue and wrap up.
Great! At this point, you have successfully installed pgAdmin4 on your System.
Connecting to PostgreSQL via pgAdmin4
Now that you have successfully installed pgAdmin4 on your Ubuntu System, you can connect to PostgreSQL by browsing your server's IP address or domain name followed by the suffix /pgAdmin4 in the URL.
In my case my server's URL is
You will be presented with a login page as shown below
Provide the email address and the password you had defined earlier during the installation process and hit the 'Login' button.
This will usher you to PgAdmin4's dashboard as seen below.
Wonderful! If you have come this far, you have been able to install pgAdmin4 on Ubuntu 18.04 LTS. Please share your feedback in the comment section below.
Resource Link - Pgadmin4