Creating Object Stores
Connect an S3-compatible bucket as a project object store.
Creating an object store registers a bucket connection with your project: the endpoint, bucket name, options, and — crucially — the names of the project secrets that hold its credentials. The store is ready to mount immediately after creation. Object stores are managed through daytona.object_store (Python) / daytona.objectStore (TypeScript) in the SDKs, the /object-stores REST routes, and the Object Stores page in the dashboard.
Prerequisite: credential secrets
Before creating a store, save the bucket's access key and secret key as project secrets. The object store references them by name (access_key_secret, secret_key_secret, and optionally session_token_secret for STS session tokens); the values are encrypted at rest and are never returned by any API or exposed inside a sandbox. Creation fails with 400 Bad Request if any referenced secret does not exist in the project — a misconfigured store fails at write time, not at mount time.
Note: secrets referenced by an object store are treated as platform-managed and hidden from the default secrets list; the dashboard has an opt-in toggle to show them.
Parameters
POST /object-stores accepts the following fields. Only name, bucket, and the two credential secret names are required — everything else has a sensible default.
| Field | Required | Default | Notes |
|---|---|---|---|
name | yes | — | 1–128 chars of [A-Za-z0-9._-]; unique per project (409 on duplicate) |
bucket | yes | — | Bucket name |
access_key_secret | yes | — | Name of the project secret holding the access key id |
secret_key_secret | yes | — | Name of the project secret holding the secret access key |
session_token_secret | no | — | Secret name holding an STS session token |
endpoint | no | AWS | Custom S3 endpoint; must be an http(s):// URL |
region | no | — | Bucket region |
prefix | no | — | Mount only this key prefix instead of the whole bucket |
path_style | no | false | Path-style addressing (needed by MinIO and similar) |
read_only | no | false | Store-level default; overridable per mount |
provider | no | — | AWS, Minio, Ceph, Cloudflare, or Other — provider quirk hints |
dir_cache_secs | no | 0 | Directory-listing cache TTL, 0–86400 seconds (0 = built-in default) |
Note:
dir_cache_secsis currently settable via REST and the dashboard only — the SDKcreatehelpers do not expose it yet. Lower values make other sandboxes' changes appear sooner; higher values reduce bucket requests for large, static datasets.
Creating a store
The response includes the store's id, configuration, and state (ready immediately on success). Credential fields in responses always contain the referenced secret names, never values.
Provider recipes
AWS S3. Leave endpoint unset (AWS is the default) and set region to the bucket's region plus provider: "AWS" — as in the example above.
Cloudflare R2. Point endpoint at your account's R2 endpoint and set the provider hint:
MinIO (and most self-hosted S3 services). Set the endpoint to your server and enable path-style addressing:
Managing stores
Stores can be listed, inspected, and deleted by id or name. Deletion is refused with 409 Conflict while any live sandbox has the store mounted — unmount or stop those sandboxes first. After deletion the name is retired and immediately reusable for a new store; deleted stores remain visible with ?include_deleted=true.
Note: deleting a store does not delete its credential secrets. If a secret referenced by a live store is deleted, mounts of that store will fail — keep the secrets in place for as long as the store exists.
Next
- Mounting object stores — attach the store to sandboxes at create time or at runtime.