Deploy Addition Domains
Extra Railway/custom domains for your container
Railway-Addition-Domains
Just deployed
Deploy and Host Addition Domains on Railway
Each service/container on Railway only supports 1 public railway domain (xxx.up.railway.app). This one gets you another, by using reserve proxy
About Hosting Addition Domains
You will need to have your main container/service up and running first. after that use this template as a reserve proxy layer
Common Use Cases
- You container might have multiple process running in multiple ports, you can use this to expose all that process to public
- Get more custom domains than what you have with your current plan
Dependencies for Addition Domains Hosting
None - Addition Domains comes ready to use with the standard configuration.
Deployment Dependencies
- Public Networking (HTTP proxy): https://docs.railway.com/guides/public-networking
Implementation Details
- Deploy your main container/service first, it will have private/local domain
- Use that and setup env variable for Addition Domains
Environment variables
Required
Set at least one upstream:
DEFAULT_UPSTREAM, or- at least one of
PROXY_ROUTE_1...PROXY_ROUTE_5
DEFAULT_UPSTREAM format:
scheme://host:port
PROXY_ROUTE_x format:
domain=scheme://host:port
Examples:
DEFAULT_UPSTREAM=http://192.168.1.10:3000PROXY_ROUTE_1=app.example.com=http://192.168.1.10:3000PROXY_ROUTE_2=admin.example.com=http://192.168.1.11:8080
Optional
CLIENT_MAX_BODY_SIZE(default:5G)DEFAULT_UPSTREAMacts as the default route when host doesn't match anyPROXY_ROUTE_x
Why Deploy Addition Domains on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Addition Domains on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
Railway-Addition-Domains
lequanghuylc/Railway-Addition-DomainsPROXY_ROUTE_1