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

# tp admin

> Users, roles, quotas and maintenance mode. Requires the admin role.

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin users
tp admin set-quota alice --gpus 16 --jobs 6
```

The console equivalents are on [Users](https://docs.tuneplane.ai/en/console/users.md) and
[Settings](https://docs.tuneplane.ai/en/console/settings.md).

## Users and roles

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin users                                  # every account
tp admin user-add bob --role operator           # a local account; the password is prompted
tp admin user-add bob --role operator --email bob@example.com
tp admin set-role bob admin
tp admin disable bob --on                       # disable the account
tp admin disable bob --off                      # enable it again
```

Three roles: `admin`, `operator` and `auditor`. An auditor reaches the audit trail and nothing
beside it — scoped like an operator, refused like an operator, offered no premium surface, and
never exempt from quota. See [roles and quotas](https://docs.tuneplane.ai/en/ops/roles-and-quotas.md).

## Quotas

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin set-quota alice \
  --gpus 16 \
  --jobs 6 \
  --daily-gpu-hours 200 \
  --max-storage-gb 2000 \
  --profiles h200,h100 \
  --priority 10
```

Defaults if you never set one: 8 concurrent GPUs, 4 concurrent jobs, unlimited daily GPU-hours,
unlimited storage, every profile allowed, priority 0. `0` means unlimited for the two numeric
caps, and an empty `--profiles` means all of them.

> [!NOTE]
>
> Storage quota does not work like GPU quota. GPUs are **reserved**: submitting a job sets its
> cards aside up front. Storage can only be **measured afterwards** — a training process writes
> to disk without telling the platform, and a job cannot say how much it will write.
>
> So the rule is "already over means no new job is dequeued", and running jobs are unaffected.
> Usage comes from a periodic scan (`TUNEPLANE_STORAGE_SCAN_INTERVAL_S`, 600 seconds by default),
> so it lags slightly and somebody can briefly exceed the cap. If the scan wedges, the gate
> admits rather than refusing: showing a stale number beats stopping everyone from submitting.

## Maintenance

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin maintenance status     # current state, and whether a restart is safe
tp admin maintenance drain      # enter maintenance and drain. Idempotent; run again if not fully drained
# ... upgrade the cluster or the platform ...
tp admin maintenance resume     # leave maintenance; paused jobs resume on their own
```

Drain stops new jobs from being dequeued and pauses running ones, keeping their checkpoints.
Resume recovers everything with no per-job action. See [maintenance](https://docs.tuneplane.ai/en/ops/maintenance.md).

## `tp admin`

Manage users and quotas

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin <subcommand>
```

| Command | Description |
| - | - |
| `tp admin disable` | Disable or enable a user |
| `tp admin maintenance` | Drain, upgrade and resume the cluster |
| `tp admin set-quota` | Set a user's compute and storage quota |
| `tp admin set-role` | Change a user's role |
| `tp admin user-add` | Create a local account |
| `tp admin users` | List every user |

### `tp admin disable`

Disable or enable a user

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin disable <USERNAME> [options]
```

| Argument | Description |
| - | - |
| `USERNAME` | **required** |

| Option | Description |
| - | - |
| `--on` | --on disables, --off enables |

### `tp admin maintenance`

Drain, upgrade and resume the cluster

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin maintenance <subcommand>
```

| Command | Description |
| - | - |
| `tp admin maintenance drain` | Enter maintenance mode and drain |
| `tp admin maintenance resume` | Leave maintenance mode |
| `tp admin maintenance status` | Show maintenance state and safety |

#### `tp admin maintenance drain`

Enter maintenance mode and drain

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin maintenance drain [options]
```

| Option | Description |
| - | - |
| `--note` | Maintenance note, echoed back to anyone whose submission is blocked |

#### `tp admin maintenance resume`

Leave maintenance mode

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin maintenance resume
```

No options beyond `--help`.

#### `tp admin maintenance status`

Show maintenance state and safety

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin maintenance status
```

No options beyond `--help`.

### `tp admin set-quota`

Set a user's compute and storage quota

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin set-quota <USERNAME> [options]
```

| Argument | Description |
| - | - |
| `USERNAME` | **required** |

| Option | Description |
| - | - |
| `--gpus` `<int>` | Concurrent GPU cap (default `8`) |
| `--jobs` `<int>` | Concurrent job cap (default `4`) |
| `--daily-gpu-hours` `<int>` | GPU-hours per day (0 = unlimited) (default `0`) |
| `--max-storage-gb` `<int>` | Cap on the user's run directories in GiB (0 = unlimited). Enforced against a periodic scan: going over blocks new jobs, running ones continue (default `0`) |
| `--profiles` | Allowed profiles (comma separated, empty = all) |
| `--priority` `<int>` | Queue priority (default `0`) |

### `tp admin set-role`

Change a user's role

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin set-role <USERNAME> <ROLE>
```

| Argument | Description |
| - | - |
| `USERNAME` | **required** |
| `ROLE` | admin \| auditor \| operator (**required**) |

No options beyond `--help`.

### `tp admin user-add`

Create a local account

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin user-add <USERNAME> [options]
```

| Argument | Description |
| - | - |
| `USERNAME` | **required** |

| Option | Description |
| - | - |
| `--password`, `-p` | **required** |
| `--role` | admin \| auditor \| operator (default `operator`) |
| `--email` | — |

### `tp admin users`

List every user

```bash theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
tp admin users
```

No options beyond `--help`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.