miniserve
A CLI tool to serve files and directories over HTTP — instantly, with no configuration.
miniserve is a small, self-contained binary that lets you serve a directory or
a single file over HTTP from your terminal in seconds. No configuration files,
no dependencies, no setup — just point it at a path and go.
Features
- Zero config — one command to serve any directory or file
- File upload support — optionally allow clients to upload files via the browser UI
- Authentication — protect the server with HTTP basic auth
- QR code — prints a QR code in the terminal so mobile devices can connect instantly
- Directory listing — clean, navigable HTML UI out of the box
- TLS support — serve over HTTPS with a provided certificate
- Archive download — let clients download an entire directory as a
.taror.zip - Single binary — no runtime dependencies, easy to copy anywhere
Installation
cargo install miniserve
Or via package manager:
# Debian / Ubuntu (Debian 12+)
apt install miniserve
# Fedora
dnf install miniserve
# Arch Linux
pacman -S miniserve
# macOS
brew install miniserve
# Nix
nix-env -iA nixpkgs.miniserveUsage
# Serve the current directory on port 8080
miniserve .
# Serve a specific directory
miniserve /path/to/files
# Serve a single file
miniserve archive.tar.gz
# Allow file uploads
miniserve --upload-files .
# Require a username and password
miniserve --auth user:password .
# Show a QR code for easy mobile access
miniserve --qrcode .
# Serve on a specific port and bind address
miniserve --port 9000 --interfaces 0.0.0.0 .
# Enable HTTPS
miniserve --tls-cert cert.pem --tls-key key.pem .Why miniserve over Python's http.server?
The classic python3 -m http.server is convenient but limited — no upload
support, no auth, no TLS, and noticeably slower. miniserve covers all of those
cases with a single Rust binary that starts up instantly and handles concurrent
connections efficiently.