Service Variables not injected into running container (printenv shows none)
focusroom
FREEOP

2 months ago

Service Variables are saved correctly in the dashboard (I can see the correct value when I

click into a variable to edit it), but they never appear in the running container.

When I run printenv in the service Console, none of my custom Service Variables show up —

only Railway's own auto-injected system variables (RAILWAY_*, PORT, NODE_ENV, PATH, etc.)

are present. My application logs also confirm this: process.env.SYNC_API_SECRET (and other

variables like NEXTAUTH_SECRET) are undefined at runtime, even though I set them in the

Variables tab.

This happened on my first project ("positive-grace" / service "goldhub-jewelry-shop") and

I deleted everything and created a brand new project from scratch — the exact same issue

occurred again on the new project too.

Steps I've already tried (all with the same result):

  • Re-entering variables via the Raw Editor
  • Deleting and re-adding individual variables
  • Manual Redeploy after saving variables
  • Deleting and recreating the entire service
  • Deleting and recreating the entire project

Current project: goldhub-jewelry-shop

Repo: focusroom/goldhub-jewelry-shop (branch: main)

Latest failing deployment ID: a58e2260

Could you please check my account for anything that might be blocking Service Variables

from being injected into deployments? Thank you.

Solved

1 Replies

Railway
BOT

2 months ago

Your 7 custom variables (SYNC_API_SECRET, NEXTAUTH_SECRET, ADMIN_PASSWORD, and the rest) are currently staged but not yet applied. They are sitting as pending edits in the dashboard, which is why the running container does not have them. You should see a bar at the top of the project canvas showing "10 changes" with a Deploy button. Click that to apply them, and the next deployment will include all your variables.


Status changed to Awaiting User Response Railway • about 2 months ago


Railway
BOT

a month ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway • about 1 month ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...