S3 Providers
This guide provides comprehensive configuration instructions for integrating Palmr. with various S3-compatible storage providers. Whether you're using cloud services like AWS S3 or self-hosted solutions like MinIO, this guide will help you set up reliable object storage for your files.
Overview: Palmr. supports any S3-compatible storage provider, giving you flexibility to choose the solution that best fits your needs and budget.
When to use S3-compatible storage
Consider using S3-compatible storage when you need:
- Cloud storage for distributed deployments
- Scalability beyond local filesystem limitations
- Redundancy and backup capabilities
- CDN integration for faster file delivery
- Multi-region file distribution
Environment variables
To enable S3-compatible storage, set ENABLE_S3=true
and configure the following environment variables:
Variable | Description | Required | Default |
---|---|---|---|
S3_ENDPOINT | S3 provider endpoint URL | Yes | - |
S3_PORT | Connection port | No | Based on protocol |
S3_USE_SSL | Enable SSL/TLS encryption | Yes | true |
S3_ACCESS_KEY | Access key for authentication | Yes | - |
S3_SECRET_KEY | Secret key for authentication | Yes | - |
S3_REGION | Storage region | Yes | - |
S3_BUCKET_NAME | Bucket/container name | Yes | - |
S3_FORCE_PATH_STYLE | Use path-style URLs | No | false |
Provider configurations
Below are tested configurations for popular S3-compatible providers. Replace the example values with your actual credentials and settings.
Security Note: Never commit real credentials to version control. Use environment files or secure secret management systems.
AWS S3
Amazon S3 is the original S3 service, offering global availability and extensive features.
Getting credentials:
- Go to AWS IAM Console
- Create a new user with S3 permissions
- Generate access keys for programmatic access
MinIO (Self-hosted)
MinIO is perfect for self-hosted deployments and development environments.
Setup notes:
- Use
S3_FORCE_PATH_STYLE=true
for MinIO - Default MinIO port is 9000
- SSL can be disabled for local development
Google Cloud Storage
Google Cloud Storage offers competitive pricing and global infrastructure.
Getting credentials:
- Enable Cloud Storage API in Google Cloud Console
- Create HMAC keys for S3 compatibility
- Use the generated access ID and secret
DigitalOcean Spaces
DigitalOcean Spaces provides simple, scalable object storage.
Available regions:
nyc3
(New York)ams3
(Amsterdam)sgp1
(Singapore)fra1
(Frankfurt)
Backblaze B2
Backblaze B2 offers cost-effective storage with S3-compatible API.
Cost advantage:
- Significantly lower storage costs
- Free egress to Cloudflare CDN
- Pay-as-you-go pricing model
Wasabi
Wasabi provides hot cloud storage with predictable pricing.
Benefits:
- No egress fees
- Fast performance
- Simple pricing structure
Azure Blob Storage
Azure Blob Storage with S3-compatible API for Microsoft ecosystem integration.
Setup requirements:
- Enable S3-compatible API in Azure
- Use container name as bucket name
- Configure appropriate access policies
Configuration best practices
Security considerations
- Use IAM policies to limit access to specific buckets and operations
- Enable encryption at rest and in transit
- Rotate credentials regularly
- Monitor access logs for unusual activity
- Use HTTPS for all connections (
S3_USE_SSL=true
)
Performance optimization
- Choose regions close to your users or server location
- Configure CDN for faster file delivery
- Use appropriate bucket policies for public file access
- Monitor bandwidth usage and costs
Troubleshooting common issues
Connection errors:
- Verify endpoint URL and port settings
- Check firewall and network connectivity
- Ensure SSL/TLS settings match provider requirements
Authentication failures:
- Confirm access key and secret key are correct
- Verify IAM permissions for bucket operations
- Check if credentials have expired
Bucket access issues:
- Ensure bucket exists and is accessible
- Verify region settings match bucket location
- Check bucket policies and ACL settings
Testing your configuration
After configuring your S3 provider, test the connection by:
- Upload a test file through the Palmr. interface
- Verify file appears in your S3 bucket
- Download the file to confirm retrieval works
- Check file permissions and access controls
Tip: Start with a development bucket to test your configuration before using production storage.
Switching between providers
To switch from filesystem to S3 storage or between S3 providers:
- Backup existing files if switching from filesystem storage
- Update environment variables with new provider settings
- Restart the Palmr. container to apply changes
- Test file operations to ensure everything works correctly
Remember that existing files won't be automatically migrated when switching storage providers.