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

# Storage: buckets and databases

> The Storage page lists your app's managed Postgres databases and file buckets, and lets you browse, preview and download objects in a Reliant-hosted bucket, read-only.

Storage is where your app's persistent state is listed in one place: its managed Postgres databases and its file buckets. A database row takes you to [Data](https://docs.reliantlabs.io/forge/data.md). A bucket row opens a read-only browser over the files your users uploaded, so you can check that an upload landed without asking an engineer for a cloud console.

## Where to find it

Choose **Storage** in the project sidebar. Like Data it follows the environment control in the top bar, and the bucket you have open stays open when you switch to an environment that declares the same bucket.

## Declare a bucket

A bucket exists because the environment declares it, the same way it declares a database. In the environment's KCL (`deploy/kcl/<env>/main.k`):

```python theme={null}
_buckets: [forge.Bucket] = [forge.Bucket {name = "uploads", runtime = forge.OnHosted {}}]
```

On `dev` the runtime is the local MinIO that `forge env up dev` starts. On Reliant hosting, `forge.OnHosted {}` makes the platform create one bucket for that environment, a credential that can reach only that bucket, and the CORS rules for your hosted frontend and custom domains. The bucket name can be at most 40 characters, and removing the declaration leaves the bucket and its objects in place unless you set `deletion_policy = "delete"`. Your service reads its connection from `forge.bucket_env`, and the browser uploads straight to storage with a URL your handler presigns using `forge/pkg/blobstore`, so the bytes never pass through your API. `reliant forge skill load storage/blobstore` has the whole flow with handler and browser code, and [Adding file uploads](https://docs.reliantlabs.io/forge/deploy-without-an-account.md#adding-file-uploads) is the short version. An account is required: a [deploy without an account](https://docs.reliantlabs.io/forge/deploy-without-an-account.md) has no object storage.

A project that declares no buckets sees a message saying so, distinct from a page that is still loading or one that failed to read.

## What you see in a bucket

A selector lists the environment's buckets, then the browser shows one level at a time: folders first, then objects, paged. Nothing is counted recursively, so there are no totals or folder sizes, and the order is the storage backend's lexical order. To narrow a long listing, type a prefix. Select an object to see its key, size, content type, last-modified time, ETag and user metadata.

**Preview** works for images (PNG, JPEG, GIF and WebP up to 10 MiB, never SVG) and for text and JSON up to 1 MiB. Anything else shows its metadata and a **Download** button. A download is a short-lived presigned URL minted when you click, and is always an attachment, so a stored HTML file can't render on the bucket's origin.

## Who can read what

Browsing needs the organization's `storage:read` grant, which owners and admins hold. It is deliberately separate from `db:query`: uploads are often more sensitive than rows, and a team may want support to read rows but not files. The policy is `data_access.storage` in the environment's KCL, with the same three values as Data (`open`, `audited`, `deny`). When you don't set it, it follows the environment's `db_query` policy, so an environment that denies SQL isn't opened to files by leaving it out.

```python theme={null}
data_access = forge.DataAccess {db_query = "audited", storage = "deny"}
```

In an audited environment you give a reason once per tab session. Each preview and download is recorded, and opening a bucket shows in the Activity feed.

## Limits

* **Read-only.** There is no upload, delete or rename in the console. Writes stay in your app's own RPCs.
* **Reliant-hosted buckets only.** A bucket on your own S3, R2 or GCS (`forge.BucketOnS3`) and the local MinIO can be declared and used by your app but can't be browsed here. The page says so.
* **Availability follows the platform.** The browser needs the control plane's storage reader to be set up for your environment. When it isn't, the page says it can't browse storage yet.
* **A rate limit** applies to storage reads per person. The page asks you to wait and try again.
* **Databases:** size, connections, CPU, memory and backup status aren't shown in the app yet. See [Managed Postgres](https://docs.reliantlabs.io/hosting/managed-postgres.md) for backups and restore.

## Related topics

* [Data](https://docs.reliantlabs.io/forge/data.md) and [Managed Postgres](https://docs.reliantlabs.io/hosting/managed-postgres.md)
* [Services](https://docs.reliantlabs.io/forge/services.md): the workloads that read these buckets
* [Secrets](https://docs.reliantlabs.io/hosting/secrets.md): the credentials for a bucket you operate yourself
* [Environments](https://docs.reliantlabs.io/forge/deploy/environments.md)


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