R
Railway•2mo ago
Gonza

How can i handle multiple domains dynamic?

I need to register domain to my proxy service when a tenant register and configure their domain
39 Replies
Brody
Brody•2mo ago
You would want to utilize wildcard domains - https://docs.railway.app/guides/public-networking#wildcard-domains
Gonza
Gonza•2mo ago
Im use wildcard for tenants that not have domains. Example tenant.myweb.com. But how can i handle for a custom domain that tenant have dynamically or by code for example tenantdomain.com -> myProxyService
Brody
Brody•2mo ago
I would recommend doing that through cloudflare with a cloudflare tunnel
Gonza
Gonza•2mo ago
ok thx i never use cloudflare im going to learn @Brody Hi brody sorry the mention, i created a tunner and deploy the cloudflare tunnel connection on railway "cf-tunnel" but i cant connect over private networks to service i configure through http
Brody
Brody•2mo ago
your services will need to listen on ipv6 and a fixed port the private network is ipv6 only
Gonza
Gonza•2mo ago
yes my proxy use :: and port 3000 cloudflare config
Brody
Brody•2mo ago
whats with the underscore
Gonza
Gonza•2mo ago
No description
Gonza
Gonza•2mo ago
internal service the name of service xd
Brody
Brody•2mo ago
what kind of proxy app?
Gonza
Gonza•2mo ago
simple http redirect to anothers service by certain conditions like a tenant template or admin etc
Brody
Brody•2mo ago
more specifically? something you coded? or nginx?
Gonza
Gonza•2mo ago
by subdomain or custom domain redirect to the service of tenant coded in express js
Brody
Brody•2mo ago
show me the app.listen
Gonza
Gonza•2mo ago
logs
No description
Gonza
Gonza•2mo ago
No description
Brody
Brody•2mo ago
is the cloudflare tunnel is the same project?
Gonza
Gonza•2mo ago
yes
Brody
Brody•2mo ago
its trying to dial port 80
Gonza
Gonza•2mo ago
how can i change port or i need to set host on port 80?
Brody
Brody•2mo ago
save this config that log isnt what we would want to be looking at
Gonza
Gonza•2mo ago
what can i do?
Brody
Brody•2mo ago
send all the logs okay try accessing it again
Gonza
Gonza•2mo ago
No description
Brody
Brody•2mo ago
and what do the logs say now scroll down?
Gonza
Gonza•2mo ago
i reload site and nothing
Brody
Brody•2mo ago
remove the underscore from everything to do with the proxy service
Gonza
Gonza•2mo ago
some i saw i dont create a private network on tunnel that can be a problem?
Gonza
Gonza•2mo ago
No description
Gonza
Gonza•2mo ago
i said nothing underscore removed and now works
Brody
Brody•2mo ago
awsome
Gonza
Gonza•2mo ago
😂
Brody
Brody•2mo ago
lessen learnt, dont give things strange names
Gonza
Gonza•2mo ago
thats name its only for get on top of monorepo, my bad! thx again brody!
Brody
Brody•2mo ago
no problem
Gonza
Gonza•2mo ago
for wildcard in cloudflare i need to do something?
Brody
Brody•2mo ago
i wouldnt know how thats done in cloudflare
Gonza
Gonza•2mo ago
i create a cname manually with * and works at leats something i can do and works xd
Brody
Brody•2mo ago
awsome