Disable web login in pgAdmin 4



  • Working in a home LAN, no one else is able to reach this development instance. Still, pgAdmin 4 forces a login through its web interface, which is different from the credentials used to login to the actual Postgres service. In a development environment this is just a nuisance, two different logins to connect to a service.

    How can I disable the web login in pgAdmin 4?



  • From the documentation https://www.pgadmin.org/docs/pgadmin4/development/config_py.html :

    # The server mode determines whether or not we're running on a web server
    # requiring user authentication, or desktop mode which uses an automatic
    # default login.
    #
    # DO NOT DISABLE SERVER MODE IF RUNNING ON A WEBSERVER!!
    #
    # We only set SERVER_MODE if it's not already set. That's to allow the
    # runtime to force it to False.
    #
    # NOTE: If you change the value of SERVER_MODE in an included config file,
    #       you may also need to redefine any values below that are derived
    #       from it, notably various paths such as LOG_FILE and anything
    #       using DATA_DIR.
    

    if (not hasattr(builtins, 'SERVER_MODE')) or builtins.SERVER_MODE is None:
    SERVER_MODE = True
    else:
    SERVER_MODE = builtins.SERVER_MODE

    Try setting SERVER_MODE to False in the config.py, config_distro.py, config_local.py, or config_system.py.

    However, regard this note:

    If the SERVER_MODE setting is changed in config_distro.py, config_local.py, or config_system.py you will most likely need to re-set the LOG_FILE, SQLITE_PATH, SESSION_DB_PATH and STORAGE_DIR values as well as they will have been set based on the default configuration or overridden by the runtime.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2