The persistent error I’m receiving is: FATAL: password authentication failed for user "postgres"
This error occurs both when my FastAPI backend (running locally and connecting via an SSH tunnel) tries to connect, and critically, even when I use the flyctl postgres connect -a my-chat-app-db-vittorio command.
The fact that flyctl postgres connect (which should use an internal Fly.io connection) also fails with the exact same FATAL: password authentication failed for user "postgres" error suggests a deeper problem with the postgres user’s credentials or state directly on the database instance itself.
Actions I’ve already attempted:
Confirmed the database is “Deployed” and appears active on the dashboard.
Verified that the flyctl proxy tunnel to my database is active and functioning (the error is no longer “Connection refused” or “Unknown host”).
Attempted to reset the postgres user’s password multiple times:
Via ALTER USER directly from psql (when flyctl connect was working previously).
Via flyctl secrets set DB_PASSWORD='[TEMPORARY_PASSWORD_USED_FOR_TESTING]' --app my-chat-app-db-vittorio.
Ensured the password [TEMPORARY_PASSWORD_USED_FOR_TESTING] is perfectly aligned across all my local configurations (.env file, DBeaver).
Confirmed sslmode=disable in my local connection strings (as required for the tunnel connection).
My current public IP is [MY_PUBLIC_IP_ADDRESS].
DBeaver, configured for a local tunnel connection, user postgres, and SSL disabled, also gives the same “password authentication failed” error when attempting a connection test.
Given that even Fly.io’s internal connection tool (flyctl connect) is failing with an authentication error, I suspect there’s an underlying issue with the postgres user’s credentials or status on the database instance itself that I cannot resolve from my side.
Could you please help me diagnose and resolve this? I urgently need to restore access to my database.
I’m experiencing a critical authentication issue with my PostgreSQL database my-chat-app-db-vittorio on Fly.io, preventing me from accessing it from anywhere.
The persistent error I’m receiving is: FATAL: password authentication failed for user "postgres"
This error occurs both when my FastAPI backend (running locally and connecting via an SSH tunnel) tries to connect, and critically, even when I use the flyctl postgres connect -a my-chat-app-db-vittorio command.
The fact that flyctl postgres connect (which should use an internal Fly.io connection) also fails with the exact same FATAL: password authentication failed for user "postgres" error suggests a deeper problem with the postgres user’s credentials or state directly on the database instance itself.
Actions I’ve already attempted:
Confirmed the database is “Deployed” and appears active on the dashboard.
Verified that the flyctl proxy tunnel to my database is active and functioning (the error is no longer “Connection refused” or “Unknown host”).
Attempted to reset the postgres user’s password multiple times:
Via ALTER USER directly from psql (when flyctl connect was working previously).
Via flyctl secrets set DB_PASSWORD='[TEMPORARY_PASSWORD_USED_FOR_TESTING]' --app my-chat-app-db-vittorio.
Ensured the password [TEMPORARY_PASSWORD_USED_FOR_TESTING] is perfectly aligned across all my local configurations (.env file, DBeaver).
Confirmed sslmode=disable in my local connection strings (as required for the tunnel connection).
My current public IP is [MY_PUBLIC_IP_ADDRESS].
DBeaver, configured for a local tunnel connection, user postgres, and SSL disabled, also gives the same “password authentication failed” error when attempting a connection test.
Given that even Fly.io’s internal connection tool (flyctl connect) is failing with an authentication error, I suspect there’s an underlying issue with the postgres user’s credentials or status on the database instance itself that I cannot resolve from my side.
Could you please help me diagnose and resolve this? I urgently need to restore access to my database.
A helpful note on this forum. Many of us are fellow customers, and some of us lurk here to share our knowledge and/or because we like helping. Some folks here are Fly employees, and they often solve technical problems here pro bono, especially if the error was caused on the Fly side. However, if I understand their prior pronouncements correctly, their official support channel is a paid one, and is via email.
So this forum appears to be based on a mix of best endeavours and volunteering. With that in mind, questions posted here are probably best not marked as urgent. Volunteers will help you at their leisure, and if you need technical backup, subscribing to Fly’s technical support service may be worth considering.