Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
Syfaro b6199efe05 Fix missing EXPOSE in Dockerfile. pirms 8 mēnešiem
.github doc: update cover image pirms 1 gada
ci Check fmt in travis pirms 1 gada
pkg/brew v0.0.3 homebrew package [ci skip] pirms 1 gada
src Only render index.html when it exists. pirms 8 mēnešiem
.appveyor.yml v0.0.2 pirms 1 gada
.dockerignore Add Dockerfile. pirms 8 mēnešiem
.drone.yml Add .drone.yml. pirms 8 mēnešiem
.gitignore update dependencies pirms 1 gada
.travis.yml build: add code coverage [skip appveyor] pirms 1 gada add changelog [ci skip] pirms 1 gada
Cargo.lock feat: request/response logger pirms 1 gada
Cargo.toml feat: request/response logger pirms 1 gada
Dockerfile Fix missing EXPOSE in Dockerfile. pirms 8 mēnešiem
HomebrewFormula add homebrew formula pirms 1 gada
LICENSE-APACHE relicense under MIT/Apache-2.0 dual licenses pirms 1 gada
LICENSE-MIT relicense under MIT/Apache-2.0 dual licenses pirms 1 gada Update pirms 1 gada


sfz on Dependency status

Linux build status Windows build status Code coverage Line of code

sfz, or Static File Zerver, is a simple command-line tool serving static files for you.

The name sfz is derived from an accented note Sforzando in music, which means “suddenly with force.”


  • Directory listing
  • Partial responses (range requests)
  • Conditional requests with cache validations
  • Cross-origin resource sharing
  • Automatic HTTP compression (Brotli, Gzip, Deflate)
  • Automatic rendering index.html
  • Respect .gitignore file




If you are a macOS Homebrew user, you can install sfz from a custom tap:

brew tap weihanglo/sfz
brew install sfz

Disclaimer: Formula on Linuxbrew did not fully tested.


If you are a Rust programmer, sfz are available on via Cargo.

cargo install sfz

You can also install the latest version (or a specific commit) of sfz directly from GitHub.

cargo install --git


Prebuilt binaries

Archives of prebuilt binaries are available on GitHub Release for Linux, maxOS and Windows. Download a compatible binary for your system. For convenience, make sure you place sfz under $PATH if you want access it from the command line.

Build from source

sfz is written in Rust. You need to install Rust in order to compile it.

$ git clone
$ cd sfz
$ cargo build --release
$ ./target/release/sfz --version


The simplest way to start serving files is to run this command:

sfz [FLAGS] [OPTIONS] [path]

The command above will start serving your current working directory on by default.

If you want to serve another directory, pass [path] positional argument in with either absolute or relaitve path.

sfz /usr/local

# Serve files under `/usr/local` directory.

Flags and Options

sfz aims to be simple but configurable. Here is a list of available options:

    sfz [FLAGS] [OPTIONS] [path]

    -a, --all             Serve hidden and dot (.) files
    -C, --cors            Enable Cross-Origin Resource Sharing from any origin (*)
    -L, --follow-links    Follow symlinks outside current serving base path
    -h, --help            Prints help information
    -I, --no-ignore       Don't respect gitignore file
        --no-log          Don't log any request/response information.
    -r, --render-index    Render index.html when requesting a directory.
    -Z, --unzipped        Disable HTTP compression
    -V, --version         Prints version information

    -b, --bind <address>     Specify bind address [default:]
    -c, --cache <seconds>    Specify max-age of HTTP caching in seconds [default: 0]
    -p, --port <port>        Specify port to listen on [default: 5000]

    <path>    Path to a directory for serving files [default: .]


Contributions are highly appreciated! Feel free to open issues or send pull requests directly.


sfz was originally inspired by another static serving tool serve, and sfz's directory-listing UI is mainly borrowed from GitHub.

sfz is built on the top of awesome Rust community. Thanks for all Rust and crates contributors.


This project is licensed under either of

at your option.


Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in sfz by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.