Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
S

static-web-server

> DevOps
Open source

A cross-platform, high-performance and asynchronous web server for static files-serving. ⚡

2.3K stars0 likes1 views
WebsiteGitHub

About

A cross-platform, high-performance and asynchronous web server for static files-serving. ⚡

Static Web Server

A cross-platform, high-performance and asynchronous web server for static file-serving ⚡

## Overview > [!NOTE] > This is the upcoming **v3**, currently in development. For production use, see **[v2 (LTS)](https://github.com/static-web-server/static-web-server/tree/2.x)**. **Static Web Server** (**SWS**) is a small, fast, production-ready web server for static file-serving that prioritizes simplicity and ease of use while delivering [high performance and safety](https://blog.rust-lang.org/2015/04/10/Fearless-Concurrency.html), powered by [Rust](https://rust-lang.org). Built on [Hyper](https://github.com/hyperium/hyper) and [Tokio](https://github.com/tokio-rs/tokio) to deliver efficient and performant [asynchronous I/O](https://rust-lang.github.io/async-book/01_getting_started/02_why_async.html) and HTTP/1-2 support with a low resource footprint. SWS is available for a variety of platforms like `Linux`, `macOS`, `Windows`, `FreeBSD`, `NetBSD`, `Android` and `Docker`. ## Features - Built with [Rust](https://rust-lang.org), [memory-safe, fast, and concurrent](https://kornel.ski/rust-c-speed) with low CPU and RAM overhead. - Single __~4 MB__ static binary with zero runtime dependencies ([Musl libc](https://doc.rust-lang.org/edition-guide/rust-2018/platform-and-target-support/musl-support-for-fully-static-binaries.html)). Runs on [any Linux distro](https://en.wikipedia.org/wiki/Linux_distribution) or [Docker container](https://hub.docker.com/r/joseluisq/static-web-server/tags). - Fast, asynchronous static file-serving built on [Hyper](https://github.com/hyperium/hyper/) and [Tokio](https://github.com/tokio-rs/tokio). - On-the-fly compression (Gzip, Deflate, Brotli, Zstandard) for text-based files via [`Accept-Encoding`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding). - Serving of [pre-compressed files](https://static-web-server.net/features/compression/) (`.br`, `.gz`, `.zst`) directly from disk. - Markdown content negotiation to serve `.md` files to clients that [accept](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept) `text/markdown`. - [Byte-range serving](https://en.wikipedia.org/wiki/Byte_serving) for large file delivery. - Optional [Cache-Control](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control) headers and ETag with sensible defaults per file type. - [HTTP/2](https://tools.ietf.org/html/rfc7540) + TLS with automatic [security headers](https://web.dev/security-headers/). - [Graceful shutdown](https://cloud.google.com/blog/products/containers-kubernetes/kubernetes-best-practices-terminating-with-grace) with configurable grace period. - Structured JSON logging (`--log-format`) and file-based log output (`--log-file`). - Configurable thread pool (worker and blocking threads). - Optional [directory listing](https://static-web-server.net/features/directory-listing/) with HTML and JSON output, plus `.tar.gz` download. - [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) with preflight support. - [Basic HTTP authentication](https://static-web-server.net/features/basic-authentication/) (BCrypt). - Custom response headers per file via glob patterns. - [URL rewrites and redirects](https://static-web-server.net/features/rewrites-and-redirects/) with placeholder replacement. - [Virtual hosting](https://static-web-server.net/features/virtual-hosting/) with per-host root directories. - Fallback page for 404 errors (SPA support). - Custom error pages. - Built-in HTTP to HTTPS redirect. - [Health check](https://static-web-server.net/features/health-endpoint/) endpoint (GET/HEAD). - [Prometheus metrics](https://static-web-server.net/features/metrics/) endpoint with request counts, latency histograms, and connection tracking. - [Maintenance mode](https://static-web-server.net/features/maintenance-mode/) with configurable status. - Configuration via CLI arguments, environment variables, or a TOML file. - [Windows Service]() support. - Socket activation ([systemd](http://0pointer.de/blog/projects/socket-activation.html)) for sandboxed and on-demand deployments. - Available as a [Rust library](https://docs.rs/static-web-server) with opt-in features. - First-class [Docker](https://docs.docker.com/get-started/overview/) images: [Scratch](https://hub.docker.com/_/scratch), [Alpine Linux](https://hub.docker.com/_/alpine), and [Debian](https://hub.docker.com/_/debian). - Cross-platform pre-compiled binaries for `Linux`, `macOS`, `Windows`, `FreeBSD`, `NetBSD`, `Android` (`x86_64`, `ARM64`). ## Documentation Please refer to [The Documentation Website](https://static-web-server.net/) for more details about the API, usage and examples. ## Releases - [Docker Images](https://hub.docker.com/r/joseluisq/static-web-server/) - [Release Binaries](https://github.com/static-web-server/static-web-server/releases) - [Platforms/Architectures Supported](https://static-web-server.net/platforms-architectures/) ## Contributions Unless you explicitly state otherwise, any contribution you intentionally submitted for inclusion in current work, as defined in the Apache-2.0 license, shall be dual licensed as described below, without any additional terms or conditions. Feel free to submit a [pull request](https://github.com/static-web-server/static-web-server/pulls) or file an [issue](https://github.com/static-web-server/static-web-server/issues). ## Community [SWS Community on Discord](https://discord.gg/VWvtZeWAA7) ## License This work is primarily distributed under the terms of both the [MIT license](LICENSE-MIT) and the [Apache License (Version 2.0)](LICENSE-APACHE). © 2019-present [Jose Quintana](https://joseluisq.net)

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustalpine-linuxamd64androidarm

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
CategoryDevOps
PricingOpen source

> Related tools

D
Docker
容器化平台,标准化应用交付
G
GitHub Actions
GitHub 原生 CI/CD 工作流
N
Nginx
高性能 Web 服务器与反向代理