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

# Storage

> Get model weights and LoRA adapters into Rivvr from Hugging Face, S3, or your own machine.

Before Rivvr can run a model, the model's files have to be inside Rivvr. Rivvr keeps them in a storage entry. Every model runs from one.

A storage entry holds one of two things, and you say which with `--type`:

* `--type model`: a full model (its weights).
* `--type lora`: a LoRA adapter, a small add-on for a full model.

Each storage entry belongs to one project. There are three ways to fill one: copy from Hugging Face, copy from S3, or upload from your own computer.

To run a model straight from Hugging Face or S3, you don't need this page. [`rivvr deploy`](https://docs.rivvr.ai/guides/create-models#copy-and-create-in-one-command) copies the files and starts the model in one go. Use the commands below to upload files from your computer, to reuse the same files for several models, or to see and clean up what's stored.

## Copy from Hugging Face or S3

This is called an import:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr storage import hf://HuggingFaceTB/SmolLM2-135M-Instruct --type model --name smollm --wait
rivvr storage import s3://customer-models/smollm/ --type model --name smollm --wait
```

`--name` is a label you choose. `--wait` makes the command wait until the copy is finished.

For Hugging Face, someone with the ADMIN role must first [add a Hugging Face token to the project](https://docs.rivvr.ai/administration/projects.md#configure-hugging-face-access). You can't choose a specific version (revision) of the Hugging Face repository.

For S3, Rivvr must have permission to read the bucket. The copy runs inside Rivvr with Rivvr's own AWS access, so you don't need AWS credentials on your computer.

When it's done, the command prints the new storage entry's ID. In `--json` output it's called `storageEntryId`. You'll need this ID to create a model.

The copy keeps going even if you stop waiting (Ctrl-C). To check on it later:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr storage import list                      # all imports in the project
rivvr storage import get IMPORT_JOB_ID --wait   # one import; wait until it's done
```

## Upload from your computer

Give `upload` the folder that holds the files:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr storage upload ./weights --type model --name custom-model
rivvr storage upload ./adapter --type lora --name support-adapter
```

Before sending anything, `rivvr` checks the folder:

* For `--type model`, it must contain a `config.json` file that isn't empty, plus the weight files.
* For `--type lora`, it must contain an `adapter_config.json` file that isn't empty, plus either `adapter_model.safetensors` or `adapter_model.bin`.
* Shortcuts (symlinks) and special files aren't allowed.

Large uploads are sent in pieces. Don't change the files until the upload finishes. If it stops halfway, `rivvr` can [continue it](https://docs.rivvr.ai/troubleshooting/recovery.md#upload-interrupted) using the upload ID it printed, but only if the files are exactly the same as before.

## See what's stored

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr storage list --type model         # full models
rivvr storage list --type lora --wide   # adapters, with full IDs
rivvr storage get STORAGE_ENTRY_ID      # one entry in detail
```

Two entries can have the same name. When that happens, use the ID instead. `--wide` shows full IDs.

## Check the files

Rivvr checks that stored files are complete and unchanged. You can only create a model from an entry whose status is `VERIFIED`. To run the check again:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr storage verify STORAGE_ENTRY_ID
```

Look at the status it prints. The command finishes with exit code `0` whenever the check ran, even if the result is bad. Bad results are `MODIFIED` (files changed), `MISSING` (files gone), and `CHECK_FAILED` (the check couldn't finish). If the status changes, it also affects models that already use this entry.

## Delete

Deleting a model keeps its storage entry. When you no longer need the files:

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
rivvr storage delete STORAGE_ENTRY_ID
```

This deletes the files for good. Rivvr won't delete an entry while a model is still using it. Delete the model first, wait until it's gone, then delete the entry.


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