13 days ago
I’m planning to publish a new template on Railway, but I’m not sure how the public URL for the template is determined.
Could you please let me know what defines the final URL when a template is published?
I’ve checked the documentation, but I couldn’t find a section that explains this detail, so I wanted to ask here directly.
Thank you so much for your time and help!
0 Replies
13 days ago
What do you mean by how the public URL is determined? Like the name of the railway provided domain or like the value of RAILWAY_PUBLIC_URL ?
the name of the railway provided domain
Ah, got it! I meant the name in the Railway-provided domain.
For example, when publishing a template, it gets a URL like
https://railway.com/deploy/xxxx,
and I was wondering how the xxxx part is decided.
13 days ago
ooh
13 days ago
it gives a subdomain like xxx.up.railway.app
13 days ago
xxx is just the name of the service but if the domain is taken it'll add a randomized string after
Thanks for clarifying!
Just to make sure I got it right — if the name is already taken, Railway adds a random string, correct?
And the xxx part (service name) isn’t something we can control ourselves, right?
13 days ago
although you do have to enable the public domain in the template service settings for it to happen
13 days ago
you can set the service name
13 days ago
if you're on your service settings just click on the service name to edit it
13 days ago
are you referring to template publish urls here? Or service publicly accessible urls? (eg, website frontend)
13 days ago
Fragly’s advice is applicable to services
Thanks for the follow-up!
Yes, I was referring to the template publish URLs — not the service URLs.
13 days ago
You do not have the option to manipulate template publish urls, as far as I know
Thank you so much!
So, I understand that the URL generated when publishing a template can’t be controlled by us.
I really appreciate your support!
13 days ago
what i said is applicable to both templates and services, it follows this format:{template service name}-{environment}-{uuid}.[up.railway.app](up.railway.app)
template service nameis within your controlenvironmentdepends on where the user deploys it, usuallyproductionuuidis a random 4 letter string if{template service name}-{environment}is taken
11 days ago
!s
Status changed to Solved dev • 11 days ago