Zou stores preview files, thumbnails, and attachments using a flexible storage backend system. You can choose between local filesystem storage or cloud object storage (S3 or Swift).Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cgwire/zou/llms.txt
Use this file to discover all available pages before exploring further.
Storage Backends
Zou supports three storage backends:- Local - Files stored on the local filesystem (default)
- S3 - Amazon S3 or S3-compatible storage (MinIO, Wasabi, etc.)
- Swift - OpenStack Swift object storage
Storage backend to use:
local- Local filesystems3- Amazon S3 or compatibleswift- OpenStack Swift
Local Storage
Local storage stores files directly on the server filesystem. This is the simplest option and works well for small to medium deployments.Configuration
Path to the folder where preview files are stored.Can be:
- Relative path:
./previews(relative to working directory) - Absolute path:
/var/zou/previews
THUMBNAIL_FOLDER if set.Temporary directory for file processing before moving to final location.
Save original uploaded files alongside generated previews.Useful for archival or reprocessing purposes.
Directory Structure
Files are organized in a hierarchical structure:zou/app/stores/file_store.py:587:
Setup Example
Storage Buckets
Zou creates three storage buckets:- pictures - Image previews and thumbnails (PNG, JPG)
- movies - Video previews (MP4)
- files - Attachments and other files
zou/app/stores/file_store.py:587:
S3 Storage
Use Amazon S3 or S3-compatible storage (MinIO, DigitalOcean Spaces, Wasabi, Backblaze B2, etc.) for scalable cloud storage.Configuration
Set to
s3 to enable S3 storage.AWS region for S3 storage.Example:
us-east-1, eu-west-1Custom S3-compatible endpoint URL.Examples:
- MinIO:
http://minio.example.com:9000 - DigitalOcean Spaces:
https://nyc3.digitaloceanspaces.com - Wasabi:
https://s3.wasabisys.com - Backblaze B2:
https://s3.us-west-001.backblazeb2.com
S3 access key ID for authentication.
S3 secret access key for authentication.
Automatically create S3 buckets if they don’t exist.Requires appropriate IAM permissions.
Prefix for bucket names.Buckets created:
{prefix}pictures, {prefix}movies, {prefix}filesEncryption
Enable client-side AES-256 encryption for stored files.
AES-256 encryption key (32 bytes, hex-encoded).Generate with:
openssl rand -hex 32AWS S3 Setup
1. Create IAM UserMinIO Setup
1. Install MinIOSwift Storage
Use OpenStack Swift object storage for scalable cloud storage.Configuration
Set to
swift to enable Swift storage.OpenStack Swift authentication URL.Example:
https://auth.cloud.ovh.net/v3Swift username for authentication.
Swift tenant/project name.
Swift authentication key/password.
Swift region name.Example:
GRA, BHS, SBG (for OVH)Swift authentication API version.
Automatically create containers if they don’t exist.
Prefix for container names.
Encryption
Enable client-side AES-256 encryption for stored files.
AES-256 encryption key (32 bytes, hex-encoded).
OVH Public Cloud Setup
1. Create OpenStack User In OVH Control Panel:- Go to Public Cloud → Users & Roles
- Create a new OpenStack user
- Note the username and password
- Download the openrc.sh file
File Operations
Zou provides a unified API for file operations across all storage backends fromzou/app/stores/file_store.py:587.
Store File
Read File
Check Existence
Delete File
Copy File
Migration Between Backends
Download from Cloud Storage
Migrate files from Swift/S3 to local storage:PREVIEW_FOLDER.
Upload to Cloud Storage
Migrate files from local storage to S3/Swift:Migration Process
Local to S3:-
Configure S3 settings:
-
Upload files:
- Restart Zou with new configuration
- Keep S3 configuration in environment
-
Download files:
-
Update configuration:
- Restart Zou
File Deletion
Enable file deletion functionality.When disabled, files are orphaned but not deleted. Enable to allow file cleanup.
Performance Considerations
Local Storage
Pros:- Lowest latency
- No bandwidth costs
- Simple setup
- Limited by disk space
- No redundancy
- Difficult to scale horizontally
S3/Swift Storage
Pros:- Unlimited scalability
- Built-in redundancy
- CDN integration possible
- Multi-server support
- Network latency
- Bandwidth costs
- More complex setup
Troubleshooting
Local Storage Issues
Permission denied:S3 Issues
Access denied:- Verify IAM permissions
- Check bucket policies
- Confirm access keys are valid
- Check network bandwidth
- Consider using S3 Transfer Acceleration
- Verify endpoint is in closest region
Swift Issues
Authentication failed:- Verify auth URL is correct
- Check username/password
- Confirm tenant name
- Verify auth version (usually v3)
- Check network connectivity
- Verify region name
- Increase timeout settings
Security Best Practices
- Use encryption - Enable AES-256 encryption for sensitive files
- Restrict access - Use IAM policies to limit access
- Secure credentials - Never commit access keys to version control
- Use HTTPS - Always use HTTPS endpoints for cloud storage
- Regular backups - Backup cloud storage regularly
- Access logging - Enable access logs for audit trails