Choose object storage
Connect dropshelf to an S3-compatible bucket, Google Cloud Storage, Azure Blob Storage or a local directory, with the credentials and permissions each needs.
dropshelf keeps every deployed file, uploaded asset and profile picture in one object store. This page is for the operator who picks the store and gives dropshelf access to it.
You choose the store with storage.driver. There are four drivers:
| Driver | Store | Credentials | Use it for |
|---|---|---|---|
s3 | Amazon S3, MinIO or another S3-compatible store | The AWS default chain: IRSA, instance credentials or access keys | Any install. It is the default. |
gcs | Google Cloud Storage | Application Default Credentials, such as GKE Workload Identity | Installs on Google Cloud |
azure | Azure Blob Storage | The Azure default credential chain, such as AKS Workload Identity, or a connection string | Installs on Azure |
fs | A directory on the server's own disk | None | One server on a single host |
An instance uses one driver, and the server reads only that driver's block. dropshelf never creates
the bucket or container, so create it first. The s3, gcs and azure blocks each take an optional
prefix, a path inside the bucket that every object goes under. With a prefix, the bucket can hold
other data too.
The server checks the store before it reports itself ready on /readyz. A store it cannot reach, or
a bucket that is missing, keeps it not ready.
The storage blocks on this page go in the server's configuration file. On a Helm install, put them
under config: in your values file. The serviceAccount and podLabels blocks are Helm values of
their own, outside config:.
Prerequisites
- A bucket or container, created with your provider's console or command-line tool.
- Permission to create a cloud role or identity and grant it access to the bucket.
- Access to the server's configuration and its Secret, or to the Helm values.
Amazon S3 and S3-compatible stores
To use an S3 bucket:
-
Create a role for dropshelf with this policy, which grants
s3:ListBucketon the bucket ands3:GetObject,s3:PutObjectands3:DeleteObjecton its objects:{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "s3:ListBucket", "Resource": "arn:aws:s3:::<bucket>" }, { "Effect": "Allow", "Action": ["s3:GetObject", "s3:PutObject", "s3:DeleteObject"], "Resource": "arn:aws:s3:::<bucket>/*" } ] }Readiness runs
HeadBucket, which needss3:ListBucket. A role scoped to objects alone keeps the server not ready. -
Give the pods the role. On EKS, annotate the ServiceAccount for IAM Roles for Service Accounts (IRSA) in your Helm values:
serviceAccount: annotations: eks.amazonaws.com/role-arn: arn:aws:iam::<account-id>:role/dropshelfWithout IRSA or instance credentials, put
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYin the environment or the Secret instead. -
Set the bucket and its region:
storage: driver: s3 s3: bucket: example-dropshelf region: eu-north-1
region defaults to eu-north-1, so set it whenever your bucket is elsewhere.
MinIO and other S3-compatible stores
To use MinIO or another S3-compatible store, set endpoint to the store's URL. MinIO also needs
forcePathStyle: true, which names the bucket in the URL path rather than the hostname:
storage:
driver: s3
s3:
bucket: dropshelf
region: us-east-1
endpoint: https://minio.example.com
forcePathStyle: trueCredentials come from AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. With endpoint set, the
default checksums: auto sends request checksums only where they are required, which keeps older
S3-compatible stores working.
Google Cloud Storage
To use a Cloud Storage bucket on GKE:
-
Grant a Google service account
roles/storage.objectAdminon the bucket:gcloud storage buckets add-iam-policy-binding gs://<bucket> \ --member "serviceAccount:<gsa>@<project>.iam.gserviceaccount.com" \ --role roles/storage.objectAdmin -
Allow the Kubernetes ServiceAccount
dropshelfto act as that service account:gcloud iam service-accounts add-iam-policy-binding <gsa>@<project>.iam.gserviceaccount.com \ --role roles/iam.workloadIdentityUser \ --member "serviceAccount:<project>.svc.id.goog[<namespace>/dropshelf]" -
Annotate the ServiceAccount for Workload Identity in your Helm values:
serviceAccount: annotations: iam.gke.io/gcp-service-account: <gsa>@<project>.iam.gserviceaccount.com -
Set the bucket:
storage: driver: gcs gcs: bucket: example-dropshelf
Outside GKE, the server finds its credentials through Application Default Credentials. Readiness
lists one object under the prefix, so it needs no storage.buckets.get. It passes on an empty bucket
and fails on a missing one. Leave storage.gcs.endpoint empty: it is for a storage emulator, and
setting it turns authentication off.
Azure Blob Storage
To use a Blob container on AKS:
-
Create a user-assigned managed identity with a federated credential for the Kubernetes ServiceAccount
dropshelf. -
Assign the identity the Storage Blob Data Contributor role on the container.
-
Annotate the ServiceAccount and label the pods for Workload Identity in your Helm values:
serviceAccount: annotations: azure.workload.identity/client-id: <client-id> podLabels: azure.workload.identity/use: "true" -
Set the storage account and container:
storage: driver: azure azure: account: exampledropshelf container: drops
Outside Azure, put a connection string in the environment or the Secret as
DROPSHELF_STORAGE_AZURE_CONNECTION_STRING. It replaces the default credentials and names the
account, so account can stay empty. For a sovereign cloud, set endpoint to the full https service
URL, which also names the account.
Readiness lists one blob under the prefix. It passes on an empty container and fails on a missing one.
A directory on a single host
The fs driver keeps objects in a directory, storage.fs.root, which defaults to /data/blobs. It
is for one server on one host, not for several replicas. To use it, put the directory on a disk you
back up:
storage:
driver: fs
fs:
root: /data/blobsThe server empties server.spoolDir and cache.dir at every startup. It refuses to start when
storage.fs.root sits inside the spool directory or overlaps the cache directory.
The Helm chart mounts no volume for fs. On Kubernetes, every deployed file is lost when its pod
goes. Use s3, gcs or azure there.
Confirm it worked
Ask the server whether it is ready:
curl -sS https://drop.example.com/readyzA server that reaches its store answers:
readyOtherwise the answer starts with not ready: and gives the store's error, such as a missing bucket
or refused credentials. Publish a drop afterwards to check that writes work too.
Next steps
- Set up domains and TLS
- Back up and restore
- Run on a single host
- Example values files
- Configuration reference: storage
Last updated .