S3-compatible attachment storage
Attachments are stored in PostgreSQL by default (STORAGE_BACKEND=db).
STORAGE_BACKEND=s3 stores new ones in an S3-compatible bucket. Existing ones stay
in the database and keep working.
| Variable | Description |
|---|---|
STORAGE_BACKEND Optional |
Storage backend for new attachments. db stores data in PostgreSQL; s3 stores data in an S3-compatible bucket. Default: db |
S3_ENDPOINT_URL Optional |
Custom endpoint URL for S3-compatible services (e.g. MinIO, Hetzner Object Storage). Leave blank for AWS S3. |
S3_BUCKET_NAME Optional |
Name of the target S3 bucket. Required when STORAGE_BACKEND=s3. |
S3_ACCESS_KEY_ID Optional |
AWS access key ID (or MinIO equivalent). Required when STORAGE_BACKEND=s3. |
S3_SECRET_ACCESS_KEY Optional |
AWS secret access key (or MinIO equivalent). Required when STORAGE_BACKEND=s3. |
S3_REGION Optional |
AWS region for the bucket (e.g. eu-central-1). Ignored for custom endpoints. Default: us-east-1 |
S3_PREFIX Optional |
Key prefix for all stored objects (e.g. attachments/). Useful when sharing a bucket with other applications. Default: attachments/ |