Remote Access to PG

Topic: This article explains how to enable MD5 authentication and remote access for Postgres metadata.

Environment: This article is written for Diyotta version 4.1 installed on embedded Postgres metadata. 

Setup MD5 authentication 

To enable MD5 authentication for embedded Postgres, need to follow the given steps:

1 . Stop the DIServer using the following command-


2. Modify the following lines in file ~/diserver/server/pgsql/direpdata/pg_hba.conf and change the authentication method from trust to MD5.

# TYPE DATABASE        USER            ADDRESS                 METHOD
# "local" is for Unix domain socket connections only
local  all             all                                     md5
# IPv4 local connections:
host   all            all               md5
# IPv6 local connections:
host   all            all             ::1/128                 md5

Start DIServer


Setup Remote Access to Postgres Database

To access embedded Postgres database remotely, follow the below given steps.

1 . Stop the DIServer using the following commands-


2. Add the following line in file ~/diserver/server/pgsql/direpdata/pg_hba.conf

host    all             all               md5

3. Modify the following configuration parameter in file ~/diserver/server/pgsql/direpdata/postgresql.conf

listen_addresses = '*'

4. Start DIServer



On this page