How do I connect services to share variables between services?
macdonjo
PROOP

a year ago

Each of my projects have about 5 services each.

I constantly find myself copying/pasting dozens of variables between services.

Surely there has to be a way to connect services and automatically share env vars but it isnt clear where or how. Cant find any documentation relating to this.

Solved

4 Replies

Railway
BOT

a year 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!


You can reference a variable within a service via the dropdown so you don't have to explicitly copy them, would this help in the meantime?

Attachments


Status changed to Awaiting User Response Railway about 1 year ago


angelo-railway

You can reference a variable within a service via the dropdown so you don't have to explicitly copy them, would this help in the meantime?![](https://station-server.railway.com/attachments/att_01k2x61sx1fzx9x30dmb1cqy7s)

macdonjo
PROOP

a year ago

10 vars x 5 services x 10 projects is still doing this 500 times. It's what I've been doing, just is so slow - like there has to be a better way.

Claude has been telling me there's a better way but I can't see it.

1. Click on the "celery-beat" service

2. Go to "Settings" tab

3. Scroll down to "Service Connections" or "Connected Services"

4. Click "Connect" or "+" button

5. Select "Redis" from the list → this auto-adds REDIS_URL

6. Click "Connect" again

7. Select "Postgres" from the list → this auto-adds DATABASE_URL


Status changed to Awaiting Railway Response Railway about 1 year ago


Did you look at Shared Variables? If this doesn't help, could you please expand on your use case?


Status changed to Awaiting User Response Railway about 1 year ago


Railway
BOT

a year 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 12 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...