From a5644ce9fb5061c6aca045e886c4e1f8792b4958 Mon Sep 17 00:00:00 2001 From: Yajbir Singh Date: Thu, 11 Dec 2025 17:20:04 +0530 Subject: [PATCH] updated --- run-document-server.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/run-document-server.sh b/run-document-server.sh index 8736e9c75..4f083e08d 100644 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -265,6 +265,16 @@ if [ "${DB_HOST}" = "localhost" ]; then create_postgresql_cluster PG_NEW_CLUSTER=true fi + + # Force trust authentication for localhost connections + # This fixes the "password authentication failed" error + if [ -d "${PGDATA}" ]; then + echo "local all onlyoffice trust" > "${PGDATA}/pg_hba.conf" + echo "local all all peer" >> "${PGDATA}/pg_hba.conf" + echo "host all all 127.0.0.1/32 trust" >> "${PGDATA}/pg_hba.conf" + echo "host all all ::1/128 trust" >> "${PGDATA}/pg_hba.conf" + fi + LOCAL_SERVICES+=("postgresql") fi