Storage & S3
FynnCloud supports two storage backends selected automatically at startup via ServerConfig: Local / Shared Filesystem (default) and S3-Compatible Object Storage (recommended for multi-replica deployments).
Local Filesystem Storage
Section titled “Local Filesystem Storage”When STORAGE_S3_BUCKET (or S3_BUCKET) is unset or empty, FynnCloud stores blobs on disk under STORAGE_PATH (alias LOCAL_STORAGE_PATH, default <workdir>/Storage/, /app/Storage/ in container images).
Directory Layout
Section titled “Directory Layout”Files are isolated per user UUID using content-addressable UUID filenames (preventing path traversal and filesystem encoding issues):
<STORAGE_PATH>/├── <userUUID>/│ ├── <fileUUID> # Active file blob (or historical FileVersion snapshot UUID)│ ├── _system/│ │ ├── chunks/<fileID>/<uploadID>/part_<N> # In-flight multipart upload parts (1-indexed)│ │ └── thumbnails/... # Generated preview thumbnails└── ...- AIO & Docker Compose: Mount a persistent Docker volume (
fynncloud_server_storage/server_storage) or host bind mount to/app/Storage. - Multi-replica deployments: Multiple
fynncloud-serverreplicas must share the same underlying blob store—either S3-compatible object storage (recommended) or a shared POSIX filesystem mounted withReadWriteMany(RWX) (such as NFS, CephFS, Longhorn RWX, or EFS). AReadWriteOnce(RWO) block volume only supports a single replica per node.
S3-Compatible Object Storage
Section titled “S3-Compatible Object Storage”Setting STORAGE_S3_BUCKET (non-empty) activates S3StorageProvider (powered by Soto AWS SDK v7), compatible with AWS S3, Cloudflare R2, Hetzner Object Storage, MinIO, Wasabi, Scaleway, and Backblaze B2.
Configuration Variables
Section titled “Configuration Variables”STORAGE_S3_BUCKET=my-fynncloud-bucketSTORAGE_AWS_ACCESS_KEY_ID=AKIA...STORAGE_AWS_SECRET_ACCESS_KEY=...STORAGE_AWS_REGION=eu-central-1STORAGE_AWS_ENDPOINT=https://s3.eu-central-1.amazonaws.comSTORAGE_S3_TIMEOUT=900| Variable | Aliases | Default | Description |
|---|---|---|---|
STORAGE_S3_BUCKET |
S3_BUCKET |
(unset) | Bucket name; enables S3 mode when non-empty |
STORAGE_AWS_ACCESS_KEY_ID |
AWS_ACCESS_KEY_ID |
"" |
IAM / S3 access key ID |
STORAGE_AWS_SECRET_ACCESS_KEY |
AWS_SECRET_ACCESS_KEY |
"" |
IAM / S3 secret access key |
STORAGE_AWS_REGION |
AWS_REGION |
us-east-1 |
Region name (auto for Cloudflare R2) |
STORAGE_AWS_ENDPOINT |
AWS_ENDPOINT, S3_ENDPOINT |
https://s3.amazonaws.com |
S3 endpoint URL |
STORAGE_S3_TIMEOUT |
S3_TIMEOUT |
900 |
Per-request timeout in seconds (streaming large chunks directly into S3 on slow uplinks requires a generous deadline; default is 15 minutes) |
Recommended S3 Bucket Lifecycle Rule
Section titled “Recommended S3 Bucket Lifecycle Rule”Although FynnCloud’s hourly UploadCleanupJob aborts abandoned multipart uploads older than 24 hours, configure an S3 bucket lifecycle rule to abort incomplete multipart uploads after 2 days as defense-in-depth against orphaned S3 storage charges.
File Versioning & Trash Retention
Section titled “File Versioning & Trash Retention”Both settings are dynamic AppSettings editable live in Administration → Settings → Storage (or locked via environment variable):
| Setting Key | Env Variable | Default | Range | Behavior |
|---|---|---|---|---|
storageMaxFileVersions |
STORAGE_MAX_FILE_VERSIONS |
30 |
0..500 |
Maximum historical versions retained per file. When a file is overwritten and maxVersions > 0 && previousSize > 0, FynnCloud snapshots the old blob as a FileVersion and prunes versions beyond the cap. Setting 0 disables automatic versioning completely. |
storageTrashRetentionDays |
STORAGE_TRASH_RETENTION_DAYS |
30 |
≥ 1 (no upper bound) |
Number of days soft-deleted files remain in Trash before the daily TrashCleanupJob (02:00 UTC) permanently deletes them. |
Storage Quotas & Tier Precedence
Section titled “Storage Quotas & Tier Precedence”Administrators define reusable Storage Tiers in Administration → Storage Tiers and assign them to individual users or groups (including the All Users system group):
- Resolution precedence: A user’s direct tier override takes priority over group tiers. When a user has no direct tier override, FynnCloud grants the highest quota limit among all groups the user belongs to (including
All Users). - Atomic quota holds: Uploads reserve expected bytes atomically in Redis (
QuotaService) before streaming data to disk or S3 so parallel uploads cannot race past a user’s quota. On overwrite when versioning is active (maxVersions > 0), FynnCloud reserves the full new file size (since the previous blob is preserved as a version); when versioning is disabled (0), onlymax(0, newSize - previousSize)is reserved. - What counts toward quota: Active files, files in Trash, and historical file versions all count toward
users.current_storage_usage. The hourlyQuotaRecalculationJob(:30past every hour) reconcilescurrent_storage_usageby summing bothfile_metadata(including soft-deleted trash items) andfile_versions.