S3-compatible gateway for Drime Cloud
TypeScript · Bun · Docker · Web admin UI
- S3-shaped API — workspace root folders are buckets; objects, listing, uploads, and common operations work like S3.
- Sig V4 — AWS CLI, SDKs, and tools such as Duplicati / restic can use your gateway with a custom endpoint and region
drime. - Web admin UI — manage workspace init, buckets, objects, and uploads at
/_ui/. - Docker-first — images on Docker Hub and GHCR.
Save the following as docker-compose.yml (same as docker-compose.yml in this repository), then edit DRIME_API_KEY, S3_ACCESS_KEY, and S3_SECRET_KEY.
# drime-s3 — edit `environment`, then `docker compose up -d`.
services:
drime-s3:
image: docker.io/essayoub/drime-s3:latest
container_name: drime-s3
restart: unless-stopped
ports:
- "8081:8081"
environment:
DRIME_API_KEY: "YOUR_DRIME_API_TOKEN"
DRIME_API_BASE_URL: "https://app.drime.cloud/api/v1"
DRIME_GATEWAY_WORKSPACE_NAME: "drime-s3"
# Pick any secret strings; clients use them for Sig V4 here — not from Drime or AWS
S3_ACCESS_KEY: "YOUR_S3_ACCESS_KEY"
S3_SECRET_KEY: "YOUR_S3_SECRET_KEY"
# Dev defaults — change before production
WEB_UI_PASSWORD: "changeme"
# Dev default only — rotate in production (64 hex chars = 32 bytes)
WEB_UI_SESSION_SECRET: "00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff"Then:
docker compose up -d # gateway + UI on host port 8081 by defaultOpen http://127.0.0.1:8081/_ui/ (adjust host/port if you changed ports:).
Images: docker.io/essayoub/drime-s3 and ghcr.io/essare/drime-s3 — tags like main, v1.x.x.
Use region drime, path-style, and your gateway URL.
AWS CLI 2.15+ (set once per shell; fix host/port to match your gateway):
export AWS_ACCESS_KEY_ID="<same as S3_ACCESS_KEY>"
export AWS_SECRET_ACCESS_KEY="<same as S3_SECRET_KEY>"
export AWS_DEFAULT_REGION=drime
export AWS_EC2_METADATA_DISABLED=true
export AWS_USE_PATH_STYLE_ENDPOINT=true
export AWS_ENDPOINT_URL_S3="http://127.0.0.1:8081"Older CLI: add --endpoint-url http://127.0.0.1:8081 to each command.
aws s3 ls
aws s3 mb s3://my-bucket
echo hi > /tmp/h.txt && aws s3 cp /tmp/h.txt s3://my-bucket/h.txt
aws s3 cp s3://my-bucket/h.txt -If aws s3 rb says the bucket is not empty, empty it first or use --force.
Other clients: set the custom S3 endpoint to your gateway; from Docker on the host, http://host.docker.internal:<port> often works. Prefer a recent release (e.g. ≥ v1.0.4) for strict ETag clients such as Duplicati.
Requires Bun 1.3.x.
git clone https://github.com/essare/drime-s3.git && cd drime-s3
bun install --frozen-lockfile
bun install --frozen-lockfile --cwd webPut DRIME_API_KEY in .env (optional S3_ACCESS_KEY, S3_SECRET_KEY, WEB_UI_PASSWORD, WEB_UI_SESSION_SECRET). For local dev only, DRIME_S3_INSECURE=1 skips Sig V4 (never on the public internet).
bun run src/cli/main.ts init
bun run start # http://127.0.0.1:8081
# bun run dev # hot reload
# bun run web:dev # UI only (Vite)Optional ~/.config/drime-s3/config.toml. Full env list: src/config.ts and .env.example. S3 trace logging: DRIME_S3_HTTP_TRACE=1 (add DRIME_S3_HTTP_TRACE_VERBOSE=1 for response headers).
See CONTRIBUTING.md and .github/PULL_REQUEST_TEMPLATE.md. Add a LICENSE in the repo root when you pick a license.
