Description
miniserve is a small, self-contained command-line tool that serves files and directories over HTTP. It is a single cross-platform binary, so you can grab it and share a folder or a file right away, which the author describes as a quicker route than setting up a proper web server. You point it at a directory, and it shows a file listing that visitors can browse, or you point it at a single file to serve it directly. It can serve a custom index page instead of the listing, and it can run a single-page application by sending unknown paths to the app's router. Access can be protected with a username and password, given on the command line, as a hash, or read from a file with one login per line. A random six-digit route can be generated so the address is hard to guess, and the server can bind to several network interfaces at once. Custom response headers can be added, and TLS is supported with a certificate and key, including a full chain and HTTP Strict Transport Security. Uploads are supported with the -u option, which can be limited to specific paths, and the README shows how to upload a file with curl. The project is hosted on GitHub.…
Highlights
- Serve a folder or single file over HTTP
- Username and password protection
- TLS and custom headers
- Random routes and multiple interfaces
- Uploads with the -u option
Ratings & Reviews
No ratings yet
Be the first to rate miniserve.
People also visit
Go Http File Server
Simple command line based HTTP file server to share local file system
Microbin
A secure, configurable file-sharing and URL shortening web app written in Rust
copyparty
Portable file server with accelerated resumable uploads, deduplication, WebDAV
miniserve FAQ
What is miniserve?
A small command-line tool that serves files and folders over HTTP from a single binary.
How do I serve a folder?
Run miniserve with the folder path, for example miniserve linux-distro-collection/.
Can I require a password?
Yes. Use --auth with a username and password, a hash, or an auth file with one login per line.
Does it support HTTPS?
Yes. Use --tls-cert and --tls-key, and a full-chain certificate with HSTS is supported.
Can visitors upload files?
With the -u option, which can be restricted to certain paths. The README shows an example upload with curl.
Can it serve a single-page app?
Yes. The --spa option forwards unknown paths to the app's router.
What are the best miniserve alternatives?
Popular alternatives to miniserve include Go Http File Server, Updog and Dufs. See all miniserve alternatives
