Skip to content

Instantly share code, notes, and snippets.

@programmerShinobi
Created January 4, 2026 07:03
Show Gist options
  • Select an option

  • Save programmerShinobi/ec990277f65520b57d0585f167069821 to your computer and use it in GitHub Desktop.

Select an option

Save programmerShinobi/ec990277f65520b57d0585f167069821 to your computer and use it in GitHub Desktop.
pgAdmin 4 Installation Guide on elementary OS 8 (Ubuntu 24.04 LTS)

pgAdmin 4 Installation Guide on elementary OS 8 (Ubuntu 24.04 LTS)

Step 1: Update the System and Install Required Dependencies

Before starting, ensure your system is up to date and you have installed all necessary dependencies:

$ sudo apt update

Step 2: Download and Install the pgAdmin 4 GPG Key

Run the following command to download and add the pgAdmin GPG key:

$ curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg

Step 3: Add the Repository for pgAdmin 4

Add the appropriate repository for your Ubuntu version. Replace circe with the correct codename (noble for Ubuntu 24.04):

$ sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/noble pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

Step 4: Install pgAdmin 4

Install both the desktop and web versions of pgAdmin 4:

$ sudo apt install pgadmin4 pgadmin4-desktop pgadmin4-web

Step 5: Set Up pgAdmin 4 in Web Mode

To configure pgAdmin 4 for web access, run the following setup script:

$ sudo /usr/pgadmin4/bin/setup-web.sh

You will be prompted to enter your email and password for the initial pgAdmin user account. Follow the instructions:

  • Email address: Enter a valid email address.
  • Password: Enter your password (ensure that both passwords match).

You will also be asked if you want to configure Apache and enable the necessary modules. Answer yes when prompted.

Step 6: Restart Apache

Once the configuration is complete, restart Apache:

$ sudo systemctl restart apache2

Step 7: Access pgAdmin 4 Web Interface

You can now access pgAdmin 4 in your web browser at the following URL:

http://127.0.0.1/pgadmin4

Log in using the email and password you set during the setup process.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment