File Storage
Configure how OpenClaw stores and processes uploaded files.
Storage Modes
Temporary (Default)
Files are processed and discarded:
FILE_STORAGE_MODE=temporary- Files deleted after processing
- No persistent storage required
- Best for privacy
Persistent
Files are kept for future reference:
FILE_STORAGE_MODE=persistent
FILE_STORAGE_PATH=/var/data/openclaw/files
FILE_RETENTION_DAYS=30- Files stored on your server
- Reference in future conversations
- Requires storage space
Configuration
Size Limits
MAX_FILE_SIZE=25MB
MAX_FILES_PER_MESSAGE=10Allowed Types
ALLOWED_FILE_TYPES=pdf,docx,txt,md,png,jpg,jpeg,gif,py,js,ts,jsonStorage Path (VPS/Local)
FILE_STORAGE_PATH=/var/data/openclaw/filesPlatform-Specific Notes
Cloudflare Workers
- Limited to 25MB per file (platform limit)
- No persistent storage (R2 integration coming)
- Files processed in memory
VPS
- Configurable size limits
- Local filesystem storage
- Can mount external storage
Local
- Unlimited size (hardware dependent)
- Local filesystem storage
- Full control over data
Security
Virus Scanning
Enable virus scanning for uploads:
ENABLE_VIRUS_SCAN=true
CLAMAV_HOST=localhost
CLAMAV_PORT=3310Allowed Origins
Restrict file uploads to specific origins:
FILE_UPLOAD_ORIGINS=https://your-domain.com