A lightweight, fast HTTP file server written in Go.
- Fast and safe: secure path handling, optional Basic Auth (bcrypt)
- Simple: one binary, zero config to start
- Modern UI: advanced theme with upload, folder creation, and ZIP downloads
- WebDAV: optional /dav/ endpoint (read-only)
- Production‑ready: structured logs, health probes, graceful shutdown
- Multiple directories: mount multiple paths with optional read-only flags
These will increase little by little until v1 in my goal. Any feedback is welcome.
- HTTP/2 support, TLS/HTTPS
- Full text search, file preview
- S3 storage support, OAuth integration
- Prometheus metrics
- Plug-in system
- SDK
- Kubernetes Operator
- Multi-tenancy
- Audit logging
- WebSocket real-time notifications
Homebrew
brew install samzong/tap/gofs
CLI
go install github.com/samzong/gofs/cmd/gofs@latest
# Serve current directory at http://127.0.0.1:8000
gofs
# Change host/port
gofs -host 0.0.0.0 -port 3000
# Enable auth
gofs -auth user:password
# Modern UI (upload, create folder)
gofs --theme advanced
# WebDAV on /dav (read‑only by default)
gofs --enable-webdav
You can expose one or more directories. Format: [path:]dir[:ro][:name]
# Single dir (default is ".")
gofs -d /srv/files
# Multiple mounts with names and read‑only flags
gofs -d "/data:/srv:ro:Data" -d "/logs:/var/log::Logs"
Every listing can be JSON by sending: Accept: application/json
curl -H "Accept: application/json" http://localhost:8000/
- HTTP: /healthz and /readyz (200 OK)
- CLI: gofs --health-check
Flags have GOFS_* env twins (flags win):
- GOFS_PORT, GOFS_HOST, GOFS_DIR (semicolon‑separated for multiple)
- GOFS_THEME, GOFS_SHOW_HIDDEN, GOFS_AUTH, GOFS_ENABLE_WEBDAV
- GOFS_LOG_LEVEL (debug/info/warn/error), GOFS_ENV (production for JSON logs)
See examples for Docker and Kubernetes manifests.
MIT. See LICENSE.