miniserve(1)

NAME
miniserve - For when you really just want to serve some files over HTTP right now!

SYNOPSIS
miniserve [-v|--verbose] [--temp-directory] [--index] [--spa] [--quiet] [--pretty-urls] [-p|--port] [-i|--interfaces] [-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]

DESCRIPTION
For when you really just want to serve some files over HTTP right now!

OPTIONS

-v, --verbose
    Be verbose, includes emitting access logs
    May also be specified with the MINISERVE_VERBOSE environment variable.

--temp-directory <TEMP_UPLOAD_DIRECTORY>
    The path to where file uploads will be written to before being moved to their correct location. It's wise to make sure that this directory will be written to disk and not into memory. This value will only be used **IF** file uploading is enabled. If this option is not set, the operating system default temporary directory will be used.
    May also be specified with the MINISERVER_TEMP_UPLOAD_DIRECTORY environment variable.

--index <INDEX>
    The name of a directory index file to serve, like "index.html" Normally, when miniserve serves a directory, it creates a listing for that directory. However, if a directory contains this file, miniserve will serve that file instead.
    May also be specified with the MINISERVE_INDEX environment variable.

--spa
    Activate SPA (Single Page Application) mode This will cause the file given by --index to be served for all non-existing file paths. In effect, this will serve the index file whenever a 404 would otherwise occur in order to allow the SPA router to handle the request instead.
    May also be specified with the MINISERVE_SPA environment variable.

--quiet
    Reduce output and silence warnings
    May also be specified with the MINISERVE_QUIET environment variable.

--pretty-urls
    Activate Pretty URLs mode This will cause the server to serve the equivalent `.html` file indicated by the path. `/about` will try to find `about.html` and serve it.
    May also be specified with the MINISERVE_PRETTY_URLS environment variable.

-p, --port <PORT> [default: 8080]
    Port to use
    May also be specified with the MINISERVE_PORT environment variable.

-i, --interfaces <INTERFACES>
    Interface to listen on
    May also be specified with the MINISERVE_INTERFACE environment variable.

-a, --auth <AUTH>
    Set authentication Currently supported formats: username:password, username:sha256:hash, username:sha512:hash (e.g. joe:123, joe:sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3)
    May also be specified with the MINISERVE_AUTH environment variable.

--auth-file <AUTH_FILE>
    Read authentication values from a file Example file content: joe:123 bob:sha256:a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3 bill:
    May also be specified with the MINISERVE_AUTH_FILE environment variable.

--route-prefix <ROUTE_PREFIX>
    Use a specific route prefix
    May also be specified with the MINISERVE_ROUTE_PREFIX environment variable.

--random-route
    Generate a random 6-hexdigit route
    May also be specified with the MINISERVE_RANDOM_ROUTE environment variable.

-P, --no-symlinks
    Hide symlinks in listing and prevent them from being followed
    May also be specified with the MINISERVE_NO_SYMLINKS environment variable.

-H, --hidden
    Show hidden files
    May also be specified with the MINISERVE_HIDDEN environment variable.

-S, --default-sorting-method <DEFAULT_SORTING_METHOD> [default: name]
    Default sorting method for file list
    Possible values:

    •   name: Sort by name

    •   size: Sort by size

    •   date: Sort by last modification date (natural sort: follows alphanumerical order)
    May also be specified with the MINISERVE_DEFAULT_SORTING_METHOD environment variable.

-O, --default-sorting-order <DEFAULT_SORTING_ORDER> [default: desc]
    Default sorting order for file list
    Possible values:

    •   asc: Ascending order

    •   desc: Descending order
    May also be specified with the MINISERVE_DEFAULT_SORTING_ORDER environment variable.

-c, --color-scheme <COLOR_SCHEME> [default: squirrel]
    Default color scheme
    [possible values: squirrel, archlinux, zenburn, monokai]
    May also be specified with the MINISERVE_COLOR_SCHEME environment variable.

-d, --color-scheme-dark <COLOR_SCHEME_DARK> [default: archlinux]
    Default color scheme
    [possible values: squirrel, archlinux, zenburn, monokai]
    May also be specified with the MINISERVE_COLOR_SCHEME_DARK environment variable.

-q, --qrcode
    Enable QR code display
    May also be specified with the MINISERVE_QRCODE environment variable.

-u, --upload-files [<ALLOWED_UPLOAD_DIR>]
    Enable file uploading (and optionally specify for which directory) The provided path is not a physical file system path. Instead, 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'. When specified via environment variable, a path always needs to be specified.
    May also be specified with the MINISERVE_ALLOWED_UPLOAD_DIR environment variable.

--web-upload-files-concurrency <WEB_UPLOAD_CONCURRENCY> [default: 0]
    Configure amount of concurrent uploads when visiting the website. Must have upload-files option enabled for this setting to matter. For example, a value of 4 would mean that the web browser will only upload 4 files at a time to the web server when using the web browser interface. When the value is kept at 0, it attempts to resolve all the uploads at once in the web browser. NOTE: Web pages have a limit of how many active HTTP connections that they can make at one time, so even though you might set a concurrency limit of 100, the browser might only make progress on the max amount of connections it allows the web page to have open.
    May also be specified with the MINISERVE_WEB_UPLOAD_CONCURRENCY environment variable.

