Reference Go server for the tus protocol, enabling resumable HTTP file uploads to local disk, Google Cloud Storage or S3.
TheWaWaR/simple-http-server
A simple static file server written in Rust, with directory listing, uploads, basic auth, and optional HTTPS.
- Stars
- 3,461
- Forks
- 218
- Open issues
- 45
- Last commit
- 2 months ago
What is it?
Simple HTTP Server is a command-line tool for serving a local folder over HTTP in one command. It renders directory listings with breadcrumb navigation, can serve index.html pages automatically, and supports range requests for partial downloads. Compression with gzip and deflate can be enabled for selected file extensions.
For development and small deployments, it adds options such as file upload protected by a CSRF token, HTTP Basic Auth, CORS, and COOP/COEP headers. The --try-file option serves a fallback file for missing paths, which suits single-page applications. The --base-url option lets it run behind a reverse proxy that strips a path prefix.
The server is built on axum and tokio. HTTPS with PKCS#12 certificates (.p12 or .pfx) is available through the tls feature, which is disabled by default to keep the binary smaller. It runs on Windows, macOS, and Linux and is installed with cargo install.
Key features
- 01Directory listing with breadcrumb navigation and sorting by name, modified time, or size
- 02Optional index.html rendering and SPA fallback via --try-file
- 03File upload with CSRF protection and a configurable size limit
- 04HTTP Basic Auth, CORS, and COOP/COEP headers
- 05Range requests, ETag/Last-Modified caching, and gzip/deflate compression
- 06Optional PKCS#12 HTTPS through the tls feature
Use cases
- Sharing a local folder quickly on a LAN or with a teammate
- Serving a single-page application build with a fallback to index.html
- Testing front-end code that needs HTTPS with a local PKCS#12 certificate
- Running a small upload endpoint behind a reverse proxy with a path prefix
Topics
FAQ
- What is simple-http-server?
- A simple static file server written in Rust, with directory listing, uploads, basic auth, and optional HTTPS. Simple HTTP Server is a command-line tool for serving a local folder over HTTP in one command. It renders directory listings with breadcrumb navigation, can serve index.html pages automatically, and supports range requests for partial downloads. Compression with gzip and deflate can be enabled for selected file extensions.
- Is simple-http-server free to use? What license does it have?
- simple-http-server is open source under the MIT license. Check the license terms before using it in commercial products.
- Is simple-http-server still maintained?
- Updated within 6 months. The last commit to simple-http-server was on Aug 27, 2026.
- What can I use simple-http-server for?
- Sharing a local folder quickly on a LAN or with a teammate Serving a single-page application build with a fallback to index.html Testing front-end code that needs HTTPS with a local PKCS#12 certificate Running a small upload endpoint behind a reverse proxy with a path prefix
- Where can I get simple-http-server?
- The source code and installation instructions are on GitHub: https://github.com/TheWaWaR/simple-http-server
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A free, open-source app for sending files and messages to nearby devices over the local network, without internet or third-party servers.
A fast, Flask-style C++ microframework for building HTTP and WebSocket web services, header-only and easy to use.
A high-performance, minimalist web framework for Go, built on the standard net/http package.
A high-performance web server, reverse proxy, load balancer, API gateway and content cache written in C.
A self-hosted tunnel written in Go that exposes localhost services to the internet through your own domain and server.