# Storage EvilFlowers ships two storage drivers selected by the `EVILFLOWERS_STORAGE_DRIVER` setting: | Driver | Dotted path | Notes | |---|---|---| | Filesystem | `apps.files.storage.filesystem.FileSystemStorage` | Default. Required when running Readium LCP, because Django, the lcpencrypt worker, and the LCP Server must share the same mount. | | S3-compatible | `apps.files.storage.s3.S3Storage` | Backed by the `minio` Python client. Works with AWS S3, MinIO, Ceph RGW, Wasabi, R2, etc. Not compatible with the Readium LCP encryption pipeline (the worker needs filesystem access). | Each driver pulls its configuration from `django.conf.settings`. All listed settings have matching environment variables; see [Settings & Enumerations — Storage](Settings-&-Enumerations.md#storage) for the consolidated list. ## FileSystemStorage Stores publications on a local filesystem path. ```ini EVILFLOWERS_STORAGE_DRIVER=apps.files.storage.filesystem.FileSystemStorage EVILFLOWERS_STORAGE_FILESYSTEM_DATADIR=/mnt/data ``` If unset, the driver falls back to `{BASE_DIR}/data/evilflowers/storage`. The driver lays files out as `catalogs/{catalog_id}/{entry_id}/...`. When Readium LCP is enabled, encrypted variants are written to `catalogs/{catalog_id}/{entry_id}/encrypted/{lcp_content_id}.lcpdf`. The lcpencrypt worker and the LCP License Server must mount the same host directory at the same container path so this layout resolves identically across all three processes — see [Readium LCP Deployment](Readium-LCP-Deployment.md#shared-filesystem-configuration). ## S3Storage Stores publications on any S3-compatible bucket. Uses pre-signed GETs to serve content; no public-bucket configuration is required. ```ini EVILFLOWERS_STORAGE_DRIVER=apps.files.storage.s3.S3Storage EVILFLOWERS_STORAGE_S3_HOST=s3.amazonaws.com EVILFLOWERS_STORAGE_S3_ACCESS_KEY=AKIA... EVILFLOWERS_STORAGE_S3_SECRET_KEY=... EVILFLOWERS_STORAGE_S3_SECURE=1 EVILFLOWERS_STORAGE_S3_BUCKET=evilflowers ``` Notes: - `EVILFLOWERS_STORAGE_S3_HOST` is the **endpoint host[:port]**, not a URL. For AWS use `s3.amazonaws.com`; for MinIO use `minio:9000`. - `EVILFLOWERS_STORAGE_S3_SECURE` is a `0`/`1` toggle. Set to `1` for TLS. - The bucket must exist before startup; the driver does not create it. - `path()` is not supported on this backend — any caller that needs an on-disk path (notably the Readium LCP encryption worker) will raise `NotImplementedError`. Use the filesystem driver for catalogs that need LCP encryption. ## Backup destinations The `EVILFLOWERS_BACKUP_*` family of variables configures the backup writer, not the publication store. See [Settings & Enumerations — Backups](Settings-&-Enumerations.md#backups) and the [`backup` management command](Management-commands.md#backup).