Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to access remotely PgAdmin4?

Tags:

pgadmin-4

I Try access pgAdmin4 via browser instaled in another Notebook with Linux Ubuntu 16.04 in the same network in my house, but not access. In localhost... Okenter image description here

But REMOTELY... DOES NOT ACCESS enter image description here

like image 932
Davi Menezes Avatar asked Oct 29 '16 23:10

Davi Menezes


People also ask

How do I access the pgAdmin4 web?

To open pgAdmin, select pgAdmin4 from the EDB Postgres menu. The client opens in your default browser. To connect to the Advanced Server database server, expand the Servers node of the Browser tree control, and right click on the EDB Postgres Advanced Server node.

Can we use pgAdmin online?

PgAdmin will use your preferred web browser to display a graphical user interface. You don't need internet to view local servers. It will prompt you for a master password every time you open pgAdmin to get access. After getting access click Servers(1) on the left side to open up your PostgreSQL 12 server.

What is the URL for pgAdmin 4?

Connecting PostgreSQL using pgAdmin 4 pgAdmin is the community client for using PostgreSQL. It can be downloaded from the pgAdmin website (https://www.pgadmin.org/download/).


2 Answers

You need to add the following config options:

DEFAULT_SERVER = '0.0.0.0'

in config_local.py (in "pgAdmin4" folder).

If you also want to change the default port then also add

DEFAULT_SERVER_PORT = 5050

like image 181
Murtuza Z Avatar answered Oct 27 '22 13:10

Murtuza Z


Tested on ubuntu 20.04
apt install pgadmin4-apache2
nano /usr/share/pgadmin4/web/config.py
Change 127.0.0.1 by 0.0.0.0
Don't forget to copy the key in the shell when you launch pgadmin4 in the remote web browser by replacing 127.0.0.1 by pgadmin4 host IP
E.G. : Something like this in your remote web-browser
http://192.168.1.56:43223/?key=5f45c8ee-4593-41d0-9ae1-06d6dd1d8280
PS : If you don't find config.py
apt install mlocate
updatedb
locate pgadmin4 | grep config.py$
All commands are in root don't forget sudo if you are not root

like image 31
Bastien Baranoff Avatar answered Oct 27 '22 13:10

Bastien Baranoff