miniserve(1)
๐ miniserve(1) ๐
okay so this is the General Commands Manual page for miniserve, bestie. it's giving "tiny http server that ate and left no crumbs" energy and honestly? we're obsessed. here's everything you need, no cap. ๐ซถ
๐ธ NAME ๐ธ
miniserve โ for when you really just want to serve some files over HTTP right now! ๐
like literally. right now. that's the whole vibe. she's not complicated, she's not doing too much, she's just serving. ๐
๐ SYNOPSIS ๐
miniserve [-v|--verbose] [--temp-directory] [--index] [--spa] [--quiet]
[--pretty-urls] [-p|--port] [-i|--interfaces] [--workers] [-a|--auth]
[--auth-file] [--route-prefix] [--random-route] [-P|--no-symlinks]
[-H|--hidden] [-S|--default-sorting-method] [-O|--default-sorting-order]
[-c|--color-scheme] [-d|--color-scheme-dark] [-q|--qrcode]
[-u|--upload-files] [--web-upload-files-concurrency] [--chmod]
[--directory-size] [-U|--mkdir] [--pastebin] [-m|--media-type]
[-M|--raw-media-type] [-o|--on-duplicate-files] [-R|--rm-files]
[-r|--enable-tar] [-g|--enable-tar-gz] [-z|--enable-zip]
[-C|--compress-response] [-D|--dirs-first] [-t|--title] [--header]
[-l|--show-symlink-info] [-F|--hide-version-footer]
[--hide-theme-selector] [-W|--show-wget-footer] [--print-completions]
[--print-manpage] [--tls-cert] [--tls-key] [--readme]
[-I|--disable-indexing] [--enable-webdav] [--size-display]
[--file-external-url] [--log-color] [-h|--help] [-V|--version] [PATH]
that's the whole fit check. every single flag, no skips, no "you don't need this one". โจ
๐ DESCRIPTION ๐
for when you really just want to serve some files over HTTP right now!
that's it. that's the mission statement. no thirty-step setup arc, no config file trauma, no main-character-itis from some other server. you point miniserve at a directory (or don't โ it'll figure it out, see [PATH] up there ๐) and boom ๐ฅ there's a file listing on the other side. iconic behavior honestly.
like... you could be doing literally anything else with your life and instead you're in a terminal typing one command and now your files have a URL. that's the whole plot twist. ๐ฆ
okay but fr fr, there are a ton of options hiding behind that synopsis, and we're getting into all of them โ every flag, every default, every env var, every warning, all of it. nothing gets left on read. ๐
๐ซถ to be continued... ๐
โจ OPTIONS โจ
okay bestie, this is the big one, the whole menu of vibes you can hand to miniserve. every single flag, no skips, no shortcuts, periodt. ๐
-v,--verboseโ be loud about what's happening, and yeah that includes spitting out access logs so you can see who's knocking.--temp-directory <TEMP_UPLOAD_DIRECTORY>โ where uploaded files get parked before they're moved to their forever home. ngl it's wise to make sure this directory actually writes to disk and not into memory, because surprise, memory is not a filing cabinet.
this value only gets used IF file uploading is turned on. if you don't set it, the OS's default temporary directory gets the job instead.
--index <INDEX>โ the name of a directory index file to serve, like"index.html".
so normally, when miniserve serves a directory, it just makes a listing for it, cute little browse vibe. but if that directory contains this file, miniserve serves that file instead. slay.
--spaโ activates SPA (Single Page Application) mode.
this makes the file you gave to --index get served for all non-existing file paths. basically, whenever a 404 would've happened, it serves the index file instead so the SPA router can handle the request itself. the 404 could never. ๐
--quietโ less output, and it shushes the warnings. it's givingโฆ silence, on purpose.--pretty-urlsโ activates Pretty URLs mode.
this makes the server serve the equivalent .html file that the path is pointing at. so:
/about will try to find about.html and serve it. โจ
-p,--port <PORT>[default:8080] โ the port to use. that's it, that's the whole thing.-i,--interfaces <INTERFACES>โ which interface to listen on.--workers <WORKERS>[default:4] โ how many server workers you want grinding. yes bestie, we're working.-a,--auth <AUTH>โ set authentication, i.e. put a little lock on the door.
the formats supported rn: username:password, username:sha256:hash, username:sha512:hash. for example: joe:123, joe:sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3. ๐
--auth-file <AUTH_FILE>โ read your authentication values from a file instead, so your secrets don't live directly on the command line where everyone can see them.
example file content:
joe:123
bob:sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3
bill:
(yes, bill: with nothing after it. that's allowed, we don't judge bill.)
--route-prefix <ROUTE_PREFIX>โ use a specific route prefix. make it yours. ๐--random-routeโ generates a random 6-hexdigit route. chaotic, unguessable, iconic.-P,--no-symlinksโ hides symlinks from the listing AND prevents them from being followed. they're not invited to this party.-H,--hiddenโ show hidden files. the ones with the little dot. we see them now. ๐ซฃ-S,--default-sorting-method <DEFAULT_SORTING_METHOD>[default:name] โ the default way the file list gets sorted.
possible values:
name: sort by namesize: sort by sizedate: sort by last modification date (natural sort: follows alphanumerical order)
-O,--default-sorting-order <DEFAULT_SORTING_ORDER>[default:desc] โ the default sorting order for the file list.
possible values:
asc: ascending orderdesc: descending order
-c,--color-scheme <COLOR_SCHEME>[default:squirrel] โ the default color scheme. aesthetic matters, fr fr.
possible values:
squirrelarchlinuxayu-darkzenburnmonokai
-d,--color-scheme-dark <COLOR_SCHEME_DARK>[default:archlinux] โ default color scheme, but for dark mode hours. ๐
possible values:
squirrelarchlinuxayu-darkzenburnmonokai
-q,--qrcodeโ enable QR code display, so you can beam the URL to your phone like a lil magical girl. ๐ฑโจ-u,--upload-files [<ALLOWED_UPLOAD_DIR>]โ enable file uploading, and optionally say which directory people can upload into.
okay important detail: the path you provide here is not a physical file system path. it's relative to the serve dir. for instance, if the serve dir is /home/hello, set this to /upload to allow uploading to /home/hello/upload. and heads up โ when you specify it via an environment variable, a path always needs to be specified.
--web-upload-files-concurrency <WEB_UPLOAD_CONCURRENCY>[default:0] โ how many uploads can happen at the same time when someone's using the website. you need the upload-files option enabled for this to even matter.
for example, a value of 4 would mean the web browser only uploads 4 files at a time to the web server when using the browser interface.
when the value stays at 0, it attempts to resolve all the uploads at once in the web browser.
NOTE: web pages have a limit on how many active HTTP connections they can make at one time, so even if you set a concurrency limit of 100, the browser might only make progress on the max amount of connections it's allowed to have open for that page. browser said "i have limits bestie". ๐
--chmod <CHMOD>โ set unix file permissions for uploaded files.
this takes an octal number, for example 0600. by default 0666 & ~umask is used, to simulate the system's default behavior.
--directory-sizeโ enable recursive directory size calculation.
this is disabled by default because it's a potentially fairly IO intensive operation. it's giving heavy lifting, so we keep it off unless you ask. ๐ฎโ๐จ
-U,--mkdirโ enable creating directories. build your little folder empire.--pastebinโ enable creating pastebin 'pastes'.
'pastes' are plaintext files created in the current directory. creating them requires file uploads to be enabled.
-m,--media-type <MEDIA_TYPE>โ specify which media types are uploadable.
possible values:
imageaudiovideo
-M,--raw-media-type <MEDIA_TYPE_RAW>โ directly specify the uploadable media type expression. you're bypassing the vibes and writing the raw thing yourself. respect.-o,--on-duplicate-files <ON_DUPLICATE_FILES>[default:error] โ what to do when a file with the same name already exists during upload.
if you enable renaming files, the renaming happens by adding a numerical suffix to the filename before the final extension. for example file.txt will be uploaded as file-1.txt, and the number keeps increasing until an available filename is found. cute, right?
possible values:
erroroverwriterename
-R,--rm-files [<ALLOWED_RM_DIR>]โ enable file and directory deletion, and optionally specify which directory that's allowed in. with great power etc etc. โ ๏ธ-r,--enable-tarโ enable uncompressed tar archive generation.-g,--enable-tar-gzโ enable gz-compressed tar archive generation.-z,--enable-zipโ enable zip archive generation.
WARNING: zipping large directories can result in an out-of-memory exception, because zip generation is done in memory and cannot be sent on the fly. so likeโฆ small zips only bestie, we're begging. ๐ญ
-C,--compress-responseโ compress the response.
WARNING: enabling this option may slow down transfers due to CPU overhead, so it's disabled by default.
only enable this option if you know your users have slow connections, or if you want to minimize your server's bandwidth usage. otherwise you're just making the CPU do cardio for no reason.
-D,--dirs-firstโ list directories first. folders get the front row seats. ๐-t,--title <TITLE>โ shown instead of the host in the page title and heading. rename your whole vibe.--header <HEADER>โ inserts custom headers into the responses. specify each header as a'Header:Value'pair. this parameter can be used multiple times to add multiple headers.
example: --header "Header1:Value1" --header "Header2:Value2" (if a header is already set or was previously inserted, it will not be overwritten.)
-l,--show-symlink-infoโ visualize symlinks in the directory listing. we love a transparent queen. ๐ฆ-F,--hide-version-footerโ hide the version footer.--hide-theme-selectorโ hide the theme selector.-W,--show-wget-footerโ if enabled, display awgetcommand to recursively download the current directory.--print-completions <shell>โ generate a completion file for a shell.
possible values:
bashelvishfishpowershellzsh
--print-manpageโ generate man page. she's self-aware. ๐--tls-cert <TLS_CERT>โ the TLS certificate to use.--tls-key <TLS_KEY>โ the TLS private key to use.--readmeโ enableREADME.mdrendering in directories. finally, your readme gets its main character moment.-I,--disable-indexingโ disable indexing.
this will prevent directory listings from being generated and return an error instead. no peeking. ๐
--enable-webdavโ enable read-only WebDAV support (PROPFIND requests).--size-display <SIZE_DISPLAY>[default:human] โ show served file size inโฆ well, that depends.
possible values:
humanexact
--file-external-url <FILE_EXTERNAL_URL>โ optional external URL (e.g.,'http://external.example.com:8081') prepended to file links in listings.
this allows serving files from a different URL than the browsing instance. super useful for setups like: one authenticated instance for browsing, linking files (via this option) to a second, non-indexed (-I) instance for direct downloads. this obscures the full file list on the download server, while users can still copy direct file URLs for sharing. the external URL is put verbatim in front of the relative location of the file, including the protocol. the user should take care this results in a valid URL โ no further checks are being done. so like, that's on you. ๐
--log-color <LOG_COLOR>[default:auto] โ set the color style of the log output.
"auto" (default) enables colors only when the output is a terminal. "always" always enables colors. "never" always disables colors.
possible values:
autoalwaysnever
-h,--helpโ print help (see a summary with'-h').-V,--versionโ print version.[PATH]โ which path to serve. the whole point, honestly. ๐
๐ VERSION ๐
v0.35.0 โ that's the one, bestie.
๐ AUTHORS ๐
- Sven-Hendrik Haase
<svenstaro@gmail.com> - Boastful Squirrel
<boastful.squirrel@gmail.com>
and that's the whole page, we ate and left no crumbs. ๐ this was miniserve version 0.35.0, documented as miniserve(1) โ go forth and serve files, you gorgeous genius. no cap. ๐ซถโจ
๐ฆ where this page comes from
- alpine 3.24: miniserve-doc 0.35.0-r0 ยท MIT
- arch rolling: miniserve 0.35.0-1 ยท MIT
- nixos 26.05: miniserve 0.35.0
- nixpkgs unstable: miniserve 0.35.0
- ubuntu stonking: miniserve 0.35.0-4 ยท MIT
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms