9 months ago
We have about 2000+ custom client domains with a few being added/dropping off each day.
We were hoping to use Caddy's Automatic TLS Provisioning to manage these domains. It appears that we cannot do this, however, as Railway manages HTTPS for domains and we must explicitly define domains we want to use for our service. Is this correct? Thank you
9 Replies
9 months ago
Hello,
Yes it's true that you would not be able to manage HTTPS yourself, the domains would need to be added to the service settings.
Instead customers in similar situations have found great success in managing their domains via Cloudflare and overwriting the host header via snippets.
Status changed to Awaiting User Response Railway • 9 months ago
9 months ago
Thanks, I understand you to mean:
1.) Set up a domain that is known to Railway as the Custom Domain for the service.
2.) Have clients point to that custom domain
3.) Have a cloudflare snippet that says, any requests, rewrite the Host header from Client Domain to Known Custom Domain, and continue with request.
Is that accurate?
Status changed to Awaiting Railway Response Railway • 9 months ago
Status changed to Awaiting User Response Railway • 9 months ago
8 months ago
Cloudflare changed their product offerings recently and prevent use of host header modificatrion on Snippets. One may use Origin Rules to modify host header, but this is only available on Enterprise now.
An option, that I dont love but may be reasonable, is to have a seperate Caddy ingress outside of railway. The ingress will will reverse proxy to the railway services exposed via public TCP. The downside is: Not all infrastructure on railway; traffic on public routes; but otherwise, this seems reasonable.
Status changed to Awaiting Railway Response Railway • 9 months ago
8 months ago
I had a user tell me yesterday that they modified the host header via a snippet for your exact usecase, they are not on enterprise Cloudflare.
Status changed to Awaiting User Response Railway • 9 months ago
8 months ago
I tried for a bit, couldnt get it working, I will try again. Discussion online is variable with some users say they cannot and some users say they are grandfathered. I'll try further!
Status changed to Awaiting Railway Response Railway • 9 months ago
8 months ago
Yep overwrite host headers is Enterprise, but not when you do it via snippets, you only need Cloudflare Pro for that.
Status changed to Awaiting User Response Railway • 9 months ago
8 months ago
Do you have an example snippet?
Status changed to Awaiting Railway Response Railway • 8 months ago
8 months ago
No I don't sorry, it would just be a few lines of code to overwrite the Host header though.
Status changed to Awaiting User Response Railway • 8 months ago
2 months 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 2 months ago