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

# ultra login

> Authenticate with Ultra Hub

Authenticate with Ultra Hub to enable cloud features like gateway linking, telemetry sync, and team management.

## Usage

```bash theme={null}
ultra login [flags]
```

## Flags

| Flag    | Default                      | Description   |
| ------- | ---------------------------- | ------------- |
| `--hub` | `https://hub.ultra.security` | Ultra Hub URL |

## Examples

```bash theme={null}
# Login to Ultra Hub
ultra login

# Login to a self-hosted hub
ultra login --hub https://hub.mycompany.com
```

## How It Works

1. Ultra starts a local callback server on port 19284
2. Your default browser opens to the Hub authentication page
3. You sign in or create an account
4. Hub redirects back to the local server with credentials
5. Credentials are saved to your config file

If the browser can't be opened automatically, Ultra displays the URL for manual navigation. The login flow times out after 5 minutes.

## After Login

Your credentials are stored in `~/.config/ultra/config.yaml`. Next step:

```bash theme={null}
ultra link   # Link this gateway to a workspace
```

## Session Management

* If already logged in, Ultra tells you and exits
* If your session has expired, Ultra proceeds with re-authentication
* Credentials persist across Ultra restarts
* Use `ultra logout` to clear credentials
