Skip to content

Static Web Server

Small Rust web server for serving static files, with TLS, HTTP/2 and compression

Permissive (OSI) · Apache-2.0
  • Self-hosted
  • macOS
  • Linux
  • CLI

Listed by , founder & editor

75

Health

Thriving

Overview

Stars

2,420

Last commit

today

Nov 2026

Repository age

7 years

since Sep 2019

Latest version

v2.44.3

Nov 2026

Contributors

–

11 active in 90 days

Releases

9

last 12 months

Language

Rust

Static Web Server, or SWS, serves static files. It is written in Rust on Hyper and Tokio, and it ships as a single static binary of about 4 MB with no runtime dependencies. It handles HTTP/1 and HTTP/2.

Features cover what most static sites need. It compresses on the fly with Gzip, Deflate, Brotli or Zstandard, and serves pre-compressed files from disk. It also supports TLS, HTTP to HTTPS redirects, CORS, basic authentication, rewrites, redirects, virtual hosts, custom error pages and a fallback page for single-page apps. Health check endpoints and a Prometheus metrics endpoint suit container setups. You configure it through CLI arguments, environment variables or a TOML file.

Binaries exist for Linux, macOS, Windows, FreeBSD, NetBSD and Android. Docker images come in Scratch, Alpine and Debian variants. Homebrew has a formula. The current production line is v2, while v3 is in development. It is an alternative to general web servers when you only need static content.

Who it's for

Developers hosting single-page apps or documentation sites

It has a fallback page, compression and cache headers in one small binary.

Skip if: You need server-side scripting or complex reverse proxying.

Teams running containers on Kubernetes

It provides health endpoints, Prometheus metrics and minimal Docker images.

Skip if: You already run a full ingress controller that serves your files.

Self-hosters who want a lightweight file server

It offers optional directory listings and basic auth with low resource use.

Skip if: You want a web UI to manage files and users.

The problem it solves

Running a full general-purpose web server just to deliver static files adds configuration and dependencies. This server does that one job with a small binary and sensible defaults.

Strengths

  • Single static binary of about 4 MB with no runtime dependencies
  • On-the-fly Gzip, Deflate, Brotli and Zstandard compression
  • Health checks and a Prometheus metrics endpoint built in
  • Docker images in Scratch, Alpine and Debian variants
  • Configured via CLI, environment variables or TOML

Trade-offs

  • Static files only; no dynamic content handling
  • v3 is still in development; v2 is the production line
  • Not a full reverse proxy

Self-host Static Web Server

Self-hostable
Yes

Frequently asked questions

Is it free to use?

Yes. It is open source under the Apache-2.0 license.

Can I self-host it?

Yes. You run it as a binary, a Docker container or a Windows service.

Which platforms are supported?

Linux, macOS, Windows, FreeBSD, NetBSD, Android and Docker.

Does it support HTTPS?

Yes. It supports HTTP/2 with TLS and a built-in HTTP to HTTPS redirect.

Similar tools in Reverse proxies and web servers

Ferron

Reverse proxies and web servers

2.2k 101 today Active MIT

Zoraxy

Reverse proxies and web servers

5.6k 341 4 days ago Thriving AGPL-3.0

sablier

Reverse proxies and web servers

3.1k 109 5 days ago Thriving AGPL-3.0

tlsproxy

Reverse proxies and web servers

107 6 today Thriving MIT