RailwayDocs

railway domain

Add a custom domain or generate a Railway-provided domain for a service.

Usage

Options

FlagDescription
-p, --port <PORT>The port to connect to the domain
-s, --service <SERVICE>The service to add the domain to
--jsonOutput in JSON format

Examples

Generate a Railway domain

Creates a free *.up.railway.app domain for your service.

Add a custom domain

Returns the required DNS records to configure.

Add domain with specific port

Add domain to specific service

Custom domain setup

When adding a custom domain, the CLI displays the required DNS records:

DNS changes can take up to 72 hours to propagate worldwide.

Limits

  • One Railway-provided domain per service
  • Multiple custom domains can be added per service