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
AWS S3
The original cloud storage service with global availability and advanced features
Best for: Enterprise applications, complex workflows, global scale
✅ Global edge locations
✅ Advanced security features
✅ Comprehensive ecosystem
✅ Trusted by millions
Cloudflare R2
Zero egress fees with global edge network performance
Best for: High-traffic applications, cost optimization
✅ No egress fees
✅ Global edge network
✅ Fast performance
✅ Simple pricing
DigitalOcean Spaces
Simple, predictable pricing with built-in CDN
Best for: Small to medium applications, predictable costs
✅ Flat-rate pricing
✅ Built-in CDN
✅ Simple setup
✅ Developer-friendly
Google Cloud Storage
AI-powered insights with global infrastructure
Best for: AI/ML workloads, Google ecosystem integration
✅ AI integration
✅ Global network
✅ Strong consistency
✅ Advanced analytics
MinIO
Self-hosted S3-compatible storage for complete control
Best for: Self-hosted deployments, data sovereignty
✅ Self-hosted
✅ Full control
✅ High performance
✅ Open source
S3-Compatible (Generic)
Use any S3-compatible storage service
Best for: Custom deployments, other S3-compatible services
✅ Universal compatibility
✅ Custom endpoints
✅ Flexible configuration
✅ Vendor independence
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
Provider | Pricing Model | Egress Fees | CDN Included | Best For |
---|---|---|---|---|
AWS S3 | Pay-per-use | Yes | Separate service | Enterprise, global scale |
Cloudflare R2 | Pay-per-use | No | Yes | High-traffic, cost-sensitive |
DigitalOcean Spaces | Flat-rate | Included quota | Yes | Predictable costs |
Google Cloud | Pay-per-use | Yes | Separate service | AI/ML integration |
MinIO | Self-hosted | None | Self-managed | Data 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
- Choose your provider from the cards above
- Follow the provider-specific setup guide
- Configure your upload routes
- Start uploading files!
Each provider guide includes:
- Step-by-step setup instructions
- Environment variable configuration
- Production deployment tips
- Troubleshooting common issues