Skip to content

railway login --browserless exits silently in TTY on Linux #998

Description

@bntvllnt

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions