2 months ago
Hello Railway Support,
I am experiencing a reproducible PostgreSQL authentication issue in my Railway project.
Project: eloquent-encouragement
Environment: production
I created two separate fresh PostgreSQL services:
- Postgres-5THB
- Postgres-L--w
Both services performed a full clean initdb initialization with fresh volumes and completed successfully.
However, external connections from my n8n service fail with:
FATAL: password authentication failed for user "postgres"
The n8n service uses Railway service-reference variables from the corresponding PostgreSQL service:
PGHOST
PGPORT
PGDATABASE
PGUSER
PGPASSWORD
This happened independently with both newly initialized PostgreSQL services.
The PostgreSQL servers themselves are online, user postgres exists, and remote authentication is configured with scram-sha-256.
It appears that the Railway-generated POSTGRES_PASSWORD / PGPASSWORD value exposed to other services does not match the password hash initialized for the postgres database user.
Could you please investigate whether PostgreSQL template credential generation / propagation is functioning correctly for this project?
Please do not delete, recreate, or modify my existing services without my confirmation.
My existing bridge service and Amazon SP-API credentials must remain untouched.
2 Replies
2 months ago
This thread has been opened as a bounty so the community can help solve it.
Status changed to Open Railway • about 2 months ago
2 months ago
Are you able to do a credential rotation by going into the Postgres service > Database > Config?
2 months ago
You need to redeploy the n8n service for the reference variables to be updated.