

Now go to your browser and right-click on Servers, Create”, Server”.Įnter a name in the General tab. The second IP and port is the address of your PostgreSQL database server. The port 5432 is the port you will be connecting to. In your case it will be different, use the command ip addr to look it up. The fist IP adres and port (172.16.1.2:5432) is the IP of your local computer. You don’t need to open up any additional ports this way. Issue the following command on your local computer: ssh -fNg -L 172.16.1.2:5432:localhost:5432 35.156.108.86 The safest way to connect to your database is to use ssh. Start the Docker service: sudo service docker startĭownload and start the pgAdmin container: docker run -p 5050:5050 -name pgadmin nphung/pgadmin Install Docker with this simple script: sudo curl -sSL | sh

In this post I will explain how to set this up and create a secure ssh tunnel to your PostgreSQL database from the container. It’s a lot easier to run pgAdmin from a Docker container. To install you need to install Python, set up an virtual environment, etc. The latest version of pgAdmin, version 4, is not available in the Ubuntu repo’s.
