MinIO
MinIO is an S3-compatible object store you run yourself.
NamiDB talks to it through the s3:// backend with a custom endpoint. The
same instructions apply to other self-hosted S3-compatible servers.
For a ready-made Compose stack with MinIO and namidb-server, see
Docker + MinIO.
URI
s3://<bucket>[/<prefix>]?ns=<namespace>&endpoint=<url>®ion=us-east-1&allow_http=trueendpoint=is the server’s S3 URL, for examplehttp://localhost:9000orhttp://minio:9000inside a Compose network.region=is required by the S3 client; MinIO accepts any value (us-east-1is conventional).allow_http=trueallows plain HTTP. Drop it when MinIO serves TLS.
Credentials are the MinIO access key and secret in the AWS variables:
export AWS_ACCESS_KEY_ID=minioadminexport AWS_SECRET_ACCESS_KEY=minioadminUse it
Create the bucket first (the engine does not create buckets), then:
import namidb
db = namidb.Client( "s3://namidb?ns=prod&endpoint=http://localhost:9000®ion=us-east-1&allow_http=true")db.cypher("CREATE (:Person {name: 'Alice'})")namidb-server \ --store "s3://namidb?ns=prod&endpoint=http://localhost:9000®ion=us-east-1&allow_http=true" \ --auth-token "$NAMIDB_AUTH_TOKEN"Objects land under tenants/prod/ in the namidb bucket (or under
<prefix>/prod/ when the URI has a prefix).
Requirements
- Conditional writes. The server must reject a second
PUTwithIf-None-Match: *on an existing key. Current MinIO releases do; very old releases and some other “S3-compatible” servers do not, and are unsafe for NamiDB. Run the probe in Object stores against your server before relying on it. - Durable MinIO storage. NamiDB’s durability is the bucket’s durability. Give MinIO persistent volumes and the redundancy you need.
- Lifecycle rule for incomplete multipart uploads, as on any object store.
Credentials hygiene
The minioadmin / minioadmin defaults are for local testing. In any
shared environment create a dedicated MinIO user whose policy allows
s3:GetObject, s3:PutObject, s3:DeleteObject, s3:ListBucket and
s3:AbortMultipartUpload on the NamiDB bucket only, and keep the MinIO API
port off public networks.