Runtime V2 only injecting 2 of 8 service variables into process.env (Node.js / Nixpacks)
covenai-dev
PROOP

2 months ago

"My service dazzling-gentleness has RAILWAY_BETA_ENABLE_RUNTIME_V2 enabled and it's causing environment variables to not be injected into my Node.js process. Only 2 of my 8 service variables are visible in process.env. Please disable Runtime V2 for my service or project."

Solved$10 Bounty

Pinned Solution

andreahlert
PRO

2 months ago

The Runtime V2 flag is indeed a no-op as mentioned, so that's not the cause here.

For the missing variables, a few things to check:

Most likely cause: variable reference resolution failure. If any of your variables use ${{Service.VAR}} or ${{shared.VAR}} syntax and the referenced service/variable doesn't exist or has a typo, Railway silently skips injection for those variables. Check the Variables tab for any references marked with a warning icon.

Also verify:

  • You're checking the right environment. Variables are scoped per environment (Production, staging, etc.). Confirm the 8 variables are actually set in the environment your service is deployed to, not just in another environment.
  • The variables are saved to the correct service, not accidentally on a different service in your project.
  • Try railway variables from the CLI to see exactly what Railway thinks is configured for that service/environment combo.

If references are the issue, clicking the warning icon on the variable in the dashboard will show what's failing to resolve.

2 Replies

Status changed to Awaiting Railway Response Railway about 2 months ago


Railway
BOT

2 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 Railway about 2 months ago


The V2 runtime isn't beta anymore, so that env variable would be a no-op.


andreahlert
PRO

2 months ago

The Runtime V2 flag is indeed a no-op as mentioned, so that's not the cause here.

For the missing variables, a few things to check:

Most likely cause: variable reference resolution failure. If any of your variables use ${{Service.VAR}} or ${{shared.VAR}} syntax and the referenced service/variable doesn't exist or has a typo, Railway silently skips injection for those variables. Check the Variables tab for any references marked with a warning icon.

Also verify:

  • You're checking the right environment. Variables are scoped per environment (Production, staging, etc.). Confirm the 8 variables are actually set in the environment your service is deployed to, not just in another environment.
  • The variables are saved to the correct service, not accidentally on a different service in your project.
  • Try railway variables from the CLI to see exactly what Railway thinks is configured for that service/environment combo.

If references are the issue, clicking the warning icon on the variable in the dashboard will show what's failing to resolve.


Status changed to Solved noahd 18 days ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...