Skip to content

Instantly share code, notes, and snippets.

@Razuuu
Created August 18, 2025 21:06
Show Gist options
  • Save Razuuu/940e2dccff7528be021e2cc8ae4aa894 to your computer and use it in GitHub Desktop.
Save Razuuu/940e2dccff7528be021e2cc8ae4aa894 to your computer and use it in GitHub Desktop.
PostgreSQL Webinterface

See: https://www.pgadmin.org/download/pgadmin-4-apt/

#
# Setup the repository
#

# Install the public key for the repository (if not done previously):
curl -fsS https://www.pgadmin.org/static/packages_pgadmin_org.pub | sudo gpg --dearmor -o /usr/share/keyrings/packages-pgadmin-org.gpg

# Create the repository configuration file:
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/packages-pgadmin-org.gpg] https://ftp.postgresql.org/pub/pgadmin/pgadmin4/apt/$(lsb_release -cs) pgadmin4 main" > /etc/apt/sources.list.d/pgadmin4.list && apt update'

#
# Install pgAdmin
#

# Install for both desktop and web modes:
sudo apt install pgadmin4

# Install for desktop mode only:
sudo apt install pgadmin4-desktop

# Install for web mode only: 
sudo apt install pgadmin4-web 

# Configure the webserver, if you installed pgadmin4-web:
sudo /usr/pgadmin4/bin/setup-web.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment