Skip to content

S3 Media Storage

brūhi Cloud can store and stream audio files directly from S3-compatible object storage providers. This allows you to host multi-terabyte media libraries without filling your server’s local hard drive.

ProviderS3-CompatibleNotes
AWS S3Standard NativeOfficial Amazon S3 storage (s3.amazonaws.com)
Cloudflare R2YesZero egress fees; recommended for high-volume radio stations
MinIOSelf-HostedRun your own private object storage server
Backblaze B2YesLow-cost cloud object storage

You can connect your S3-compatible storage bucket either dynamically via the Admin Dashboard UI or via Environment Variables in .env.

Section titled “Option 1 — In the Admin Dashboard (Recommended)”
  1. Navigate to Admin Settings → Storage & Cloud in the web dashboard.
  2. Select your provider (AWS S3, Cloudflare R2, MinIO, or Custom S3-Compatible).
  3. Enter your Endpoint URL, Bucket Name, Region, Access Key ID, and Secret Access Key.
  4. Click Save Storage Settings. Changes take effect immediately without needing to restart the container.

Option 2 — Via Server Environment Variables (.env)

Section titled “Option 2 — Via Server Environment Variables (.env)”

Alternatively, configure your credentials in ~/bruhi-cloud/.env:

S3_ENDPOINT_URL=https://your-account-id.r2.cloudflarestorage.com
S3_ACCESS_KEY=your-access-key-id
S3_SECRET_KEY=your-secret-access-key
S3_BUCKET=bruhi-media-library
S3_REGION=auto
  • Cloudflare R2: Set S3_REGION=auto and use your Cloudflare account R2 endpoint URL (https://<account-id>.r2.cloudflarestorage.com).
  • MinIO: Use your self-hosted MinIO URL (e.g., http://minio:9000 or https://minio.yourdomain.com) and set S3_REGION=us-east-1.
  • AWS S3: Leave S3_ENDPOINT_URL blank or specify your AWS regional endpoint (e.g., https://s3.us-east-1.amazonaws.com).
  • Backblaze B2: Use the S3 endpoint provided in your B2 bucket settings (e.g. https://s3.us-west-004.backblazeb2.com).

Once configured, the S3 Media Browser tab automatically appears in the Content Library workspace:

  • Folder Navigation: Browse audio tracks organized by bucket folder prefixes.
  • Metadata Inspection: View track duration, bitrate, sample rate, and tags.
  • Instant Preview: Listen to tracks directly in your browser.
  • Queue & Cart Assignment: Add S3 tracks directly to player queues, playlists, or Cart Wall soundboard pads.
  • Track Deletion: Remove tracks from your cloud bucket with automatic database cleanup.
  • Presigned Streaming: brūhi Cloud generates temporary presigned URLs when loading tracks for browser playback. Audio streams directly from S3 to your browser, preventing server bandwidth bottlenecks.
  • Private Buckets: Your S3 bucket does not need to be public. Credentials remain securely stored on your brūhi server.

If you encounter audio playback issues, ensure your S3 bucket’s CORS policy permits requests from your brūhi domain:

[
{
"AllowedOrigins": ["https://radio.yourdomain.com"],
"AllowedMethods": ["GET", "HEAD"],
"AllowedHeaders": ["*"]
}
]

brūhi Cloud seamlessly supports hybrid setups:

  • Local files uploaded directly to the server volume and cloud S3 files can be mixed in the same playlist or schedule block with zero transition delay.