Environment Variables Silently Dropped/Not Injected
haisem-j
HOBBYOP

3 months ago

Hi Railway Team,

I'm experiencing a critical production issue where environment variables are being silently dropped and not injected into my application runtime.

Problem:

  • Environment variables set in Railway dashboard don't appear in process.env

  • Only certain variable names work (appears to be an undocumented whitelist)

  • Railway CLI has the same issue - variables save but don't inject

  • Zero error messages or documentation about restrictions

Evidence:

✅ STRIPE_SECRET_KEY - Works
❌ STRIPE_WEBHOOK_SECRET - Silently dropped  
❌ TEST=1234 - Silently dropped
✅ DATABASE_URL - Works

Tested Both Methods:

  1. Web UI: Variables save in dashboard but missing from runtime

  2. CLI: railway variables --set shows variables saved, but process.env is empty

Setup:

  • Project: Express.js in Turborepo monorepo

  • Build: turbo run build --filter=backend

  • Start: turbo run start --filter=backend

  • Node.js v18.20.8

Impact: This is blocking production deployment - I cannot configure API keys, webhook secrets, or any custom environment variables.

Request:

  1. Is there an undocumented whitelist of allowed variable names?

  2. Why do variables save successfully but not inject into runtime?

  3. What's the recommended workaround while this is being fixed?

This appears to be a platform-wide bug affecting basic environment variable functionality that works on other hosting providers.

Service: ghostshorts-monorepo

Thanks for investigating this urgently.

This hits the key points while staying professional and actionable for their support team.

Solved

1 Replies

Railway
BOT

3 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


Status changed to Solved haisem-j 3 months ago


Loading...