ScrapAI can automatically upload crawl results to S3-compatible object storage for backup, archiving, and sharing across systems.
Works with any S3-compatible object storage:
- Hetzner Object Storage ⭐ (Recommended) - European provider, excellent pricing, free egress
- AWS S3 - Amazon's original object storage
- DigitalOcean Spaces - Simple, developer-friendly
- Wasabi - Hot cloud storage, cheaper than S3
- Backblaze B2 - Cost-effective alternative
- Cloudflare R2 - Zero egress fees
- MinIO - Self-hosted S3-compatible storage
- Any other S3-compatible provider
Add S3 credentials to .env:
# S3-Compatible Object Storage
# Uncomment and fill in your S3 details to enable automatic uploads
# S3_ACCESS_KEY=your_access_key_here
# S3_SECRET_KEY=your_secret_key_here
# S3_ENDPOINT=https://hel1.your-objectstorage.com
# S3_BUCKET=your-bucket-nameUncomment the lines and fill in your provider credentials.
Hetzner Object Storage ⭐ (Recommended):
# Get your endpoint from Hetzner Cloud Console → Object Storage
S3_ENDPOINT=https://fsn1.your-objectstorage.com # Falkenstein, Germany
# or
S3_ENDPOINT=https://hel1.your-objectstorage.com # Helsinki, Finland
# or
S3_ENDPOINT=https://nbg1.your-objectstorage.com # Nuremberg, Germany
# Full example for Hetzner:
S3_ACCESS_KEY=your_hetzner_access_key
S3_SECRET_KEY=your_hetzner_secret_key
S3_ENDPOINT=https://fsn1.your-objectstorage.com
S3_BUCKET=scrapai-crawlsDigitalOcean Spaces:
S3_ENDPOINT=https://nyc3.digitaloceanspaces.com # New York
# or
S3_ENDPOINT=https://sfo3.digitaloceanspaces.com # San FranciscoWasabi:
S3_ENDPOINT=https://s3.us-east-1.wasabisys.com # US East
# or
S3_ENDPOINT=https://s3.eu-central-1.wasabisys.com # EU CentralAWS S3:
S3_ENDPOINT=https://s3.us-east-1.amazonaws.com # US East
# Note: AWS S3 endpoints vary by regionBackblaze B2:
S3_ENDPOINT=https://s3.us-west-000.backblazeb2.com # Check your B2 dashboard for correct endpointCloudflare R2:
S3_ENDPOINT=https://<account_id>.r2.cloudflarestorage.comS3 upload is now supported in both regular crawls and Airflow workflows:
./scrapai crawl spider_name --project proj- ✅ Automatically uploads to S3 if credentials configured
- ✅ Only for production crawls (no
--limitflag) - ✅ Compresses files with gzip before upload (saves bandwidth & storage)
- ✅ Keeps local copy after upload (S3 is backup, not replacement)
- ✅ Gracefully skips if boto3 not installed
- Same S3 upload functionality
- Runs in dedicated task after crawl completes
- Does not block spider execution
Upload Process:
- Spider completes crawl successfully (exit code 0)
- Crawl results saved to
DATA_DIR/<project>/<spider>/crawls/crawl_TIMESTAMP.jsonl - If S3 configured and boto3 installed:
- File compressed to
.jsonl.gz(typically 70-90% smaller) - Uploaded to S3 bucket
- Compressed file deleted, original kept locally
- File compressed to
- S3 path:
s3://<bucket>/<project>/<spider>/crawls/crawl_TIMESTAMP.jsonl.gz
Local Files:
All crawl data remains in your local DATA_DIR even after S3 upload. S3 is for backup/archiving, not a replacement for local storage.
Airflow DAGs log S3 status on startup:
S3 Upload: ENABLED
or
S3 Upload: DISABLED (credentials not found)
If disabled, check that all 4 environment variables are set in .env:
S3_ACCESS_KEYS3_SECRET_KEYS3_ENDPOINTS3_BUCKET
Recommend S3 setup when:
- User asks about data backup or archiving
- User needs to share crawl data across systems
- User mentions cloud storage (S3, Hetzner, DigitalOcean Spaces, etc.)
- User has large crawls and wants off-site storage
- User is using Airflow workflows
- User asks about data durability/redundancy
Backup & Disaster Recovery:
- Automatic off-site backup of all crawl data
- Protect against local disk failure
- Easy restoration from S3 if needed
Data Sharing:
- Share crawl results across multiple systems
- Centralized data storage for team access
- Export data from one system, import on another
Archiving:
- Long-term storage of historical crawls
- Cheaper than keeping on local SSD/NVMe
- Compliance and audit requirements
Multi-Region Deployment:
- Run crawlers in multiple regions
- All data centralized in S3 bucket
- Access from anywhere
Current Limitations:
- Upload happens after entire crawl completes (not streaming)
- No selective upload (all production crawls uploaded if S3 enabled)
- No automatic cleanup of old files in S3
- Only uploads production crawls (crawls without
--limitflag)
Storage Costs:
- Hetzner:
€0.005/GB/month ($0.005) - DigitalOcean Spaces: $0.02/GB/month (first 250GB free with droplet)
- Wasabi: $0.0059/GB/month (minimum 1TB)
- AWS S3: $0.023/GB/month (US East)
- Backblaze B2: $0.005/GB/month
- Cloudflare R2: $0.015/GB/month
Egress Costs (downloading from S3):
- Hetzner: Free egress
- DigitalOcean Spaces: Free up to 1TB/month
- Wasabi: Free egress
- AWS S3: $0.09/GB (expensive!)
- Backblaze B2: $0.01/GB
- Cloudflare R2: Zero egress fees (best for frequent downloads)
Tip: For frequent data downloads, use providers with free/cheap egress (Cloudflare R2, Hetzner, Wasabi).
- Check
.envhas all 4 S3 variables set - Verify credentials are correct (test with AWS CLI or s3cmd)
- Confirm bucket exists and is accessible
- Ensure crawl is production mode (no
--limitflag) - Check crawl completed successfully (exit code 0)
- For Airflow workflows, check DAG logs for errors
- Double-check access key and secret key
- Verify endpoint URL is correct for your provider
- Ensure bucket exists in the same region as endpoint
- Check IAM permissions (AWS) or access policies (other providers)
- Check bucket name is correct
- Verify upload task completed successfully in Airflow logs
- Browse S3 bucket with web console or CLI
- Check S3 path:
s3://<bucket>/<spider_name>/crawl_*.jsonl
- Check network bandwidth to S3 provider
- Consider provider closer to your location
- Split large crawls into smaller batches
- Use provider with faster upload speeds
Planned features:
- S3 upload for regular
./scrapai crawl✅ Done - Compression before upload (gzip) ✅ Done
- Streaming upload during crawl (not just at end)
- Selective upload (upload only specific spiders)
- Automatic cleanup of old S3 files
- Upload progress reporting
- S3 download command (restore from S3)
- Multi-bucket support (different buckets per project)
- Queue Management - Batch processing with Airflow
- Analysis Workflow - Spider building workflow
- Onboarding Guide - Initial setup