Serve any directory. Static file server that is fast, zero-config, and a single binary with support for live reload, TLS, SPAs, uploads, and more.
Download the latest release for Windows, macOS, Linux, or other platforms from Releases.
Or with Go:
go install github.com/peteretelej/dserve/v3@latestdserve # Serve current directory
dserve --dir ./public # Serve specific directory
dserve --live # With live reloadVisit http://localhost:9011
- Zero config - Works out of the box
- HTTPS - Auto-generated TLS certificates (
-tls) - Live reload - Browser refresh on file changes (
-live) - SPA mode - Fallback routing for React/Vue/etc (
-spa) - File uploads - Drag & drop via web UI (
-upload) - Directory download - Download folders as zip (
-zip) - Compression - Gzip for text content (
-compress) - Basic auth - Password protection (
-basicauth) - Web UI - Modern directory listing with dark mode (
-webui)
# Development with live reload
dserve --live
# Single-page application
dserve --spa --live
# Share files on local network
dserve --webui --upload --zip
# Secure with HTTPS (self-signed) and auth
dserve --tls --basicauth admin:secret123
# Custom TLS certificates
dserve --tls --tls-cert server.crt --tls-key server.keydserve -help
-basicauth string
basic auth credentials (user:pass)
-compress
enable gzip compression
-dir string
directory to serve (default "./")
-dotfiles
show and allow access to dotfiles (use with caution)
-live string
enable live reload with watch pattern (default: * if flag present)
-local
serve on localhost only
-max-size string
maximum upload size (default "100MB")
-port int
port to serve on (default 9011)
-spa string
enable SPA mode with fallback file (default: index.html if flag present)
-timeout duration
server timeout (default 3m0s)
-tls
enable HTTPS
-tls-cert string
TLS certificate file
-tls-key string
TLS key file
-upload
enable file uploads
-upload-dir string
upload destination directory
-webui
enable web UI for directory listing
-zip
enable directory download as zip
See docs/design.md for technical details.
- Go 1.21+ (for building from source)
- Windows 10+ / macOS / Linux
Windows 7/8 users: use v2.2.4
MIT