Facebook Twitter Instagram
    TecAdmin
    • Home
    • FeedBack
    • Submit Article
    • About Us
    Facebook Twitter Instagram
    TecAdmin
    You are at:Home»Databases»PostgreSQL»How to Install and Configure pgAdmin4 on Ubuntu 18.04 & 16.04

    How to Install and Configure pgAdmin4 on Ubuntu 18.04 & 16.04

    By RahulNovember 12, 20182 Mins Read

    Introduction

    pgAdmin is a web-based interface for management of PostgreSQL database instances. It can be installed on Linux, Unix, Mac OS X, and Windows to manage PostgreSQL 9.2 and above.

    Advertisement

    Prerequisites

    You must have PostgreSQL server installed on your system via an official apt repository. If you don’t have installed PostgreSQL, use below link to install.

    Install PostgreSQL on Ubuntu

    Install pgAdmin4 on Ubuntu

    pgAdmin4 packages are available under PostgreSQL official apt repository. We assume you already have configured apt repository during installation of database server.

    Execute below command on the terminal to begin pgAdmin4 installation on Ubuntu.

    sudo apt-get install pgadmin4 pgadmin4-apache2
    

    The package pgadmin4-apache2 will integrate pgAdmin4 with Apache2 web server.

    install pgadmin4 ubuntu

    During the installation, you are required to setup pgAdmin4 admin login.

    Enter an email address to use as admin login id for your pgAdmin4 web interface. You can use any address of your choice.

    Then click OK.

    Now this will prompt to input password for the administrator account.

    This will complete the installation of pgAdmin4 on your system. This will also make required changes on your local PostgreSQL system for connection.

    Now, pgAdmin4 is ready to use. Let’s connect pgAdmin4 with PostgreSQL database.

    Connect PostgreSQL via pgAdmin4

    You have successfully installed pgAdmin4 on your Ubuntu system. Now you can access pgAdmin4 in your favorite web browser.

    Use servers IP address or domain name followed by /pgAdmin4 as subdirectory URL.

    http://example.com/pgAdmin4
    

    After successful login, you will be redirected to pgAdmin4 dashboard. As this is a new installation, there will be no servers connected.

    Now, connect your first PostgreSQL instance by clicking on “Add New Server“.

    This will open a popup window. This tutorial is using the basic settings to connect database instance. Enter the user-friendly name for the new instance connection under the General tab.

    Then switch to Connection tab. Enter hostname or IP address of your PostgreSQL instance. In my case, it’s running on localhost system, so I just the put localhost as the hostname. Then enter the username and password for PostgreSQL authentication.

    After that click Save button.

    After successful adding new instance, You will see instance in the left sidebar. Here you can manage the database instance.

    Conclusion

    You have installed pgAdmin4, a web-based interface for the PostgreSQL server management. Now connect as many as PostgreSQL instances with the pgAdmin4.

    pgadmin4 phpPgAdmin PostgreSQL
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email WhatsApp

    Related Posts

    How to Install PostGIS on Ubuntu 22.04 & 20.04

    How to Install Postgres on MacOS

    How To Install PostgreSQL on MacOS

    How to Allow Remote Connections in Postgres

    How To Configure PostgreSQL to Allow Remote Connections

    View 19 Comments

    19 Comments

    1. Pravin Bhatta on July 30, 2021 1:07 pm

      Hello!
      Your tutorials are great but i am trying to install pgadmin4 in my pc but i am getting this error whenever i execute the first step of installing pgadmin4 saying “Package ‘pgadmin4’ has no installation candidate” and also “Unable to locate package pgadmin4-apache2”.
      I did not understand this error and would appreciate if anyone help me solve this.
      Here is my full error message

      Package pgadmin4 is not available, but is referred to by another package.
      This may mean that the package is missing, has been obsoleted, or
      is only available from another source

      E: Package ‘pgadmin4’ has no installation candidate
      E: Unable to locate package pgadmin4-apache2

      Reply
    2. dd on December 9, 2019 10:57 am

      please where can I find the url of the PgAdmin?

      Reply
      • Tonderai Maduve on March 13, 2020 7:57 am

        localhost/pgadmin4

        Reply
    3. Jorge on December 3, 2019 10:16 pm

      Same here:

      AttributeError: ‘ReverseProxied’ object has no attribute ‘app’

      Reply
    4. Bais on November 29, 2019 1:45 pm

      HI I’m trying to use this tool and I found this error on error.log of apache2

      AttributeError: ‘ReverseProxied’ object has no attribute ‘app’

      Reply
    5. Fathi on October 20, 2019 4:44 am

      sir when i open ‘http://127.0.0.1/pgadmin4/’ ,it’s asking me a login name and password. but in the installation process i only gave the password. so how should i login into this now? Is it possible to register again ?
      Looking forward your reply.
      Thanks in advance

      Reply
    6. Benjamin on October 4, 2019 3:20 pm

      Thanks for the tutorial. It worked for me.

      Reply
    7. Mingyu Kang on September 21, 2019 5:13 pm

      Thanks a lot for kind introduction.

      I have a question. I successfully connected the ‘localhost/pgadmin4/browser/#’ on chrome.

      However, when I launched the icon ‘pgAdmin4’ on background screen, I found that the database created when I connected ‘localhost/pgadmin4/browser/#’ did not appeared.

      Could you explaint what the difference is?

      Reply
    8. Dimitar on August 13, 2019 8:33 am

      Would this work in non-gui mode (i.e. server mode)?

      Reply
      • Rahul on August 13, 2019 9:45 am

        Yes, pgadmin4 opens in the web browser. So there is no need of desktop system.

        Reply
    9. Israel on August 8, 2019 7:59 pm

      When I try to install these tools, I receive this error: The package «pgadmin4» does not have a candidate for installation

      Reply
    10. sam on April 8, 2019 9:08 am

      i forgot the password how can I reset it

      Reply
    11. daniel on March 20, 2019 12:59 pm

      it worked perfectly for me

      Reply
    12. joel on March 11, 2019 6:29 pm

      Hi.
      I followed the tutorial perfectly
      My problem is that it does not let me perform restauras
      The Pgadmin gives me an error [Errno 2] No such file or directory: ‘python’: ‘python

      Reply
    13. James on December 14, 2018 10:57 pm

      Hey Stark, I know by now this is probably late but did you confirm that Apache web server was running? Run this command on the terminal and ensure that it is running

      # systemctl status apache2

      Reply
      • joel on June 25, 2019 4:22 pm

        La aplicacion esta corriendo perfectamente!!!

        Reply
    14. Stark on November 27, 2018 10:41 am

      >>Use servers IP address or domain name followed by /pgAdmin4 as subdirectory URL.
      >>http://example.com/pgAdmin4

      This does not work. I tried http://localhost/pgAdmin4 as well as http://127.0.0.1/pgAdmin4

      All i get is “Not Found” page.

      Reply
      • Pdev on February 7, 2019 5:46 pm

        The url should have pgadmin4. No “A”, just “a”.

        Reply
        • fabio on August 18, 2019 12:28 pm

          Thanks, this detail really helped.

          Reply

    Leave A Reply Cancel Reply

    Advertisement
    Recent Posts
    • A Comprehensive Look at the Simple Mail Transfer Protocol (SMTP)
    • Understanding Basic Git Workflow: Add, Commit, Push
    • The Difference Between Git Reset –soft, –mixed, and –hard
    • Understanding the Staging Area in Git’s Workflow
    • Python Function with Parameters, Return and Data Types
    Facebook Twitter Instagram Pinterest
    © 2023 Tecadmin.net. All Rights Reserved | Terms  | Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.