PostgreSQL HA: TCP Proxy Cannot Be Disabled - Keeps Restoring After Deployment
bogdoslavik
PROOP

a month ago

Hello,

I'm experiencing an issue with the PostgreSQL HA service in my Railway project. I'm unable to disable the Public Network (TCP proxy on port 5432) for the HAProxy load balancer.

Problem:

  • Service: Postgres HA (HAProxy)
  • Service ID: 10274c16-5830-4c55-9570-f3ee44aaac56
  • Environment: production (5338d1b5-c811-490f-a385-36c0cec0f28d)
  • Project: MyDream (a6dddef4-fa70-490a-8ca6-5d5865841c98)

What I've tried:

  1. Updated the service configuration to remove the TCP proxy by setting tcpProxies to an empty object {}
  2. Triggered a new deployment
  3. Verified the changes were applied

Current behavior: After each deployment, the TCP proxy on port 5432 automatically reappears in the service configuration, even though I explicitly removed it. The public network access cannot be disabled.

Expected behavior: The TCP proxy should remain disabled after deployment, allowing the PostgreSQL HA service to be accessible only through the private network (.railway.internal).

Could you please help me understand if this is:

  • A limitation of the PostgreSQL HA template?
  • A bug in the configuration system?
  • Or if there's a different way to disable public access for this service?

Thank you for your assistance.

Best regards

$10 Bounty

1 Replies

Status changed to Awaiting Railway Response Railway about 1 month ago


Status changed to Open Railway about 1 month ago


quantumturbulence1
FREE

11 days ago

This does not look like a Postgres connection problem; it looks like the HA service/template is reconciling the TCP proxy back into the service config.

The useful check is whether the public TCP proxy is coming from the HA template/source config rather than your manual edit. If tcpProxies: {} is applied and then reappears after deployment, include:

1. the before/after service config diff

2. the HAProxy service ID

3. the deployment where it reappeared

4. whether there is any UI toggle for public networking on that HAProxy service

If there is no UI toggle and the config keeps being regenerated, this is probably something Railway/template support has to confirm or change for the PostgreSQL HA template.


Welcome!

Sign in to your Railway account to join the conversation.

Loading...