A self-hosted web UI for managing S3 and S3-compatible buckets
129
A self-hosted web UI for managing S3 and S3-compatible buckets: register one or more S3 connections (endpoint, region, access key/secret), browse and manage bucket contents, preview text files inline, share connections with other users at different permission levels, and review a full audit trail of who did what and when. Ships as a single Docker image with an embedded MongoDB, or point it at your own external MongoDB.
MONGO_URI/api/* to the Go backend
on 127.0.0.1:8080; supervisord manages mongod (if embedded), the Go binary, and
the Next.js server inside the container.| Tool | Version | Needed for |
|---|---|---|
| Docker | 20.10+ | Building/running the production image (all you need for most users) |
| Go | 1.25+ | Building/running the backend outside Docker |
| Node.js | 22+ | Building/running the frontend outside Docker |
From the project root:
docker build -f docker/Dockerfile -t s3-manager .
This is a multi-stage build:
frontend-builder (node:22-alpine) — npm ci + next build (standalone output).backend-builder (golang:1.25-alpine) — static Go binary (CGO_ENABLED=0).mongo:7 (so mongod ships for free), with Node 22 added
to run the Next.js standalone server, plus supervisord to manage all three
processes. Everything lands in one image; nothing is downloaded at container start.Tag a specific version if you want to keep old images around:
docker build -f docker/Dockerfile -t s3-manager:1.0.0 .
cd backend
go build -o s3-manager-server ./cmd/server
Produces a single static binary at backend/s3-manager-server. Run it directly with
MONGO_URI, JWT_SECRET, ENCRYPTION_KEY, etc. set as environment variables (see below).
cd frontend
npm install
npm run build # writes .next/standalone
npm run start # serves it on :3000
Set INTERNAL_API_URL to point the frontend's /api/* proxy at wherever the backend is
running (defaults to http://127.0.0.1:8080).
docker run -d --name s3-manager -p 3000:3000 \
-e JWT_SECRET="$(openssl rand -hex 32)" \
-e ENCRYPTION_KEY="$(openssl rand -hex 32)" \
-e ADMIN_EMAIL="[email protected]" \
-e ADMIN_PASSWORD="12345678" \
-v s3manager_data:/data/db \
s3-manager
Open http://localhost:3000 and log in with the admin credentials above.
Add -e MAX_DB_SIZE_MB=5120 (defaults to 2048). This is a soft, app-enforced budget:
the backend polls MongoDB's own storage stats and prunes the oldest audit log entries as
usage approaches the limit; once it's fully exceeded, new connections/uploads/shares are
blocked until usage drops back down. No privileged container flags are required.
docker run -d --name s3-manager -p 3000:3000 \
-e MONGO_URI="mongodb+srv://user:pass@your-cluster/dbname" \
-e JWT_SECRET="$(openssl rand -hex 32)" \
-e ENCRYPTION_KEY="$(openssl rand -hex 32)" \
-e ADMIN_EMAIL="[email protected]" \
-e ADMIN_PASSWORD="12345678" \
s3-manager
When MONGO_URI is set, the embedded mongod process never starts.
| Variable | Default | Description |
|---|---|---|
MONGO_URI | (unset → embedded Mongo) | External MongoDB connection string. Unset = use the embedded Mongo. |
MONGO_DB_NAME | s3browser | Database name. |
JWT_SECRET | (insecure dev default) | Secret used to sign session JWTs. Set this in any real deployment. |
ENCRYPTION_KEY | (insecure dev default) | Key used to encrypt S3 secret access keys at rest (AES-256-GCM). Set this. |
MAX_DB_SIZE_MB | 2048 | Soft storage budget for the audit-log pruning guard. |
PORT | 8080 | Internal port for the Go backend (not published). |
ADMIN_EMAIL | (unset) | Seeds the single workspace admin on first boot. Required for anyone to have admin access. |
ADMIN_PASSWORD | (unset) | Password for the seeded admin. Only used at creation — later restarts won't overwrite a changed password. |
ADMIN_NAME | Administrator | Display name for the seeded admin. |
The workspace admin is seeded once from ADMIN_EMAIL/ADMIN_PASSWORD — there is exactly
one admin account, not "whoever signs up first". Every signup after that is a regular
member. Admins can view every user, every connection's activity, and can promote,
demote, or remove users from the Admin → Users page. Connection owners can share a
connection with other users as viewer (read/download/list) or editor
(upload/delete/create folder/rename), enforced server-side on every request — shared
connections automatically appear in the recipient's own S3 Connections list.
docker compose -f docker-compose.dev.yml up
This starts MongoDB, the Go backend (go run, live in a mounted volume), and the
Next.js dev server, wired together with the same env vars used in production. Visit
http://localhost:3000.
Alternatively, run each piece natively:
# MongoDB (any local instance, or `docker run -p 27017:27017 mongo:7`)
# Backend
cd backend
MONGO_URI=mongodb://127.0.0.1:27017 JWT_SECRET=dev ENCRYPTION_KEY=dev \
[email protected] ADMIN_PASSWORD=devpassword123 \
go run ./cmd/server
# Frontend
cd frontend
npm install
npm run dev
backend/ Go API (auth, S3 connections, bucket browser, sharing, audit, DB quota)
frontend/ Next.js + shadcn/ui dashboard
docker/ Dockerfile, entrypoint.sh, supervisord.conf.template
Content type
Image
Digest
sha256:a6085b894…
Size
373.8 MB
Last updated
3 months ago
docker pull kaa1bhairav/s3-manager:v1.0.0