cli icon indicating copy to clipboard operation
cli copied to clipboard

CLI: `railway domain` outputs malformed TXT value (duplicated `railway-verify=` prefix) — silently breaks cert provisioning

Open orenmagid opened this issue 7 months ago • 1 comments

The railway domain <name> subcommand prints TXT verification instructions with the prefix railway-verify= duplicated:

TXT _railway-verify   railway-verify=railway-verify=<hash>

Per the Railway blog and dashboard, the canonical value is railway-verify=<hash> (single prefix). Pasting the CLI output verbatim leads to silent cert provisioning failure with no error surfaced in build/runtime logs or dashboard notifications.

Reproduction

railway 4.32.0 on macOS arm64:

$ railway domain desicify.com
Domain created: desicify.com
To finish setting up your custom domain, add the following DNS records to desicify.com:

	Type    Name              Value
	CNAME   @                 nqkiqvad.up.railway.app
	TXT     _railway-verify   railway-verify=railway-verify=8c0a84159be71c99ae3e4c218ea3e828965034d0f7beed24630193c1378501c1

The dashboard and Railway MCP agent both return the correct single-prefix format. Only the bare CLI is wrong.

Impact

During a first-time Railway deploy on 2026-04-20 I pasted the duplicated-prefix value into Cloudflare verbatim per CLI instructions. Symptoms:

  • dig +short _railway-verify.desicify.com TXT returned the duplicated-prefix value as set
  • DNS resolved correctly (CNAME → 151.101.2.x)
  • desicify.com served the wildcard *.up.railway.app cert (Railway never provisioned a desicify.com-specific cert)
  • ~50 minutes of investigation before identifying the cause
  • No error surfaced in railway logs --build or --deployment
  • No notification in dashboard about cert validation failure

After fixing the TXT record to single-prefix, cert provisioning completed in ~5 minutes.

Environment

  • railway 4.32.0
  • macOS arm64

Suggested fix

Emit the value with a single railway-verify= prefix to match dashboard output.


Drafted by Claude (Anthropic) during a debugging session and reviewed by the reporter before filing.

orenmagid avatar Apr 21 '26 13:04 orenmagid

I’m tracing where the TXT verification value is composed in the CLI output to confirm why the prefix is duplicated there. Happy to send a fix if I can reproduce it.

onthebed avatar Apr 24 '26 20:04 onthebed