Storage Providers

Connect pushduck to your preferred cloud storage provider with simple, unified configuration

Supported Storage Providers

Pushduck supports multiple cloud storage providers through a unified S3-compatible API. Choose the provider that best fits your needs, budget, and infrastructure requirements.

Universal S3 API: All providers use the same configuration pattern, making it easy to switch between them or use multiple providers in the same project.

Supported Providers

Quick Setup

All providers follow the same configuration pattern:

import { createS3Router, s3 } from 'pushduck/server';

const uploadRouter = createS3Router({
  // Configure your storage provider
  storage: {
    provider: 'aws-s3', // or 'cloudflare-r2', 'digitalocean-spaces', etc.
    region: 'us-east-1',
    bucket: 'your-bucket-name',
    credentials: {
      accessKeyId: process.env.ACCESS_KEY_ID!,
      secretAccessKey: process.env.SECRET_ACCESS_KEY!,
    },
  },
  
  // Define your upload routes
  routes: {
    imageUpload: s3.image().maxFileSize("5MB"),
    documentUpload: s3.file().maxFileSize("10MB"),
  },
});

Provider Comparison

ProviderPricing ModelEgress FeesCDN IncludedBest For
AWS S3Pay-per-useYesSeparate serviceEnterprise, global scale
Cloudflare R2Pay-per-useNoYesHigh-traffic, cost-sensitive
DigitalOcean SpacesFlat-rateIncluded quotaYesPredictable costs
Google CloudPay-per-useYesSeparate serviceAI/ML integration
MinIOSelf-hostedNoneSelf-managedData sovereignty

Need Help Choosing?

Quick Recommendation:

  • Starting out? → DigitalOcean Spaces (simple, predictable)
  • High traffic? → Cloudflare R2 (no egress fees)
  • Enterprise? → AWS S3 (full ecosystem)
  • Self-hosted? → MinIO (complete control)

Next Steps

  1. Choose your provider from the cards above
  2. Follow the provider-specific setup guide
  3. Configure your upload routes
  4. Start uploading files!

Each provider guide includes:

  • Step-by-step setup instructions
  • Environment variable configuration
  • Production deployment tips
  • Troubleshooting common issues