TwentyT
Twenty2w ago
9 replies
andrew

Railway: Multi-Workspace + Server URL Issues

Recently found Twenty and deployed using the Railway template which worked perfectly, really impressed with the product too.

I wanted to test out multi-workspace which would be necessary for the project I would include it in and I am having difficulty connecting to backend once I enable multi-workspace. I will try to lay out all the info:

What works:
Railway Single Workspace
Railway-provided domain ☑️
Custom domain ☑️

When I first attempted multi workspace, I tried:
DEFAULT_SUBDOMAIN=app
Subdomain with wildcard set to go to the root domain:
*.mydomain.com

With wildcard subdomains Railway uses 2 cname records, examples:
;; CNAME Records
_acme-challenge.mydomain.com.    60    IN    CNAME    12345.authorize.railwaydns.net. ; cf_tags=cf-proxied:false
*.mydomain.com.    60    IN    CNAME    12345.up.railway.app. ; Railway twenty dashboard playground cf_tags=cf-proxied:false


Initially I was not even getting to the "Can't connect to backend" page and noticed that Railway was automatically setting the SERVER_URL to the public domain, therefore it was set to https://*.mydomain.com and I was having severe connection issues.

I tried changing the SERVER_URL to be hardcoded to my default subdomain "app",(https://app.mydomain.com), and I was start to get better but it would redirect after a few seconds to https://app.app.mydomain.com with a chrome insecure connection page.

I also tried having a nested wildcard subdomain, example:
;; CNAME Records
_acme-challenge.app.mydomain.com.    60    IN    CNAME    12345.authorize.railwaydns.net. ; cf_tags=cf-proxied:false
*.app.mydomain.com.    60    IN    CNAME    12345.up.railway.app. ; Railway twenty dashboard playground cf_tags=cf-proxied:false

Then also hardcoded the server URL to https://app.mydomain.com, this seems to be the closest I have gotten, but I cannot reach backend.
Running out of chars so attached browser errors. Thanks in advance!
CleanShot_2026-01-09_at_09.57.06.png
CleanShot_2026-01-09_at_09.58.05.png
Was this page helpful?