Summary
railway login --browserless exits with code 1 without printing a browserless login URL when run inside a TTY on a Linux VPS.
The non-TTY behavior appears correct: it prints Browserless login requires an interactive terminal. For non-interactive environments, set RAILWAY_API_TOKEN or RAILWAY_TOKEN.
Environment
- Railway CLI:
railway 4.66.1
- Binary path:
/home/ubuntu/.nvm/versions/node/v24.13.0/bin/railway
- Node:
v24.13.0
- OS:
Linux vps-fe31c5f8 6.17.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 19 16:42:13 UTC 2026 x86_64 GNU/Linux
- Shell:
zsh
- Host type: headless VPS
Reproduction
railway --version
railway login --browserless
Non-TTY output:
Browserless login requires an interactive terminal. For non-interactive environments, set RAILWAY_API_TOKEN or RAILWAY_TOKEN.
exit:1
TTY/PTY output using script:
script -q -e -c 'railway login --browserless' /tmp/railway-browserless.typescript
echo $?
sed -n '1,120p' /tmp/railway-browserless.typescript
Captured output:
exit:1
Script started on 2026-07-06 16:15:00+02:00 [COMMAND="railway login --browserless" <not executed on terminal>]
Script done on 2026-07-06 16:15:01+02:00 [COMMAND_EXIT_CODE="1"]
RAILWAY_DEBUG=1 produced the same silent exit. Running in an agent-provided TTY also returned exit code 1 with no output.
Expected behavior
Inside a TTY, railway login --browserless should print the browserless login URL/code flow, or print an actionable error explaining why it cannot start the browserless flow.
Actual behavior
Inside a TTY/PTY, the command exits 1 silently. This blocks Railway MCP/local CLI auth on headless hosts where normal browser login is not available.
Workaround
Use RAILWAY_API_TOKEN / RAILWAY_TOKEN for non-interactive commands, or authenticate from another environment.
Summary
railway login --browserlessexits with code1without printing a browserless login URL when run inside a TTY on a Linux VPS.The non-TTY behavior appears correct: it prints
Browserless login requires an interactive terminal. For non-interactive environments, set RAILWAY_API_TOKEN or RAILWAY_TOKEN.Environment
railway 4.66.1/home/ubuntu/.nvm/versions/node/v24.13.0/bin/railwayv24.13.0Linux vps-fe31c5f8 6.17.0-40-generic #40-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 19 16:42:13 UTC 2026 x86_64 GNU/LinuxzshReproduction
Non-TTY output:
TTY/PTY output using
script:Captured output:
RAILWAY_DEBUG=1produced the same silent exit. Running in an agent-provided TTY also returned exit code1with no output.Expected behavior
Inside a TTY,
railway login --browserlessshould print the browserless login URL/code flow, or print an actionable error explaining why it cannot start the browserless flow.Actual behavior
Inside a TTY/PTY, the command exits
1silently. This blocks Railway MCP/local CLI auth on headless hosts where normal browser login is not available.Workaround
Use
RAILWAY_API_TOKEN/RAILWAY_TOKENfor non-interactive commands, or authenticate from another environment.