Skip to content

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>&region=us-east-1&allow_http=true
  • endpoint= is the server’s S3 URL, for example http://localhost:9000 or http://minio:9000 inside a Compose network.
  • region= is required by the S3 client; MinIO accepts any value (us-east-1 is conventional).
  • allow_http=true allows plain HTTP. Drop it when MinIO serves TLS.

Credentials are the MinIO access key and secret in the AWS variables:

Terminal window
export AWS_ACCESS_KEY_ID=minioadmin
export AWS_SECRET_ACCESS_KEY=minioadmin

Use 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&region=us-east-1&allow_http=true"
)
db.cypher("CREATE (:Person {name: 'Alice'})")
Terminal window
namidb-server \
--store "s3://namidb?ns=prod&endpoint=http://localhost:9000&region=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 PUT with If-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.