a month 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
a month 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.
a month ago
ooh
a month ago
it gives a subdomain like xxx.up.railway.app
a month 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?
a month ago
although you do have to enable the public domain in the template service settings for it to happen
a month ago
you can set the service name
a month ago
if you're on your service settings just click on the service name to edit it
a month ago
are you referring to template publish urls here? Or service publicly accessible urls? (eg, website frontend)
a month 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.
a month 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!
a month 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
a month ago
!s
Status changed to Solved dev • about 1 month ago