--chmod <CHMOD>
    Set unix file permissions of uploaded files This takes an octal number, for example 0600. By default 0666 & ~umask is used to simulate the system's default behavior.
    May also be specified with the MINISERVE_CHMOD environment variable.

--directory-size
    Enable recursive directory size calculation This is disabled by default because it is a potentially fairly IO intensive operation.
    May also be specified with the MINISERVE_DIRECTORY_SIZE environment variable.

-U, --mkdir
    Enable creating directories
    May also be specified with the MINISERVE_MKDIR_ENABLED environment variable.

--pastebin
    Enable creating pastebin 'pastes' 'pastes' are plaintext files created in the current directory. Creation requires file uploads be enabled.
    May also be specified with the MINISERVE_PASTEBIN_ENABLED environment variable.

-m, --media-type <MEDIA_TYPE>
    Specify uploadable media types
    [possible values: image, audio, video]
    May also be specified with the MINISERVE_MEDIA_TYPE environment variable.

-M, --raw-media-type <MEDIA_TYPE_RAW>
    Directly specify the uploadable media type expression
    May also be specified with the MINISERVE_RAW_MEDIA_TYPE environment variable.

-o, --on-duplicate-files <ON_DUPLICATE_FILES> [default: error]
    What to do if existing files with same name is present during file upload If you enable renaming files, the renaming will occur by adding a numerical suffix to the filename before the final extension. For example file.txt will be uploaded as file-1.txt, the number will be increased until an available filename is found.
    [possible values: error, overwrite, rename]
    May also be specified with the MINISERVE_ON_DUPLICATE_FILES environment variable.

-R, --rm-files [<ALLOWED_RM_DIR>]
    Enable file and directory deletion (and optionally specify for which directory)
    May also be specified with the MINISERVE_ALLOWED_RM_DIR environment variable.

-r, --enable-tar
    Enable uncompressed tar archive generation
    May also be specified with the MINISERVE_ENABLE_TAR environment variable.

-g, --enable-tar-gz
    Enable gz-compressed tar archive generation
    May also be specified with the MINISERVE_ENABLE_TAR_GZ environment variable.

-z, --enable-zip
    Enable zip archive generation WARNING: Zipping large directories can result in out-of-memory exception because zip generation is done in memory and cannot be sent on the fly
    May also be specified with the MINISERVE_ENABLE_ZIP environment variable.

-C, --compress-response
    Compress response WARNING: Enabling this option may slow down transfers due to CPU overhead, so it is disabled by default. Only enable this option if you know that your users have slow connections or if you want to minimize your server's bandwidth usage.
    May also be specified with the MINISERVE_COMPRESS_RESPONSE environment variable.

-D, --dirs-first
    List directories first
    May also be specified with the MINISERVE_DIRS_FIRST environment variable.

-t, --title <TITLE>
    Shown instead of host in page title and heading
    May also be specified with the MINISERVE_TITLE environment variable.

--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 previously inserted, it will not be overwritten.)
    May also be specified with the MINISERVE_HEADER environment variable.

-l, --show-symlink-info
    Visualize symlinks in directory listing
    May also be specified with the MINISERVE_SHOW_SYMLINK_INFO environment variable.

-F, --hide-version-footer
    Hide version footer
    May also be specified with the MINISERVE_HIDE_VERSION_FOOTER environment variable.

--hide-theme-selector
    Hide theme selector
    May also be specified with the MINISERVE_HIDE_THEME_SELECTOR environment variable.

-W, --show-wget-footer
    If enabled, display a wget command to recursively download the current directory
    May also be specified with the MINISERVE_SHOW_WGET_FOOTER environment variable.

--print-completions <shell>
    Generate completion file for a shell
    [possible values: bash, elvish, fish, powershell, zsh]

--print-manpage
    Generate man page

--tls-cert <TLS_CERT>
    TLS certificate to use
    May also be specified with the MINISERVE_TLS_CERT environment variable.

--tls-key <TLS_KEY>
    TLS private key to use
    May also be specified with the MINISERVE_TLS_KEY environment variable.

--readme
    Enable README.md rendering in directories
    May also be specified with the MINISERVE_README environment variable.

-I, --disable-indexing
    Disable indexing This will prevent directory listings from being generated and return an error instead.
    May also be specified with the MINISERVE_DISABLE_INDEXING environment variable.

--enable-webdav
    Enable read-only WebDAV support (PROPFIND requests)
    May also be specified with the MINISERVE_ENABLE_WEBDAV environment variable.

--size-display <SIZE_DISPLAY> [default: human]
    Show served file size in exact bytes
    [possible values: human, exact]
    May also be specified with the MINISERVE_SIZE_DISPLAY environment variable.

--file-external-url <FILE_EXTERNAL_URL>
    Optional external URL (e.g., 'http://external.example.com:8081') prepended to file links in listings. Allows serving files from a different URL than the browsing instance. 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.
    May also be specified with the MINISERVE_FILE_EXTERNAL_URL environment variable.

--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: auto, always, never]
    May also be specified with the MINISERVE_LOG_COLOR environment variable.

-h, --help
    Print help (see a summary with '-h')

-V, --version
    Print version

[PATH]
    Which path to serve
    May also be specified with the MINISERVE_PATH environment variable.

VERSION
v0.33.0

AUTHORS
Sven-Hendrik Haase <svenstaro@gmail.com>, Boastful Squirrel <boastful.squirrel@gmail.com>