DebianDebian Based

How To Install pgAdmin on Debian 12

Install pgAdmin on Debian 12

In this tutorial, we will show you how to install pgAdmin on Debian 12. For those of you who didn’t know, pgAdmin, an open-source administration and development platform for PostgreSQL databases, empowers users to efficiently manage their database systems. pgAdmin offers a plethora of features, including an intuitive user interface, advanced query tools, and robust server management capabilities. With pgAdmin, you can effortlessly create and modify databases, manage user permissions, and execute complex queries with ease.

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 step-by-step install pgAdmin on a Debian 12 (Bookworm).


  • A server running one of the following operating systems: Debian 12 (Bookworm).
  • 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).
  • An active internet connection. You’ll need an internet connection to download the necessary packages and dependencies for pgAdmin.
  • A non-root sudo user or 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 on Debian 12 Bookworm

Step 1. Before we install any software, 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 gpg gnupg2 software-properties-common apt-transport-https lsb-release ca-certificates

This command will refresh the repository, allowing you to install the latest versions of software packages.

Step 2. Installing pgAdmin on Debian 12.

To access the latest version of pgAdmin, add the official PostgreSQL repository to your package sources. Run the following commands:

curl -fsS | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg]$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

Now that you have added the repository, it’s time to install pgAdmin using the package manager. Execute the following command:

sudo apt update
sudo apt install pgadmin4

For the desktop version just install pgadmin4-desktop instead of pgadmin4-web:

sudo apt install pgadmin4-desktop

Step 3. Configuring pgAdmin.

After successful installation, it’s essential to configure pgAdmin to enhance your experience. Begin by setting up a master password by running the following command:

sudo /usr/pgadmin4/bin/

Follow the on-screen instructions to create a master password.

Step 4. Accessing pgAdmin Web Interface.

pgAdmin can be accessed through a web interface. To access it, open your favorite web browser and enter the following URL:


Install pgAdmin on Debian 12 Bookworm

Log in with your master password to access the pgAdmin interface.

Step 5. Troubleshooting Tips.

  • If you encounter any issues during the installation, verify that the repository was added correctly and that the packages are being fetched from the appropriate sources.
  • Double-check your system’s compatibility with the Debian 12 Bookworm version and confirm that the dependencies are met.

Congratulations! You have successfully installed pgAdmin. Thanks for using this tutorial to install pgAdmin on Debian 12 Bookworm. For additional help or useful information, we recommend you check the official pgAdmin website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!


r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button