# Using with Ocean Orchestrator

#### Prerequisites

Before you can use persistent storage in the Orchestrator:

1. Select a node from the **Ocean Nodes Dashboard**.
2. Generate an **auth token** for that node from the dashboard.
3. Pass the auth token to the Orchestrator (the extension will prompt you if it has not been set).

#### Open the Storage Panel

In the Ocean Orchestrator panel, click **Configure Persistent Storage**. A panel opens showing all buckets you have created on the currently selected node.

<figure><img src="/files/yLaqp747CtRjeSNoWX4I" alt=""><figcaption></figcaption></figure>

#### Create a Bucket

Click **+ Create bucket**. You can optionally provide an access list contract address to share the bucket with other wallets. Leave it blank to create a private, owner-only bucket.

> **Note:** You cannot attach an access list to a bucket after it has been created.

<figure><img src="/files/aPGXzC8jHY9qbhk7QJvP" alt=""><figcaption></figcaption></figure>

#### Upload and Delete Files

Click on a bucket to view its contents. From this view you can:

* **Upload** — opens a file picker; the selected file is streamed to the node and appears in the list once confirmed.
* **Delete** — removes a file from the bucket immediately.

<figure><img src="/files/Ea5s2aGuB12W4rTIwfwZ" alt=""><figcaption></figcaption></figure>

#### Mount Files for Compute

Each file in a bucket has a **Mount** checkbox. Check it to register the file as an input for your next compute job.

* You can mount files from multiple buckets at the same time.
* The mount selection persists across sessions until you uncheck it.

When you click **Run compute job**, the Orchestrator resolves all mounted files to `nodePersistentStorage` file objects and passes them to the node alongside your algorithm container.

#### Accessing Files in Your Algorithm

Mounted files are bind-mounted into the container at runtime and available at:

```
/data/persistentStorage/<bucketId>/<fileName>
```

Example: reading a JSON config file mounted from a bucket:

```python
import json, os

bucket_id = "<your-bucket-id>"
file_name = "config.json"
path = f"/data/persistentStorage/{bucket_id}/{file_name}"

with open(path) as f:
    config = json.load(f)

a = config["a"]
b = config["b"]
c = config["c"]
print(a + b + c)
```

#### End-to-End Workflow

1. Create a bucket in the Orchestrator panel (or the Dashboard).
2. Upload your data file to the bucket.
3. Copy the bucket ID from the panel.
4. In your algorithm, read the file from `/data/persistentStorage/<bucketId>/<fileName>`.
5. Check **Mount** next to the file in the Orchestrator panel.
6. Click **Run compute job**.
7. Once the job finishes, download results from the `results/` folder.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.oncompute.ai/persistent-storage/using-with-ocean-orchestrator.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
