Running it
The server beside the TessariDB node that holds its metadata, from one compose file — and the first bucket with the AWS CLI.
The image tessaridb/s3 (linux/amd64 and linux/arm64) holds only the tessaridb-s3
server: distroless, non-root, with tessaridb-s3 health as its health check. The
server's repository carries a compose.yaml that runs it beside the TessariDB node
holding its metadata.
git clone https://github.com/tessaridb/tessaridb-s3
cd tessaridb-s3
cp .env.example .env # set every value in it
docker compose up -d --wait
Every value in .env is required and none has a default worth keeping: the
database owner, the server's own database password, the S3 root key and secret,
and the 64-hex-digit key users' secrets are sealed under (openssl rand -hex 32).
What the compose file does:
- The database (
tessaridb/tessaridb:0.38.2, on TessariDB's own storage engine, TessariKV) declares its owner from.envon first start and is reachable only from the S3 server, over the compose network. A metadata store written by0.35.3or earlier is refused and left untouched: stop the server and the database, take a snapshot with the old image (tessaridb <store> --backup <file>), restore it into an empty directory with0.38.2(tessaridb <new store> --restore <file>) and point the database there. Object bytes on the drives are not touched. - A one-shot
s3-accountstep signs in as that owner once to declare the namespace, the database and the server's own account. The server then signs in ass3, an editor ofs3.metathat is refused anything outside it. - S3 is published on
127.0.0.1:9100and the console on127.0.0.1:9101. Both keep their data in named volumes, and the server runs as a non-root user.
[!WARNING] Put a TLS-terminating proxy in front of S3 and the console before exposing either. Without TLS a console sign-in sends a secret across the network in the clear.
The first bucket
export AWS_ACCESS_KEY_ID=<S3_ROOT_ACCESS_KEY from .env>
export AWS_SECRET_ACCESS_KEY=<S3_ROOT_SECRET_KEY from .env>
export AWS_DEFAULT_REGION=us-east-1
aws --endpoint-url http://127.0.0.1:9100 s3 mb s3://first
aws --endpoint-url http://127.0.0.1:9100 s3 cp ./photo.jpg s3://first/2026/
aws --endpoint-url http://127.0.0.1:9100 s3 ls s3://first --recursive
Requests must be signed for the server's region (TESSARIDB_S3_REGION,
us-east-1 by default). Anonymous requests are refused. Path-style addressing
always works; <bucket>.<domain> addressing works for the domains listed in
TESSARIDB_S3_DOMAINS.
Backing up
A backup is two halves taken in one order while the server keeps serving: first the
metadata store's snapshot (tessaridb --at <node> --user <owner> --backup meta.snapshot), then every node's TESSARIDB_S3_DATA_DIR, copied whole within the
reclaim grace (TESSARIDB_S3_RECLAIM_GRACE_SECS, 24 hours by default). Bytes are on
the drive before the commit that names them, and freed files wait out the grace, so
the copy holds every object the snapshot names. The other order loses objects
written in between.
To restore, --restore the snapshot into an empty store, put each node's copy back
and start the same nodes against it. Keep the root secret, TESSARIDB_S3_IAM_KEY, the
keys passphrase and, on a cluster, the cluster secret and the internal authority
outside both halves.
A node marks its data directory with the layout it writes and refuses to start on one written in another layout.
Stopping
SIGINT or SIGTERM stops the server after the grace period
(TESSARIDB_S3_SHUTDOWN_GRACE_SECS, 30 seconds by default); requests in flight
are given that long to finish.