Storage provider
s3nd with MinIO
One Docker command, and the real code path runs on your laptop and in CI.
import { createBucket } from 's3nd'
const store = createBucket({
bucket: 'transfers',
endpoint: 'http://localhost:9000',
credentials: { accessKeyId: 'minioadmin', secretAccessKey: 'minioadmin' },
})Why this one
MinIO
A local MinIO is the cheapest way to exercise s3nd for real: the same PutObject with the same conditional headers, no credentials to create and no network to wait on. The examples in the repository point at it by default.
From the command line
A starter configuration, and what is left to do.
init writes the file with ${VAR} references rather than secrets, so it is meant to be committed; the env file it points at is not.
s3nd init --provider minio --bucket transfers{
"bucket": "transfers",
"endpoint": "http://localhost:9000",
"forcePathStyle": true,
"prefix": "transfers",
"expiresIn": "1h",
"credentials": { "accessKeyId": "minioadmin", "secretAccessKey": "minioadmin" }
}Then
- 01docker run -p 9000:9000 -p 9001:9001 -e MINIO_ROOT_USER=minioadmin -e MINIO_ROOT_PASSWORD=minioadmin quay.io/minio/minio server /data --console-address ":9001"
- 02Create the transfers bucket from the console on http://localhost:9001.
- 03Run
s3nd doctor. It performs the operations s3nd needs and reports what happened.
Worth knowing
Notes on MinIO.
Path-style addressing
Self-hosted gateways require https://endpoint/bucket/key. Setting an endpoint turns it on; the starter configuration writes it explicitly so the intent is visible.
Self-hosted in production too
The same configuration, with real credentials and TLS, runs against a MinIO cluster or any Ceph, Garage or SeaweedFS gateway that implements conditional PutObject.
Expiry cleanup
expiresIn stops a transfer being handed over; only a lifecycle rule deletes the object. Give the prefix a rule that expires objects after a day or two, and s3nd doctor turns green.
Other providers
The endpoint is the only difference.
Put a file. Hand over the code.
Point it at the bucket you already pay for. Nothing to deploy, nothing to sign up for, nothing in the middle.
npm install -g @s3nd/clis3nd init --provider r2 --bucket drops3nd put ./anything.zip