1. Внести изменения в файл: :
nano /etc/postgresql/17/main/postgresql.conf
listen_addresses = '*' # what IP address(es) to listen on;
2. Внести изменения в файл:
nano /etc/postgresql/17/main/pg_hba.conf
local all postgres md5
local all all peer
host all all 0.0.0.0/0 trust
host all all ::1/128 md5
local replication all peer
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5
3. Перезапустить PG:
systemctl restart postgresql