coolify icon indicating copy to clipboard operation
coolify copied to clipboard

[Bug]: PostgreSQL Database `POSTGRES_HOST_AUTH_METHOD` Not Being Set Through Configuration Page

Open takayumi opened this issue 7 months ago • 0 comments

Error Message and Logs

The Bug

I was trying to change the POSTGRES_HOST_AUTH_METHOD via the Coolify GUI, but it never seems to reflect in the actual container configuration.

The /var/lib/postgresql/data/pg_hba.conf file will always be the default scram-sha-256, as per the postgres image environment variable options, instead of the one we set in the Configuration > Host Auth Method input field within Coolify.

The last line will always be this.

host all all all scram-sha-256

Expected Result

It should match the value we set in step (2) of the "Steps to Reproduce" section like so:

host all all all password

Steps to Reproduce

  1. Create a new PostgreSQL database.
  2. Set the Host Auth Method to password or md5
  3. Go to the Terminal tab and do cat /var/lib/postgresql/data/pg_hba.conf

Example Repository URL

No response

Coolify Version

v4.0.0-beta.418

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Debian GNU/Linux 12 (bookworm)

Additional Information

Workaround

  1. Go into the container (like via the Terminal GUI in Coolify)
  2. Edit the file yourself with this command vi /var/lib/postgresql/data/pg_hba.conf

Are you willing to work on this?

I can spend some of my time to fix it. Not sure which part of the codebase I should start looking at though. I'd greatly appreciate it so that I can fix it.

It's possible that the other configuration settings do not properly reflect on the actual container as well, so this is a bit concerning.

takayumi avatar May 29 '25 20:05 takayumi