Variable to reference service URL
notnotjake
PROOP

a month ago

I need to set a variable for my service that is the domain/url that it is available at.

Neither ${{vars.RAILWAY_PUBLIC_DOMAIN}} or ${{<project>.RAILWAY_PUBLIC_DOMAIN}} do this. I cannot quite tell what they reference because it doesn't update predictably for me. Currently when I use that value it uses a previous public url for the main service on one environment.

What I need is to reference the current services public domain. I need this for configuring passkeys.

Solved

1 Replies

a month ago

If you want to reference the services own public domain than omit the namespace - ${{RAILWAY_PUBLIC_DOMAIN}}

https://docs.railway.com/variables#referencing-variables-in-the-same-service


Status changed to Awaiting User Response Railway 28 days ago


Railway
BOT

21 days 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 21 days ago


Loading...