# Process video stored in Supabase

Connect a Supabase Storage bucket by signing in with Supabase or with S3 keys. Any job then reads its inputs there and writes its outputs back to the same project.

Storage connection · Supabase sign-in or S3 keys · Job input and destination · Public bucket links set for you

Page: https://rendobar.com/integrations/supabase-storage/ · Connect Supabase: https://app.rendobar.com/storage?connect=1&provider=supabase · Read the docs: https://rendobar.com/docs/storage/supabase

- Type: Storage connection
- Built by: Rendobar
- Auth: Sign in with Supabase, or S3 keys from Storage > S3
- Used as: Job input and output destination
- Pricing: Free
- Category: Storage

## Overview

The files your app uploads become job inputs, read as `storage://` paths, and results land back in the same project. Sign in with Supabase from the dashboard or paste S3 keys, and the [Supabase docs](https://rendobar.com/docs/storage/supabase) show what each one stores. An [Edge Function](https://rendobar.com/ffmpeg/supabase/) can send the job and get the MP4 back in the bucket.

## Reference

### Supabase setup

- Sign in with Supabase: authorize the organization, then pick the project and bucket within 10 minutes. A new bucket name is created as private
- Sign-in stores the project's anon and service_role keys, encrypted. The sign-in itself is discarded
- Sign-in needs the legacy anon and service_role keys active (Project Settings > API Keys)
- Or: S3 keys from Storage > S3, with the endpoint and region from the same page
- Endpoint: https://<project-ref>.storage.supabase.co/storage/v1/s3
- Reach: both credentials reach every bucket in the project and bypass Row Level Security. service_role also reaches the database
- Public bucket picked after sign-in: public URL https://<project-ref>.supabase.co/storage/v1/object/public/<bucket>
- Name conflicts: always Replace
- Revoke: delete the S3 key, or deactivate the legacy API keys. Removing the Supabase authorization does not stop the connection

### Addressing

- Inputs: storage://<connection-id>/<path>, anywhere a job accepts a file URL
- Outputs: destinations: ["storage://<connection-id>[/<folder or path template>]"]
- Connection ids match [a-z0-9-]{2,40}
- In a path, write % ? # as %25 %3F %23

### Output path

- Default template (By date): rendobar/{date}/{source_name}.{ext}. Also Flat: rendobar/{source_name}.{ext}, or a custom template
- Tokens: {job_id} {ext} {source_name} {date}
- storage://<id> uses the template, storage://<id>/<folder> uses the folder plus the template's file name, a path with a token or a file name is used as written
- Name conflicts: Keep both (default, adds the job id's last 6 characters) or Replace

### Connecting

- Dashboard: Storage > Connect Storage, or client.storage.create(params)
- Rendobar writes, reads, lists and deletes a test object before saving the connection
- Stored keys are encrypted with AES-256-GCM and no endpoint returns them
- Rotate: Replace Keys, or client.storage.update(id, { credentials }). The connection id stays the same

### Delivery results

- deliveries[] on GET /jobs/{id}: storageId, status (pending, delivered, failed), path, url, reason, renamed
- Webhooks: job.delivery_succeeded, job.delivery_failed, job.deliveries_settled
- Retry: POST /jobs/{id}/deliveries/retry or client.jobs.retryDeliveries(id)

## Questions

### Does the Supabase connection follow Row Level Security?

No. Both sign-in and S3 keys reach every bucket in the project and bypass Row Level Security. Sign-in stores the project's `service_role` key, which also reaches the database, so S3 keys are the narrower choice.

### Why does Supabase sign-in need the legacy API keys?

Supabase Storage's S3 endpoint accepts only the legacy anon and `service_role` keys. If they're turned off, turn them on under Project Settings > API Keys, or connect with S3 keys from Storage > S3.

### Does removing Rendobar's Supabase authorization stop the connection?

No. The connection uses the project's keys, not the sign-in. Deactivate the legacy API keys under Project Settings > API Keys to stop it, which also stops every other client on those keys. For an S3 key, delete it under Storage > S3.

### Why did a Supabase output replace a file with the same name?

Supabase Storage doesn't refuse an overwrite, so Name conflicts is fixed to Replace on a Supabase connection. Put `{job_id}` in the output path to keep every output.

## Resources

- [Docs](https://rendobar.com/docs/storage/supabase): Sign-in and S3 keys, what Rendobar stores, and revoking access.
- [FFmpeg on Supabase](https://rendobar.com/ffmpeg/supabase/): An Edge Function that sends the job and gets the MP4 back in the bucket.
- [S3 authentication](https://supabase.com/docs/guides/storage/s3/authentication): The S3 access keys you create under Storage > S3.
- [Supabase API keys](https://supabase.com/docs/guides/getting-started/api-keys): The anon and service_role keys that sign-in reads, and what they reach.

## More

- [Connected storage docs](https://rendobar.com/docs/storage)