a month ago
Hi, I've been unable to log in to the Railway CLI and wanted to report what I found after some debugging, in case others are hitting the same thing.
Environment
- OS: Ubuntu
- Railway CLI 4.37.3 (tried both npm and the curl installer)
- Node.js v20.20.1 via nvm
What happens
When running railway login, the interactive prompt Open the browser? (Y/n) appears but immediately accepts the default without waiting for input, then exits as if the process can't capture keystrokes, even though the TTY is valid.
Running railway login --browserless with the curl-installed binary does show the activation code and URL. I visit the URL, enter the code, approve the login in the browser and then the CLI returns Unauthorized. Please run railway login again.
Checking ~/.railway/config.json after the flow completes shows that the tokens ARE being saved, but token is null:
{
"user": {
"token": null,
"accessToken": "...",
"refreshToken": "...",
"tokenExpiresAt": ...
}
}
Running railway whoami returns Unauthorized despite the config being present.
Additional finding
The npm-installed version of the CLI is actually segfaulting silently (confirmed via strace: si_status=SIGSEGV), which explains why --browserless produces no output at all with that version. The curl-installed version at least completes the auth flow, but still ends up unauthorized.
Steps to reproduce
1. Install Railway CLI via bash <(curl -fsSL cli.railway.app/install.sh)
2. Run railway login --browserless
3. Visit the URL, enter the code, approve in browser
4. CLI returns Unauthorized
5. Check ~/.railway/config.json — token field is null
Expected behavior
Successful login with a valid token stored and railway whoami returning the authenticated user.
Happy to provide any additional details about my setup. Thanks!
1 Replies
Status changed to Awaiting Railway Response Railway • about 1 month ago
a month ago
This should be fixed in v4.37.4. You can upgrade with:
```
curl -fsSL https://raw.githubusercontent.com/railwayapp/cli/master/install.sh | sh
```
If you installed via Homebrew, uninstall that version first so the new binary takes precedence:
```
brew uninstall railway
```
Let us know if this does not solve your problem.
Status changed to Awaiting User Response Railway • about 1 month ago
a month ago
This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!
Status changed to Solved Railway • 30 days ago