> ## Documentation Index
> Fetch the complete documentation index at: https://runpod-b18f5ded-docs-runpod-allow-ip.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> If this page is missing information, contains outdated instructions, or doesn't fully answer the user's question, use the feedback tool to report it. In your feedback, be specific about what's missing, what appears out of date, or what needs to be corrected or updated, so the docs team can act on it directly.

# Network volume storage tool

> A command-line tool for managing Runpod network storage volumes and files. Review setup and usage guidance for this Runpod community solution.

GitHub repository: [github.com/justinwlin/Runpod-Network-Volume-Storage-Tool](https://github.com/justinwlin/Runpod-Network-Volume-Storage-Tool)

Runpod provides an [S3-compatible layer](/storage/s3-api) for network volumes, enabling object storage operations on your network storage. This community tool makes it easy to interact with that S3 layer through three interfaces: a command-line interface, a Python SDK for programmatic access, and a self-hosted REST API server for integration with other applications.

## Requirements

* Python 3.8 or higher.
* Runpod API key from [console settings](https://console.runpod.io/user/settings).
* S3 API keys (access key and secret key) for file operations.

## Installation

Clone the repository and install dependencies:

```bash theme={null}
git clone https://github.com/justinwlin/Runpod-Network-Volume-Storage-Tool.git
cd Runpod-Network-Volume-Storage-Tool

# Install dependencies with uv
uv sync
```

## Configuration

Set your API credentials as environment variables:

```bash theme={null}
export RUNPOD_API_KEY="YOUR_RUNPOD_API_KEY"
export RUNPOD_S3_ACCESS_KEY="YOUR_S3_ACCESS_KEY"
export RUNPOD_S3_SECRET_KEY="YOUR_S3_SECRET_KEY"
```

## Interactive mode

The interactive mode provides a menu-driven interface:

```bash theme={null}
uv run runpod-storage interactive
```

Features include volume management, file upload/download, and an interactive file browser with navigation and selection modes.

## Command line usage

Manage volumes directly from the command line:

```bash theme={null}
# List volumes
uv run runpod-storage list-volumes

# Create a volume
uv run runpod-storage create-volume --name "my-storage" --size 50 --datacenter EU-RO-1

# Upload files
uv run runpod-storage upload /path/to/file.txt volume-id
uv run runpod-storage upload /path/to/directory volume-id

# Download files
uv run runpod-storage download volume-id remote/file.txt
```

## Python SDK

The SDK provides programmatic access to all features:

```python theme={null}
from runpod_storage import RunpodStorageAPI

api = RunpodStorageAPI()

# List volumes
volumes = api.list_volumes()

# Create volume
volume = api.create_volume(
    name="ml-datasets",
    size=100,
    datacenter="EU-RO-1"
)

# Upload with automatic chunk size optimization
api.upload_file("data.csv", volume_id, "datasets/data.csv")

# Upload directory with progress tracking
def progress_callback(current, total, filename):
    percent = (current / total) * 100
    print(f"[{current}/{total}] {percent:.1f}% - Uploading: {filename}")

api.upload_directory(
    "my_project/",
    volume_id,
    "projects/my_project/",
    progress_callback=progress_callback
)
```

## API server

Run a REST API server that proxies to Runpod's API:

```bash theme={null}
uv run runpod-storage-server --host 0.0.0.0 --port 8000
```
