# Administer an instance

Source: https://dropshelf.ai/docs/self-host/operate/administration

Make someone an admin, use the admin panel, disable and offboard members, and expire or remove drops on a dropshelf instance.

This page covers the everyday tasks of a dropshelf admin: managing members and stepping in on drops
they own. Each task works from the dashboard, and most also work from the operator toolbox inside the
cluster or from the [REST API](/docs/reference/rest).

## Prerequisites [#prerequisites]

- You are an admin on the instance, or you can change its configuration.
- For the toolbox commands: `kubectl` access to the `dropshelf` namespace.
- For the API calls: a personal access token that belongs to an admin, in `DROPSHELF_TOKEN`.

The operator toolbox is the server binary itself, run inside a running pod. It acts with operator
authority and needs no token:

```bash
kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server users list
```

`/dropshelf-server` with no command lists the toolbox commands. Each one exits 0 when it succeeds, 1 on a
failure, 2 on a usage error and 4 on a conflict with the state of the instance.

## Make someone an admin [#make-someone-an-admin]

The configuration decides who is an admin, and nothing in the dashboard changes it. A person is an
admin when their address is in `auth.admins.emails`, or when their ID token carries a claim named in
`auth.admins.claim`.

To add an admin with Helm:

1. Add their address to `values.yaml`:

   ```yaml
   config:
     auth:
       admins:
         emails: [admin@example.com, priya.nair@example.com]
   ```

2. Apply the change. The chart rolls the pods when the configuration changes.

   ```bash
   helm upgrade dropshelf oci://ghcr.io/dropshelf/charts/dropshelf --version <version> -n dropshelf -f values.yaml
   ```

The new admin gets their rights at their next sign-in, because the server decides the role at every
sign-in. Removing an address works the same way: the person stays an admin until they sign in again.
[Identity provider](/docs/self-host/configure/identity-provider) covers the claim.

## Find the admin panel [#find-the-admin-panel]

To open the admin panel, open the account menu at the foot of the sidebar and choose **Admin**. The
menu shows **Admin** to admins only.

The panel has these screens:

- **Users**: every member who has signed in at least once, with their role, drops, storage, last
  sign-in and state. Select a member to disable, enable or transfer their drops.
- **Drops**: every live drop, with filters for expiry, size and owner and a search by address. Select
  a drop to transfer it, change how long it stays online, or delete it.
- **Settings**: the version, when the reaper last ran on the replica that answered, and the
  configuration that replica runs with, secrets redacted.
- **Connectors**: the company databases drops can read, shown when connectors are on. See
  [Turn on features](/docs/self-host/configure/features).

Every change made on these screens writes an event line that names you. [Monitor](/docs/self-host/operate/monitor)
covers the event log.

## See every drop [#see-every-drop]

An admin's **Home** in the dashboard lists every drop on the instance, restricted and private ones
included. **Admin > Drops** lists the same drops as a table you can filter.

From a terminal, the toolbox lists every drop with its owner, visibility, retention and live version:

```bash
kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server list
```

Add `--owner <email>`, `--expiring 7d` or `--larger 100MB` to narrow the list.

## Disable a member [#disable-a-member]

Disable a member when their account is compromised or they have left. Disabling is dropshelf's own
switch and does not touch the identity provider, so deactivate the account there too.

To disable a member in the dashboard:

1. Go to **Admin > Users** and select the member. Their details open in a window.
2. Select **Disable…**, then **Disable `<email>`**. The window shows the member as disabled.

From a terminal, run the toolbox with the member's address:

```bash
kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server users disable <email>
```

The output is similar to:

```text
ingrid.halvorsen@example.com disabled. The dashboard and every drop host see it within 30 seconds on every replica.
```

Through the API, send the member's id, which `GET /api/v1/admin/users` lists:

```bash
curl -sS -X PATCH "https://drop.example.com/api/v1/admin/users/<user-id>" \
  -H "Authorization: Bearer $DROPSHELF_TOKEN" -H "Content-Type: application/json" \
  -d '{"disabled": true}'
```

Nobody can disable the last enabled admin: the API answers `409` and the toolbox exits 4. An admin
cannot disable their own account either, and the API answers `400`.

A disable stops access on this schedule:

| Access | When it stops |
| --- | --- |
| The dashboard, the API with a session, and every drop | Within 30 seconds on every replica |
| Personal access tokens, and the sign-ins of the CLI and agents | At once |
| Signing in again | At once |
| Their drops | Never: the drops stay online with their retention |

### Enable a member again [#enable-a-member-again]

To enable a member, select **Enable** in their window under **Admin > Users**. From a terminal, run
`users enable`:

```bash
kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server users enable <email>
```

Through the API, send the same `PATCH` with `{"disabled": false}`. The member signs in again,
because the disable signed them out of every session.

### Confirm it worked [#confirm-it-worked]

`users list` marks the member `disabled`, and **Admin > Users** shows their state as **Disabled**.
The event log has a `user.disable` line.

## Offboard a member [#offboard-a-member]

