Atlantic.Net Blog

How to Install and Use pgAdmin on Ubuntu 18.04

Hitesh Jethva
by Atlantic.Net (43posts) under VPS Hosting

pgAdmin is a free, open-source, and web-based tool for managing a PostgreSQL database server. It is written in Python and Jquery and runs on most popular operating systems, including Windows, Linux, and Mac OS. pgAdmin comes with a rich set of features, a few of which are listed below:

  • Multi-platform compatible with multiple deployment models
  • Monitoring dashboard
  • Supports desktop mode and server mode
  • User-friendly, with powerful graphical interfaces
  • Powerful query tool and syntax highlighting editor

In this tutorial, we will show you how to install and configure pgAdmin on Ubuntu 18.04.


  • A fresh Ubuntu 18.04 VPS on the Cloud Platform.
  • A root password configured on your server.

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server.  Create a new server, choosing Ubuntu 18.04 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged into your Ubuntu 18.04 server, run the following command to update your base system with the latest available packages.

apt-get update -y

Step 2 – Install PostgreSQL Server

By default, the latest version of the PostgreSQL is not available in the Ubuntu 18.04 default repository. You will need to add the PostgreSQL repository in your system.

First, download and add the Postgres key with the following command:

wget --quiet -O - | apt-key add -

Next, add the PostgreSQL repository with the following command:

echo "deb `lsb_release -cs`-pgdg main" | tee  /etc/apt/sources.list.d/pgdg.list

Next, update the repository and install the PostgreSQL server with the following command:

apt-get update -y
apt-get install postgresql postgresql-contrib -y

Once the installation is completed, verify the status of the PostgreSQL server with the following command:

systemctl status postgresql

You should get the following output:

Step 3 – Set PostgreSQL User Password

By default, the password of the PostgreSQL user is not set.

To set it, log in to the Postgres user with the following command:

su - postgres

You should get the following output:

Next set the Postgres user password with the following command:

\password postgres

Provide your desired password as shown below:

Next, exit from the Postgres Shell with the following command:


Next, exit from the Postgres user with the following command:


Step 4 – Install pgAdmin

Next, you can install the latest version of pgAdmin by running the following command:

apt-get install pgadmin4 pgadmin4-apache2 -y

During the installation, you will be asked to provide your initial email address to create an admin user, as shown below:

Note: You will need these credentials later, so make sure to copy them down.

Provide your email address and click on the Ok button. You will also need set an admin password, as shown below:

Provide your desired password and click on the Ok button to start the installation process.

Once the installation has finished, you can proceed to the next step.

Step 5 – Access pgAdmin Web Interface

Now, open your web browser and type the URL http://YOUR_IP_ADDRESS/pgadmin4 – you will be redirected to the pgAdmin web interface in the following screen:

Provide your email address and password and click on the Login button. You should see the pgAdmin default dashboard in the following screen:

Next, click on the Add New Server button. You should see the following screen:

In the General tab, provide the name of the server and click on the Connection tab. You should see the following screen:

Provide the Hostname or IP address of the server that you want to connect, as well as the Port number, PostgreSQL username, and password, and click on the Save button. Once the connection has been established, you should see the detailed information about your PostgreSQL database in the left pane:


Congratulations! You have successfully installed pgAdmin on Ubuntu 18.04. You have also accessed pgAdmin and connected it to the local PostgreSQL database. For more information, read the pgAdmin documentation at pgAdmin doc. Get started with pgAdmin on a VPS from Atlantic.Net today!

Get A Free To Use Cloud VPS

Free Tier Includes:
G2.1GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year

Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Sales Today! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Case Studies

White Papers


HIPAA Partners

Recent Posts

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G2.1GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year

New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4


London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom