How To Install pgAdmin on Ubuntu

Table of Contents

How To Install pgAdmin on Ubuntu




The PGAdmin web-based application allows communication with PostgreSQL databases, both locally and remotely. PGAdmin can be used to manage any kind of database administration tasks associated with a Postgres database. Linux, Unix, Mac OS X, and Windows are supported by this development platform. There is no better Open Source database in the world than this one. We will now install pgAdmin on Ubuntu.








Step 1: Configure VPSie cloud server






Those who already have a system up and running should skip this step and do update their system.




  1. Sign in to your system or register a newly created one by logging in to your VPSie account
  2. Connect by SSH using the credentials we emailed you.
  3. Once you have logged into your Ubuntu instance, run these commands to update your system.
# apt-get update && apt-get upgrade -y







Step 2: Add pgAdmin repository







From the pgAdmin APT repository, you can get pgAdmin packages for all Linux distributions based on Debian.




# sudo curl | sudo apt-key add



# sudo sh -c 'echo "deb$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list'







Step 3: Install pgAdmin






Please update the package list.



# sudo apt update




Then install the pgAdmin


# sudo apt install pgadmin4



The Apache service should have been started immediately after installation. You can check its status by running the following command.



# systemctl status apache2







Step 4: Set up Apache for pgAdmin





Run the following command to configure Apache webserver. To complete this, you will need to enter your email address and password.




# sudo /usr/pgadmin4/bin/







Step 5: Navigate to the pgAdmin Web interface







Allow http and https traffic if UFW firewall is configured.



# sudo ufw allow http

# sudo ufw allow https





Now open your browser and browse http://{ipaddressofyourserver}/pgadmin4.







You must enter your email address and password we provided during setup and click on ‘Login‘.










pgAdmin has been installed successfully on Ubuntu. Now you can begin to use this database. Thanks for reading, that’s all for now! I hope it was informative. 






Share on