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... Ok

- 507
- 1
- 5
- 10
-
Stack Overflow is a site for programming and development questions. You should probably use another site on the [Stack Exchange network](https://stackexchange.com/sites) for this question. Also see [What topics can I ask about here](http://stackoverflow.com/help/on-topic) in the Help Center. https://superuser.com/questions/tagged/pgadmin. – jww Dec 05 '19 at 12:18
5 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

- 2,838
- 4
- 31
- 48

- 5,639
- 1
- 28
- 52
-
2I added DEFAULT_SERVER and now I'm faced with a login page (?) with email (??) and password. Any idea what to do with this? – Elad Tabak Dec 22 '16 at 08:18
-
How did you login earlier when you were using on local pc? Use the same login credentials to login into pgAdmin4. – Murtuza Z Dec 23 '16 at 05:38
-
-
Are you able to login into pgAdmin4 from localhost without email/password ? – Murtuza Z Dec 26 '16 at 07:42
-
@MurtuzaZ, I'm able, and I think Elad Tabak too. It usual pgAdmin4 behaviour when accessing through http://127.0.0.1 But when access through any other IP or domain name, even through http://localhost, it requests login and password. And I do not know, what password must I use. – Nashev Sep 16 '19 at 15:29
-
reading the documentation I've added the config_local.py next to the config.py file only with the DEFAULT_SERVER: '0.0.0.0' and worked like a charm! – Facundo Colombier Jul 07 '20 at 14:38
First change the line in config.py from DEFAULT_SERVER = '127.0.0.1' to DEFAULT_SERVER = '0.0.0.0'
Config.py is located in the same directory as pgAdmin4:
sudo find / -name "*pgAdmin4"
Start pgAdmin4 in the same directory (use tmux or as service to keep in background):
sudo python3 pgAdmin4.py
If you don't know the login, you can delete/move this file and restart pgAdmin.py:
sudo find / -name "*pgadmin4.db"
This should work on both Ubuntu Server and Desktop. You should preferably keep the 127.0.0.1 and use nginx or Apache in front.

- 7,195
- 2
- 54
- 44
Weird enough, in my case I have to manually run the command
$ pgadmin4
and then the dashboard will be presented in the default browser automatically.

- 7,420
- 4
- 53
- 63
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

- 11
- 2
It seems you are trying to open pgadmin client at server.
I suggest you to install pgadmin client from where you want to connect this , add server in pgadmin and do connect.

- 17
- 1