sincecutoff.com
← all changes

railway sandbox create and fork accept public domains

Introduced 2026-09-11 · score 0.97

HOW TO USE IT

When creating or forking a sandbox that needs public HTTPS routes and private-network access, pass `--private-network` and repeat `--domain [PREFIX:]PORT` for each route. Read the published URLs from human or JSON output; if routes are still publishing, check `railway sandbox list` for the URLs.

railway sandbox create --private-network --domain <PORT>
railway sandbox fork <SOURCE_SANDBOX_ID> --private-network --domain <PREFIX>:<PORT> --json

WHY THIS HELPS

Create or fork a sandbox with public HTTPS routes while keeping it on the private network.

REQUIREMENTS AND LIMITATIONS

  • Version: v5.54.0
  • --domain [PREFIX:]PORT: Repeatable; publishes an HTTP domain on a port, optionally with a prefix. Requires `--private-network`. Prefixes must be unique, 1–46 lowercase letters, digits, or hyphens, with no leading or trailing hyphen; ports must be unique and from 1 to 65535. Up to 10 domains are supported.
  • --private-network: Joins the environment's private network. Required when using `--domain`; forks do not inherit the source sandbox's network mode.
  • <SOURCE_SANDBOX_ID>: Optional source sandbox ID for `fork`; defaults to the active sandbox. The source sandbox must be running.
  • --json: Outputs the created sandbox as JSON.
  • Prerequisite: Install the Railway CLI, sign in, and select/link the project and environment to use.
  • Prerequisite: The source sandbox must be running to fork it.
  • Prerequisite: Public domains require `--private-network`. Creation can report `domains: publishing`; run `railway sandbox list` to see the URLs.
  • Requires `--private-network`.
  • Routes may still be publishing when creation reports the URLs.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card