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. 



 Disable SELinux on CentOS

pgAdmin is an open-source administration and management tool for the PostgreSQL database. It is available for Windows, macOS, and various Linux distributions, including Ubuntu.

To install pgAdmin on Ubuntu, you can follow these steps:

  1. Open the terminal on your Ubuntu machine.
  2. Add the PostgreSQL repository to your system’s software sources by running the following command: sudo sh -c ‘echo “deb $(lsb_release -cs)-pgdg main” > /etc/apt/sources.list.d/pgdg.list’
  3. Import the PostgreSQL repository signing key by running the following command: wget –quiet -O – | sudo apt-key add –
  4. Update the software sources by running the following command: sudo apt-get update
  5. Install pgAdmin by running the following command: sudo apt-get install pgadmin4

Yes, pgAdmin allows you to manage remote PostgreSQL servers. To do this, you need to set up a server connection in pgAdmin. You can specify the server’s host name or IP address, port number, and database credentials. Once the connection is established, you can view and manage the server’s databases, tables, indexes, and other objects.

To launch pgAdmin on Ubuntu, you can follow these steps:

  1. Open the Ubuntu applications menu.
  2. Search for “pgAdmin” and click on the pgAdmin icon.
  3. Alternatively, you can open the terminal and run the following command: pgadmin4

 Yes, pgAdmin allows you to run SQL queries on PostgreSQL databases. You can use the SQL Editor tool in pgAdmin to write and execute SQL statements. The results of the queries are displayed in the results panel, which can be exported to various formats, including CSV, JSON, and XML.

 Yes, pgAdmin allows you to perform backup and restore operations on PostgreSQL databases. You can use the Backup tool in pgAdmin to create a backup of a database or a specific set of tables. You can also use the Restore tool to restore a backup to a PostgreSQL server. Additionally, pgAdmin provides a maintenance tool that allows you to perform tasks such as vacuuming, analyzing, and reindexing databases.

Make a Comment
Share on
VPSie Cloud service

Unlock Your

20% Discount

The First 3 orders get 20% discount! Try Sign up on VPSie to get a chance to get the discount.