bookmark to open pgAdmin 4

Asked by At

I want to have a bookmark in Chrome to open pgAdmin 4. The only problem is, it seems like every time pgAdmin 4 itself launches, it chooses a different port (normally this is not a problem because it opens a tab for you straightaway, but if I can't find the tab I want to just open a new one).

Are there any hacks you can think of to make a bookmark that somehow finds the right port? Failing that, how can I easily figure out what port it's running at, so I can manually modify the URL accordingly? I'm on a Mac.

Just reopening pgAdmin the program doesn't work, because it seems that if it's already open in one tab it doesn't want to open another tab.

2 Answers

Marvin Klar On

By default pgAdmin 4 is using a ephemeral port (49152 to 65535), which is assigned by your os. If you want to have pgAdmin using the same port every time the application launches, you can change the following line of pgAdmin's configuration file ( in your pgAdmin4 installation folder): DEFAULT_SERVER_PORT = <port>

Example: DEFAULT_SERVER_PORT = 12345

Make sure that you use a available/unused port.

After changing and saving the configuration, restart pgAdmin and create a bookmark with the selected port (e.g. http://localhost:12345/browser).

n33rma On

Right click on pgAdmin4 icon in your taskbar -> select configure option, there you will find below option as shown in screenshot, provide the port you want to and save & restart, Now you can bookmark pagadmin4 url :)

enter image description here

enter image description here Hope that helps.