# S3 Explorer

> A secure, self-hosted file manager for any S3-compatible storage bucket.

- URL: https://subratomandal.com/projects/s3explorer
- Year: 2026
- Tech: TypeScript, React, Express, SQLite
- GitHub: https://github.com/subratomandal/s3explorer

S3 Explorer is a self-hosted web interface for any S3-compatible storage: AWS S3, Cloudflare R2, MinIO, DigitalOcean Spaces, Google Cloud and Railway Buckets. I built it because managing buckets meant hopping between provider dashboards and CLI tools, each with its own quirks. I wanted one interface that behaved the same everywhere, and that I could trust with production credentials.

_Screenshot: S3 Explorer file manager interface_

## Why

Every provider ships its own console, and they have little in common. AWS's is dense, MinIO's is bare, R2's lives inside a larger dashboard, and a self-hosted MinIO often needs extra setup before it has a usable file manager at all. None of them keep credentials for several providers in one place. The CLI is powerful but slow for browsing, and keys left in shell history are a security risk.

## What it does

It's a single Node and React app you host yourself. You sign in once with a master password, then add up to 100 bucket connections from any S3-compatible provider and switch between them in one click. The server encrypts credentials with AES-256-GCM, and nothing sensitive is ever stored in the browser; the server decrypts a key only at the moment it makes an S3 call.

_Screenshot: Connection manager screen_

Files can be dragged in to upload, sorted into folders, renamed, previewed in the browser, and deleted one at a time or in batches. Downloads go through the server, so no presigned URLs leak from the page. Most things have a shortcut:

- `Cmd K` opens the command palette
- `Cmd ,` opens the connection manager
- `Cmd U` starts an upload
- `Esc` closes whatever is open

_Screenshot: Command palette with actions, connections, and buckets_

## How it's built

The frontend is React and Tailwind, built with Vite. It has the file manager, the connection manager, the command palette and the upload modal, and keeps no state between sessions.

The backend is an Express server in TypeScript. It handles sign-in, sessions and encryption, and proxies every S3 operation through the server-side SDK, so the browser never sees a raw key.

SQLite, through better-sqlite3, holds the password hashes, sessions and encrypted connection records. That keeps the deployment self-contained, with no external database to run. Passwords are hashed with Argon2id, and sessions live on the server behind httpOnly, secure, SameSite=Strict cookies.

It ships as a Docker image with a one-click Railway deploy, and a persistent volume at `/data` holds the database.

## What I learned

**Don't trust the browser with credentials.** The first version kept keys in the browser and signed requests there, so a malicious extension or an XSS bug could steal production keys. Moving every SDK call to the server cost one extra network hop and removed that whole class of attack.

**Plan the key's lifecycle.** AES-256-GCM needs a key that survives restarts, but I didn't want a hard-coded key or a separate KMS to manage. The key is derived from a `SESSION_SECRET` kept in the host's secret store. Rotating it invalidates every stored credential, which is exactly what should happen after a leak.

**SQLite was the right size.** A single-user tool needs no daemon, no network config and nothing to operate. better-sqlite3 is synchronous, but session lookups and connection reads all finish in under a millisecond. Postgres would have been over-engineering.

**Rate-limit by address, not session.** My first limiter was per session, which is useless because an attacker never has one. Ten failed attempts from one IP in fifteen minutes now locks it out for thirty, and with Argon2id's deliberate slowness, brute-forcing the master password is impractical.