Offboard a member when they leave and their drops must keep working under someone else. Offboarding
is three steps: disable them, give their drops to a colleague, and revoke their tokens.

To offboard a member from a terminal:

1. Disable them:

   ```bash
   kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server users disable <leaver-email>
   ```

2. Transfer every drop they own to the colleague who looks after them now:

   ```bash
   kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server users transfer <leaver-email> <keeper-email>
   ```

   The output names the drops that moved:

   ```text
   3 drops moved to tomas.reyes@example.com: q3-roadmap lunch-votes team-wiki
   ```

   Each drop keeps its address, versions, retention and visibility. The new owner must have signed in
   at least once, and their own limits on drops and storage are not checked. If a transfer stops
   partway, run the same command again to move the rest.

   A query that ran with the leaver's connection to an MCP server now waits for the new owner. They
   are told in the bell, and [confirm it from the drop's Data section](/docs/use/mcp-data#when-a-query-stops).

3. List their tokens, then revoke each one by the id in the first column:

   ```bash
   kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server tokens list --user <leaver-email>
   ```

   ```bash
   kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server tokens revoke <token-id>
   ```

   Disabling already stops every token. Revoking them means a later re-enable does not bring back a
   token stored in a CI variable. The `odp_` and eight characters in each line are how the token
   begins, which helps you find where it was used.

The dashboard does the first two steps from the member's window in **Admin > Users**: **Disable…**,
then **Transfer all drops…** with the new owner's address. To revoke a token without cluster access,
an admin calls `DELETE /api/v1/admin/tokens/<token-id>`.

To delete a leaver's drops instead of keeping them, filter **Admin > Drops** by their address, select
the drops and choose **Delete…**.

### Confirm it worked [#confirm-it-worked-1]

Run `users list` and check that the leaver shows `disabled` with 0 drops:

```bash
kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server users list
```

```text
ingrid.halvorsen@example.com               0 drops            0 bytes  last login 2026-11-03T08:41:12Z disabled
tomas.reyes@example.com                    7 drops     48213337 bytes  last login 2026-11-15T14:02:55Z
```

`tokens list --user <leaver-email>` prints nothing.

## Force-expire a drop [#force-expire-a-drop]

Force-expire a drop when it must stop being served sooner than its retention allows. You can shorten
its retention so it expires tomorrow, or delete it now.

To expire it in one day, set its retention to `1d`, which counts from the moment you save. In the
dashboard, go to **Admin > Drops**, select the drop, choose **Custom** under **Stays online**,
enter `1` in **Days** and select **Save**. From a terminal:

```bash
kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server retention <slug> 1d
```

Through the API:

```bash
curl -sS -X PATCH "https://drop.example.com/api/v1/drops/<slug>" \
  -H "Authorization: Bearer $DROPSHELF_TOKEN" -H "Content-Type: application/json" \
  -d '{"retention": "1d"}'
```

<Callout type="warn">
Deleting a drop cannot be undone. Its name is free for anyone from that moment, and its files are
removed on the reaper's next pass.
</Callout>

To delete it now in the dashboard, select the drop in **Admin > Drops**, then **Delete drop…** and
**Delete `<slug>`**. From a terminal, `rm` needs `--yes`:

```bash
kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server rm <slug> --yes
```

Through the API, the call answers `204`:

```bash
curl -sS -X DELETE "https://drop.example.com/api/v1/drops/<slug>" -H "Authorization: Bearer $DROPSHELF_TOKEN"
```

A delete is refused while a deploy of that drop is still running: the API answers `409` and the
toolbox exits 4. Wait for the deploy to finish and try again.

### Confirm it worked [#confirm-it-worked-2]

A deleted drop's address answers `404` within 5 seconds on every replica. A shortened retention shows
the new expiry date in **Admin > Drops**. The event log has an `admin.force_delete` or a
`drop.retention` line.

## Remove the demo drops [#remove-the-demo-drops]

An install with `demo.install: true` comes with demo drops: `demo-welcome`, and `demo-all-hands`,
`demo-photo-wall`, `demo-signups` and `demo-issues` when their features are on. A disabled system user,
`demo@dropshelf.invalid`, owns them, and they are public drops kept Forever.

To remove one, delete it from its page in the dashboard, or run `rm` with its name:

```bash
kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server rm demo-welcome --yes
```

An upgrade does not bring a removed demo back. To reinstall the demos that are missing, run:

```bash
kubectl exec -n dropshelf deploy/dropshelf -- /dropshelf-server demo install --again
```

Leave the system user in place. It cannot sign in, owns nothing else, and tells the installer that
the demos were installed once.

### Confirm it worked [#confirm-it-worked-3]

`list` no longer prints the demo, and its address answers `404`.

## Next steps [#next-steps]

- [Identity provider](/docs/self-host/configure/identity-provider)
- [Monitor](/docs/self-host/operate/monitor)
- [Rotate secrets](/docs/self-host/operate/rotate-secrets)
- [CLI commands](/docs/reference/cli)
- [REST API](/docs/reference/rest)
