s3 Storage
Overview
While our application supports local file storage, we strongly recommend using S3-compatible storage for file uploads (especially logos and images) for several benefits:
Improved website performance through CDN delivery
Enhanced security by preventing PHP file execution exploits
Better scalability and reliability
Reduced server storage load
Supported S3 Providers
You can use any S3-compatible storage service, including:
Linode Object Storage
DigitalOcean Spaces
Amazon S3
Configuration Steps
1. Environment Variables
Add the following credentials to your .env
file:
2. Storage Provider Settings
For Linode Object Storage:
Endpoint: Use the appropriate regional endpoint (e.g.,
eu-central-1.linodeobjects.com
for Frankfurt)Bucket Name: Must match your custom domain name if using one
Example Region:
eu-central-1
(Frankfurt, DE)
For DigitalOcean Spaces:
Bucket Name: Can be any valid name
No domain name matching requirement
3. CDN Configuration
If you've configured a custom domain for your bucket:
Set
DO_SPACES_CDN
to your custom domain URL (includinghttps://
and trailing slash)Ensure your DNS records are properly configured
Wait for DNS propagation (usually 24-48 hours)
Important Notes
The
DO_
prefix in environment variables is historical and works for any S3-compatible serviceStorage options:
public
: Local server storageaws
: Amazon S3 configurationdo
: Any S3-compatible service (Linode, DigitalOcean, etc.)
When using Linode, your bucket name must match your custom domain
For other providers like DigitalOcean, bucket naming is more flexible
Troubleshooting
If files aren't uploading:
Verify your credentials are correct
Check bucket permissions
Ensure the endpoint URL matches your region
Confirm CORS settings if accessing from different domains
For security purposes, always use environment variables and never commit credentials to version control.
Last updated