(Last Updated On: March 31, 2019)

How to Install pgAdmin4 on Debian 10 / Debian 9?. pgAdmin is a feature-rich and open source PostgreSQL administration and development platform that runs on Linux, Unix, Mac OS X, and Windows. pgAdmin allows you to manage PostgreSQL 9.2 and above from a web interface.

Install pgAdmin4 on Debian 10/ Debian 9 requirements

You need to have PostgreSQL installed on your system before you can install pgAdmin 4. Refer to the guide below:

Install PostgreSQL 11 on Debian 10 (Buster)

Install PostgreSQL 11 on Debian 9

After the installation of PostgreSQL database server on Debian 10/9/8, proceed to install pgAdmin4 packages.

And PostgreSQL repository

If you have an installation of PostgreSQL on a different server, then first add PostgreSQL repository:

Import repository key:

sudo apt install -y vim wget
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -

Add repository:

RELEASE=$(lsb_release -cs)
echo "deb http://apt.postgresql.org/pub/repos/apt/ ${RELEASE}"-pgdg main | sudo tee  /etc/apt/sources.list.d/pgdg.list

Update system and install pgAdmin4 on Debian 10 Buster.

sudo apt update
sudo apt -y install pgadmin4 pgadmin4-apache2

During installation, you’re asked to configure initial user account.

Set password for the account.

Notice that the email address set will be used to login to pgAdmin 4 web interface.

Access pgAdmin 4 Web interface

If you have UFW firewall configured, allow http and https traffic.

sudo ufw allow http
sudo ufw allow https

Open your browser and http://[ServerIP_or_domain]/pgadmin4.

Provide set email address and password.

On the first page of pgAdmin, add a PostgreSQL server to administer with pgAdmin by clicking on “Add New Server”. This can be local or a remote PostgreSQL server.

Under the “General” section, give the server a name & description.

Under “Connection” tab, provide access details – DB host, DB user and Password.

When done, Click Save button to save the configurations. If you were successful adding the server, the name will appear in the left sidebar. Select the server to see database summary information and make changes.

You now have pgAdmin 4 installed on Debian 10, Debian 9 or Debian 8 server. Learn to use pgAdmin from the documentation page.

Installation on other operating systems:

How to Install pgAdmin 4 on CentOS 7 / Fedora 29

How to Install pgAdmin4 on FreeBSD 12

How to Install PostGIS on CentOS 7