Skip to content
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


Steps to install pgAdmin4 in any machine

  1. Make sure you have python3 and python2.7 installed. Otherwise, install then running:
sudo apt-get install python3 python2.7
  1. Check if ~/.local/bin is in your $PATH environment variable, otherwise, run in your console:
	echo "PATH=$PATH:~/.local/bin" >> ~/.bashrc
	source ~/.bashrc
  1. Install apt requirements by running make install-deps-apt (your user must have sudo privileges)

  2. Find the latest pgAdmin4 release at

  • it should be under v3.1/pip/pgadmin4*****.whl
  1. Replace the value of the link in Makefile PIP_URL variable with the link to the latest release

  2. At this point, fabric should have been installed in your machine. Use fabric tasks to install for python2 or 3

fab install_python2


fab install_python3

The above scripts will install pgAdmin4 and its requirements, and copy the file as Make any desired changes in to customize the app's behavior.


Since the release 2.x, pgAdmin4 will set SERVER_MODE = True by default in its config file. If you want to run in desktop mode, remember to edit setting SERVER_MODE = False. Otherwise, pgAdmin4 will try to create its local database in /var/lib/pgadmin instead of ~/.pgadmin, and it will crash because you lack permissions.

Run locally

Start pgAdmin4 by running

fab launch

Then open your browser at

Run with uWSGI locally

Running with uWSGI allows you to spawn multiple process exposing pgAdmin4.

Start pgAdmin4 as an uWSGI process by running

fab runwsgihttp

This will spawn four uWSGI processes exposing them at

however uWSGI shines when you run it behing a reverse proxy such as Nginx

Run with uWSGI behind a reverse proxy

Let's say you want to run pgAdmin4 on a production server. You should expose an nginx virtual host at port 80.

Said vhost configuration could be at /etc/nginx/sites-enabled/ with the following contents:

upstream pgadmin {

server {
   listen 80;
   charset utf-8;

   location / {
     include     /etc/nginx/uwsgi_params;
     uwsgi_pass  pgadmin;

Then restart the nginx server with

sudo service nginx restart

Nginx will then forward incoming requests to internal port 5050 which you arent exposing to the internet.

Having done this, you can manually run uWSGI in socket mode *manually by running:

fab runwsgisocket

OR you could run uWSGI as a service, so you don't need to keep the manually started process running.

Formerly, this README has some steps detailing how to manually create a uWSGI service. However, I found out it requires a lot of tinkering according to each machine particular configuration and its details are beyond the scope of the current repo.

I'd suggest using supervisord to run the above uWSGI scripts as a service.


Steps to install pgAdmin4 in any machine




No releases published


No packages published
You can’t perform that action at this time.