# 5050 login

> Log the CLI in to a 5050cloud console and store an API token.

Log the CLI in to a 5050cloud console and store an API token.

## Usage

```sh
5050 login [URL]
```

## Flags

| Flag | Meaning |
|---|---|
| `--token TOKEN` | Store this API token instead of opening the browser (for servers and CI) |
| `--browserless` | Print the login link and code instead of opening a browser |

## Details

- Without `--token`, the CLI starts a device login: it opens `URL` in your browser, you approve the code shown in the terminal, and the CLI stores the token it receives.
- Tokens live in `~/.config/5050/config.json` (mode 0600), one per console URL, so you can log in to several installs.
- In CI, skip login and set `FIFTY_URL` and `FIFTY_TOKEN` instead.

## Examples

```sh
5050 login https://console.example.com
5050 login https://console.example.com --token 5050_xxxxxxxx
```

## Railway equivalent

`railway login` works the same way through the [railway alias](https://5050cloud.com/docs/cli/railway-alias).

Every command also accepts the [global options](https://5050cloud.com/docs/cli/global-options).
