Assistance Needed – Environment Variables Being Overridden in Production (Config-as-Code Suspected but Not Visible)
nadja29c-ase
HOBBYOP

3 months ago

Hello Railway Support Team,

I’m writing because one of my services is experiencing a persistent issue where environment variables in Railway revert back to outdated values immediately after I update them. This behavior strongly suggests an active “Config-as-Code” (railway.json) override at the project level — but the Config-as-Code UI does not appear anywhere in my project, and I cannot locate any railway.json in my repository.

Here are the details.

Summary of the Issue

One of my services, priorities-guard-focused-mcp, depends on two specific environment variables:

  • BACKEND_URL

  • OAUTH_ISSUER_URL

I attempt to update these variables to the correct values:

https://priorities-guard-backend-production.up.railway.app
https://priorities-guard-backend-production.up.railway.app/oauth/focused

However:

  • Railway automatically reverts these values back to an old domain:

    https://priority-guard-backend-production.up.railway.app
    

    (note "priority" vs "priorities")

  • Even if I delete the variable entirely and re-add it, the wrong value reappears.

  • These variables are not coming from Shared Variables.

  • These variables are not coming from the service-level railway.json — I confirmed there is no active config-as-code file for the service.

  • They do not exist in my repository; nothing in my code hardcodes the old URL.

This makes it impossible for the MCP service to communicate with the backend.

What I have already verified

  1. This is not coming from the service’s config or hardcoded env. files.
    The service does not have config-as-code enabled.

  2. BACKEND_URL and OAUTH_ISSUER_URL are not Shared variables and are NOT the source.

  3. Repo does not contain railway.json.
    No such file exists in any directory.

  4. Application logs confirm the incorrect variables are being injected at runtime.

Request

Could you please help identify:

  1. What is the exact problem: Is there a hidden or legacy project-level railway.json still active for my project?/ Is there a previous config-as-code file still cached or attached to the environment?

  2. Can you help disable any project-level overrides or remove ghost configuration?

This issue is blocking deployment because my MCP service cannot reach the correct backend endpoint.

Thank you!

Nadja

$10 Bounty

2 Replies

Railway
BOT

3 months ago


3 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open ray-chen 3 months ago


Did you redeploy after updating the variables?


Loading...