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

# Storage buckets

> Connect Supabase Storage to your Rocket.new app - upload, manage, and secure files from chat.

export const LlmsDirective = () => <blockquote className="llms-directive">
    For the complete documentation index, see <a href="/llms.txt">llms.txt</a>.
    For a lightweight markdown version of this page, append .md to the URL.
  </blockquote>;

<LlmsDirective />

<Info>
  Create and manage Supabase Storage buckets directly from Rocket chat. This guide covers creating buckets, uploading and displaying files, controlling access, and troubleshooting common issues.
</Info>

<Frame caption="Video walkthrough of Supabase Storage Buckets in Rocket">
  <iframe className="w-full aspect-video rounded-xl" src="https://www.youtube.com/embed/K9sA_2YOfjs" title="Storage Buckets" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen />
</Frame>

## What are Supabase Buckets?

Buckets are part of Supabase Storage. Think of them as folders that hold files like images, documents, videos, and more inside your Supabase project.

* Files live at paths inside a named bucket.
* Buckets are private by default, but you can make them public.
* Rocket does not store your files. It connects your app to your bucket and wires the logic.

<Info>
  <b>Why use buckets?</b>
  They keep files organized, secure, and fast. Hosted by Supabase and seamlessly used by Rocket.
</Info>

## Create or detect a bucket in Rocket

Rocket automatically checks for a Supabase bucket when a feature needs file storage. If it does not exist, Rocket creates it.

You can also create and connect Supabase buckets by asking Rocket in chat. Describe what you need.

**Example:**

```plaintext wrap theme={null}
Create a public Supabase bucket called user-uploads for profile images under 10 MB.
```

Rocket will:

* Create the bucket in your connected Supabase project.
* Set the privacy level and access rules.
* Configure file type restrictions (e.g. only images or documents).
* Apply file size limits if specified.
* Set up upload logic and permissions.
* Connect the bucket to your app's backend.

<Note>
  You do not need to open the Supabase dashboard unless you want to rename or manage buckets manually.
</Note>

## Use buckets in your app

Once connected, you can:

* Let users upload files such as images, documents, or media.
* Display uploaded content directly in your UI.
* Control access based on your app's needs.

<Note>
  Need another bucket later? Tell Rocket in chat what you need it for. It will create and connect it.
</Note>

## Access control and best practices

* **By default**, Rocket sets privacy and manages signed URLs.
* **Want it public or private?** Say so in your prompt.
* **Name wisely:** Use lowercase, hyphenated names like `reports-2025` to avoid typos or errors.

<Info>
  If you do not specify, Rocket chooses the privacy setting based on the bucket's use. This keeps sensitive files private and public assets accessible.
</Info>

## Troubleshooting

### Files do not appear in the UI

<Info>
  <b>What you will see:</b>
  The upload completes, but the file does not show up in the app.
</Info>

To fix this:

<Steps>
  <Step title="Ask Rocket to display the files">
    In chat, ask Rocket:

    ```plaintext wrap theme={null}
    Show uploaded images from user-uploads in the profile screen.
    ```
  </Step>

  <Step title="Push the changes">
    If Rocket shows a script or function popup, click **Push to Supabase** to apply the changes.
  </Step>
</Steps>

<Card icon="folder" horizontal title="Buckets wired. Files flowing.">
  Your Rocket app now uses Supabase Storage with organized and secure file handling set up in minutes.
</Card>

***

## What's next?

<CardGroup cols={2}>
  <Card title="Edge Functions" icon="server" href="/build/connectors/supabase/edge-functions">
    Add backend logic deployed directly from chat.
  </Card>

  <Card title="Supabase overview" icon="database" href="/build/connectors/supabase/overview">
    See all Supabase features available in Rocket.
  </Card>
</CardGroup>
