What Is miniserve? The Beginner's Guide to Sharing Files Over HTTP in One Command
CodexFuse Team · 2026-11-05T00:26:38.992Z · 10 min read min read
What Is miniserve?
What is miniserve? It is a small, self-contained, cross-platform command-line tool — written in Rust — that lets you "just grab the binary and serve some file(s) via HTTP," in the words of its own README. The project's tagline says it best: "For when you really just want to serve some files over HTTP right now!" This guide covers the definition, the install, the first run, the security flags, and the honest comparison with python -m http.server — all from sources fetched and verified on November 4, 2026.
The classic use case is passing files between machines on the fly: sharing a build artifact from your laptop with a colleague, pulling logs off a server, or handing a folder to another device on your local network — without setting up FTP, SSH accounts, or a full web server. It runs on your machine or on VPS hosting you control. You type one command, the directory becomes browsable in a browser, and when you are done you press Ctrl-C and the server is gone.
How Does miniserve Work?
You point miniserve at a directory or a file, and it immediately starts an HTTP server — on port 8080 by default — serving a tidy file-browser web UI. The README's own examples cover the three starting moves: miniserve linux-distro-collection/ serves a directory, miniserve linux-distro.iso serves a single file, and miniserve . serves the current folder.
The binding behavior matters for security, so know it before you run it. The README's binding section states: "For convenience reasons, miniserve will try to bind on all interfaces by default (if no -i is provided)," and it binds on both IPv4 and IPv6. That means anyone who can reach your machine on port 8080 can see the files. Pass -i 192.168.0.1 to pin it to one interface, and repeat -i to bind several interfaces at once.
Everything it serves is a plain HTTP response — downloads, directory listings, uploads — with "correct MIME types handling out of the box," so videos stream and archives download with the right file type instead of being guessed wrong. Version context for this guide: the current release is 0.35.0 (April 8, 2026, per the project's CHANGELOG), and the project's GitHub repository shows about 8,088 stars with an MIT license as of November 4, 2026.
How to Install miniserve
Installation is a "grab the binary" affair because miniserve ships as a single binary drop-in with no extra dependencies required. The README's official routes cover the mainstream paths; every row below is taken verbatim from it.
| Platform | Install command (from the README) |
|---|---|
| Linux (binary) | chmod +x miniserve-linux, then ./miniserve-linux |
| Arch Linux | pacman -S miniserve |
| macOS | brew install miniserve (or grab the prebuilt binary) |
| Windows | scoop install miniserve (or grab the prebuilt binary) |
| Termux (Android) | pkg install miniserve |
| Any, via Rust | cargo install --locked miniserve |
| Docker | docker run -v /tmp:/tmp -p 8080:8080 --rm -it docker.io/svenstaro/miniserve /tmp |
| Snap | sudo snap install miniserve (snapcraft page; service starts disabled on 127.0.0.1:8080) |
| FreeBSD | pkg install miniserve (a port exists; a 2022 forum thread noted it was slightly out of date then) |
For a permanent setup instead of a one-off share, the repo ships a hardened systemd template at packaging/[email protected]; the documented enable line is systemctl enable --now miniserve@-my-serve-path. On FreeBSD, forum users daemonize it with an rc.d script or a crontab @reboot /usr/local/bin/miniserve share/ line, which a user confirmed working in the thread.
Your First miniserve Run in 5 Steps
A first run takes under a minute. Here is the standard arc from a cold machine to a working share.
- Install miniserve using one of the routes above (for example, on Arch:
pacman -S miniserve). - In a terminal, change into the folder you want to share and run
miniserve . - Read the URL it prints. By default it serves on port 8080; the Shells KB install tutorial notes it "will start the server and display a message telling you the URL for accessing it."
- Open that URL in a browser on the other machine. The Shells KB tutorial says you should see "a simple web page with a list of files and folders in the directory you specified."
- When you are done, press Ctrl-C. A FreeBSD forum user sums up the pattern: point it at a directory on the server, pull the file, Ctrl-C and it's off.
Two practical extras for the first run: add -q and miniserve shows a QR code you can scan with a phone to open the share, and add --upload-files if you want the other side to send files back (the upload flow is covered below).
miniserve vs python -m http.server
miniserve wins the comparison everyone makes — and the README says so directly. On Python's built-in server it states: you need to have Python installed, "it's low performance, and also doesn't do correct MIME type handling in some cases." A FreeBSD forum user who tested both put it more simply: with Python, "the only thing people can do with it is: browse and download."
| Capability | miniserve | python -m http.server |
|---|---|---|
| Install | Single binary, no extra dependencies | Requires Python installed |
| Browse and download | Yes, with a themed file-browser UI | Yes, plain listing |
| Upload files | Yes, with the -u/--upload-files flag | No (browse and download only) |
| Authentication | Yes, password or SHA-256/SHA-512 hashed | No |
| Folder archives | Yes, folders download as .tar.gz or .zip generated on the fly | No |
| TLS | Yes, --tls-cert/--tls-key | No |
| MIME types | Correct handling out of the box | "Doesn't do correct MIME type handling in some cases" (README) |
| SPA mode | Yes, --spa forwards missing paths to the router | No |
| Extras | QR code, search/filter, themes, WebDAV, pastebin | No |
One honesty note: no numeric benchmarks exist anywhere for this matchup. The project never published throughput figures, and the only numeric test found this run compared miniserve against a different third-party tool, not Python. Treat "Mega fast and highly parallel" as the project's qualitative claim (credited to Rust and Actix in the README), not a measured speedup ratio.
How to Share Files Securely with miniserve
miniserve is public by default: with no flags it binds all interfaces with no password, so run it open only on a network you trust — and add authentication before it ever touches the internet.
Password protection is one flag: miniserve --auth joe:123 unreleased-linux-distros/ is the README's example. Stronger options exist — username:sha256:hash and username:sha512:hash formats for hashed passwords, or --auth-file to read logins from a file instead of the command line.
Three more hardening moves come from the man page: -i to bind only your LAN interface, --random-route to serve everything under a random 6-hexdigit path, and --tls-cert/--tls-key to wrap the traffic in TLS (TLS support dates back to 0.15.0). The rule of thumb: LAN ad-hoc sharing can run open; anything reachable from the internet gets -a authentication at minimum, and TLS as well.
miniserve Uploads, Deletion, and Extra Features
Uploads are opt-in. Add -u (or --upload-files) and miniserve enables file uploading — optionally restricted to a directory — and you can also allow directory creation with -U/--mkdir or deletion with -R/--rm-files. Note the README's syntax trap: "for uploading, we have to use -- to disambiguate the argument to -u," so a first upload run looks like miniserve -u -- .
Clients can also upload from the command line with curl, using the README's recipe: curl -F "path=@$FILE" http://localhost:8080/upload\?path\=/. A handy mobile trick from the README is miniserve -u -m image -q: the media-type hint limits uploads to images while the QR code opens the share on a phone, whose browser then offers its camera app.
Around the edges, miniserve is surprisingly full-featured for a one-command tool: --pastebin turns it into a plaintext paste service, --readme renders README.md files in directories, --spa with --index serves single-page apps, --enable-webdav adds read-only WebDAV, and --show-wget-footer prints a copy-paste wget command for recursive downloads. A health check lives at /__miniserve_internal/healthcheck, uploads can be capped with --web-upload-files-concurrency, duplicates are handled by -o (error, overwrite, or rename), and the features list also advertises themes, range requests, shell completions, and "sane and secure defaults."
When Not to Use miniserve
miniserve serves — it is an ad-hoc file server, not a sync tool and not a permanent host. If you need two folders kept in sync over time, reach for rsync, which is built for exactly that; miniserve only ever serves what is on disk right now.
A FreeBSD forum maintainer states the project's scope plainly: "miniserve's purpose is to share files. Nothing more, nothing less." For persistent serving the README ships a systemd unit and the snap package runs as a background service — but the tool's design center is grab, share, stop.
One pairing habit pays off before you share: check what is eating the disk with the dust disk usage analyzer, verify the filesystem view with the dysk filesystem viewer, and for very large transfers over slow links run a network speed test first so you know what throughput to expect.
Sources
- GitHub — svenstaro/miniserve README: project definition and tagline, all How-to examples, the 19-feature list, binding behavior, install routes, upload recipes, the Python comparison, repo metadata (about 8,088 stars, MIT license, created 2018-04-26 — seen November 4, 2026).
- GitHub — svenstaro/miniserve CHANGELOG: version history including 0.35.0 (2026-04-08), and the dates of TLS, SPA, WebDAV, and other feature releases.
- docs.rs — miniserve 0.22.0 crate page: registry tagline and the author credits (Sven-Hendrik Haase and Boastful Squirrel).
- man.archlinux.org — miniserve(1) manual page (v0.35.0): full flag documentation used for the auth, archive, TLS, and upload sections.
- Shells KB — miniserve on EndeavourOS: the Arch install flow and first-run description.
- snapcraft.io — Install miniserve: snap install line, the background-service defaults, and the license note.
- FreeBSD Forums — miniserve thread 86504: the "share files, nothing more, nothing less" scope verdict, the rc.d/@reboot daemonizing recipes, and the Python comparison observation.
- ModernCLI — ModernCLI: the third-party "replaces the classic python -m http.server" description.
- lobste.rs — srv benchmark thread: consulted only to establish that no miniserve-vs-Python numeric benchmark exists (its numbers compare a different tool).
Frequently Asked Questions
Is miniserve safe to expose to the internet?
It can be, with the right flags — but not as a bare miniserve .. The defaults bind all interfaces with no password, which is fine on a trusted LAN and dangerous on the open internet. For internet use, add -a authentication (prefer hashed passwords or --auth-file), pin the bind address with -i, consider --random-route, and wrap it in TLS with --tls-cert/--tls-key. The features list claims "sane and secure defaults," but sane here means convenient — hardening is still your job.
How is miniserve different from python -m http.server?
Python's server browses and downloads only; miniserve adds uploads, authentication, on-the-fly .tar.gz/.zip folder downloads, TLS, correct MIME types, QR codes, SPA mode, and themes. Its README also flags Python's server as lower-performance with inconsistent MIME handling. And miniserve is a single dependency-free binary, so it runs anywhere without Python installed.
How do I upload files with miniserve?
Start it with the upload flag — and remember the -- separator: miniserve -u -- . enables uploads into the current directory. The web UI then shows an upload button; you can restrict uploads to a subdirectory, allow directory creation with -U/--mkdir, or upload from a script with the README's curl recipe. Uploads land in a temp directory before being moved, configurable with --temp-directory.
Does miniserve work on Windows and macOS?
Yes — it is a cross-platform single binary. The README lists prebuilt binaries for both, plus brew install miniserve on macOS and scoop install miniserve on Windows, alongside Linux, Termux, Docker, snap, and a FreeBSD port. One caveat from the README: TLS is available "for supported architectures," so check the release notes for your platform.
miniserve or rsync — which should I use?
Different jobs. miniserve is for ad-hoc sharing: you expose a folder over HTTP so a browser can download it right now, with no accounts needed on the other side. rsync is for syncing: keeping two directory trees identical over time, efficiently, usually over SSH. If the question is "how do I hand someone this folder," use miniserve; if it is "how do I keep these machines in sync," use rsync.

