https://github.com/heapoftrash/filetree
Filetree is a minimalistic, self-hosted file manager - Browse, upload, preview, and manage files from your browser. No database — config in YAML or JSON. Single binary deployment.
https://github.com/heapoftrash/filetree
file-browser file-explorer file-manager go golang react self-hosted web-file-browser web-file-manager
Last synced: 2 months ago
JSON representation
Filetree is a minimalistic, self-hosted file manager - Browse, upload, preview, and manage files from your browser. No database — config in YAML or JSON. Single binary deployment.
- Host: GitHub
- URL: https://github.com/heapoftrash/filetree
- Owner: heapoftrash
- License: mit
- Created: 2026-03-16T10:52:18.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-04-01T11:17:36.000Z (2 months ago)
- Last Synced: 2026-04-01T13:19:49.859Z (2 months ago)
- Topics: file-browser, file-explorer, file-manager, go, golang, react, self-hosted, web-file-browser, web-file-manager
- Language: TypeScript
- Homepage: https://heapoftrash.github.io/filetree/
- Size: 1.48 MB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
Browse, upload, preview, and manage files from your browser.
Filetree is a minimalistic, self-hosted file manager — browse, upload, preview, and manage files from your browser. No cloud lock-in, no database. Simple YAML or JSON config, single binary deployment.
## Features
- **Browse & manage** — List, create folders, rename, move, copy, delete (with trash)
- **Upload** — Drag-and-drop, multipart uploads
- **Rich previews** — Images, video, audio, PDF, Markdown, JSON, CSV, HTML, text
- **Auth** — Google OAuth, GitHub OAuth, local users
- **Configuration** — YAML or JSON config file, no database.
- **Security** — Short-lived signed URLs for content previews, JWT auth
## Tech stack
- **Backend:** Go, Gin, JWT, OAuth2 (Google, GitHub)
- **Frontend:** React, TypeScript, Ant Design, Vite
## Quick start
Full guides: **[Documentation](https://heapoftrash.github.io/filetree/)** — installation, production, configuration, authentication.
### Docker (prebuilt image) recommended
```bash
docker run -d -p 8080:8080 \
-v /path/to/your/files:/data \
-v /path/to/config.yaml:/app/config.yaml \
-e CONFIG_FILE=/app/config.yaml \
ghcr.io/heapoftrash/filetree:latest
```
If the package is private, run `docker login ghcr.io` before `docker pull`.
### Config file
1. Copy [config.example.yaml](config.example.yaml) or [config.example.json](config.example.json) to `config.yaml` / `config.json`.
2. Set **`CONFIG_FILE`** to that path when you start the binary or container (see [Configuration](#configuration)).
3. Environment variables override the file. Full schema: [config file (docs)](https://heapoftrash.github.io/filetree/configuration/config-file/).
### Production binary
**Production binary** — `make build` runs the Vite production build, copies output into `app/uiembed/dist` for `go:embed`, and compiles **one** `app/filetree` binary with the UI embedded (install UI deps once: `cd app/web && npm ci`):
```bash
git clone https://github.com/heapoftrash/filetree.git
make build
ROOT_PATH=/path/to/files CONFIG_FILE=./config.yaml ./app/filetree
```
The **prebuilt container image** already uses an embedded UI (no separate static bundle directory in the image).
**UI on disk (optional)** — `make build-app` (Go only) plus `make build-frontend` if you want `app/web/dist` on disk; run `./app/filetree` from the repo root and the server will pick up `app/web/dist`, `app/uiembed/dist`, or cwd-relative paths (see [documentation](https://heapoftrash.github.io/filetree/)).
See [docs/API.md](docs/API.md) for the API. Build docs locally: `pip install mkdocs-material && mkdocs serve`.
### Development
**API** — `cd app && go mod tidy && go run .` → **http://localhost:8080**
**UI** — `cd app/web && npm install && npm run dev` → **http://localhost:5173** (proxies `/api` to the API)
Set `frontend.url` in config to `http://localhost:5173` for CORS and OAuth.
## Contributing
Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
## License
[MIT](LICENSE)