Static Web Server

A cross-platform asynchronous web server designed for serving static files and assets with minimal resource overhead.

Static Web Server screenshot 1

Static Web Server is an open-source, cross-platform web server designed to serve static files and assets. It is written in Rust and utilizes the Hyper and Tokio runtime to provide asynchronous networking capabilities. The software is distributed as a single static binary with no dependencies, which makes it suitable for deployment in minimal environments where resource overhead must be kept to a minimum.

Users can deploy the server across various operating systems, including Linux, macOS, Windows, FreeBSD, and Android. It is available as a standalone binary, a Docker image, or a library crate. Configuration is handled through CLI arguments, environment variables, or TOML files, allowing it to be integrated into different deployment pipelines or managed as a system service.

Key features

  • Support for HTTP/1, HTTP/2, and TLS
  • Compression for text files via GZip, Deflate, Brotli, and Zstandard
  • Partial Content Delivery for byte-serving of large files
  • Prometheus metrics endpoint for request counts and latency
  • Virtual hosting and custom URL rewrites using glob patterns
  • Basic HTTP Authentication and CORS support
  • Fallback pages for 404 errors to support single-page applications
  • Directory listing with sorting and JSON output options
  • Graceful shutdown with termination signal handling

The architecture focuses on memory safety and low CPU and RAM overhead. It includes a health check endpoint and can be run as a Windows Service. For sandboxing and on-demand applications, the server can accept a socket listener as a file descriptor, which is useful for integrations with systemd. It also supports Markdown content negotiation via the Accept header and can serve pre-compressed files directly from the disk to reduce real-time processing requirements. The server provides customizable HTTP response headers for specific file requests and includes built-in HTTP to HTTPS redirection.

This tool is intended for developers and system administrators who require a lightweight, high-performance utility for hosting static websites or assets across diverse hardware architectures.

Last Modified
Software TypeWeb App / Server
Platform
Last Activity19 days ago
Repository Age6 years
LicenseApache-2.0
Open Source Alternative to
Open Source Software.io

Join our newsletter to get shiny new open source software delivered to your inbox. Unsubscribe anytime.