In this tutorial, we will show you how to install PgAdmin 4 on Debian 10. For those of you who didn’t know, PgAdmin is one of the most popular tools for managing the PostgreSQL database. You can have a graphical interface to manage everything related to PostgreSQL. PgAdmin allows you to manage PostgreSQL 9.2 and above from a web interface. Multiplatform that can run on Linux, Mac, and Windows. Also, it provides multiple deployment models, you can deploy as a single Desktop application, or deploy as a web-based application.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the PgAdmin on a Debian 10 (Buster).
- A server running one of the following operating systems: Debian 10 (Buster).
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Install PgAdmin 4 on Debian 10 Buster
Step 1. Before running the tutorial below, it’s important to make sure your system is up to date by running the following
apt commands in the terminal:
sudo apt update sudo apt install curl ca-certificates gnupg
Step 2. Installing PgAdmin 4 on Debian 10.
Pgadmin4 is not available in the Debian default repositories. we need to add an external PgAdmin repository:
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
Then, create a repository file called
And add the following file:
deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main
Now, update the
apt package repository cache and install it the following command:
sudo apt update sudo apt install pgadmin4 pgadmin4-apache2
You will be asked to set an email address for the pgAdmin web interface initial user account during the package installation. This email address will be the account name. Provide the email address and press Enter.
Then you will also be asked to set a password for the pgadmin4 initial user account. Provide a strong password and then click Enter to proceed.
After the installation of the packages, the installer activates
systemd to start the Apache2 service and enables it to automatically start at system startup, every time the system is rebooted.
Once done, run the following command to check the status of the service:
sudo systemctl status apache2
Step 3. Configure Firewall.
Before you can access the pgadmin4 web interface, if you have the UFW firewall running, you need to open port 80 (HTTP) to allow incoming traffic on the Apache service as follows:
sudo ufw allow 80 sudo ufw allow 443 sudo ufw status
Step 4. Access PgAdmin Web Interface.
Once successfully installed, open your web browser and type the pgAdmin4 server IP address following by the default path ‘/pgadmin4’ on the address bar.
Congratulations! You have successfully installed PgAdmin. Thanks for using this tutorial for installing the latest version of PgAdmin 4 on the Debian system. For additional help or useful information, we recommend you check the official PgAdmin website.