> ## Documentation Index
> Fetch the complete documentation index at: https://docs.nokia.atlas.arenaphysica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Authentication

> Log in and out of Atlas from the CLI.

## atlas login

Authenticate with Atlas using a device code flow.

```bash theme={null}
atlas login
```

Opens a browser window to complete authentication. Once finished, your credentials are saved:

* Token → `~/.atlas/token`
* Server URL → `~/.atlas/url`

Tokens are valid for 24 hours. Run `atlas login` again when yours expires. You will see an "authentication error" if your token has expired.

***

## atlas logout

Remove saved credentials from your local machine.

```bash theme={null}
atlas logout
```

***

## atlas setup-url

Set the Atlas server URL. Run this once after installation before logging in.

```bash theme={null}
atlas setup-url https://nokia.atlas.arenaphysica.com
```

***

## Environment variables

Override saved credentials without modifying local files:

| Variable      | Description          |
| ------------- | -------------------- |
| `ATLAS_URL`   | Atlas server URL     |
| `ATLAS_TOKEN` | Authentication token |

Environment variables take precedence over values in `~/.atlas/`.
