---
title: "Static Web Server (SWS) for static sites · CloudSat"
description: "Run Static Web Server (SWS) on a CloudSat VPS: a 4 MB Rust binary that serves static sites and SPAs with compression, HTTP/2, TLS and fallback pages."
url: https://cloudsat.io/apps/deploy-static-web-server
updated: 2026-11-18T15:52:35Z
source: CloudSat (https://cloudsat.io/). Prices in USD.
---

[Web servers](https://cloudsat.io/apps/category/web-and-proxy-servers)

# Static Web Server on a VPS

Static Web Server (SWS) is a small Rust web server for static files: one binary of about 4 MB with compression, HTTP/2, TLS and an SPA fallback page.

[Deploy Static Web Server](https://dash.cloudsat.io/console/deploy?image=app%3Astatic-web-server&plan=cloud-1g) [All apps](https://cloudsat.io/apps)

## About Static Web Server

Static Web Server, or SWS, is a cross-platform server for static files built in Rust on Hyper and Tokio, dual-licensed MIT and Apache-2.0. It ships as a single static binary of about 4 MB with no runtime dependencies.

A documentation site, a landing page or a compiled single-page app needs nothing more, so SWS sits comfortably on the smallest CloudSat plans.

By default SWS serves `./public` on port 80. Every option can be set with a CLI flag, a `SERVER_*` environment variable or a TOML file (`./sws.toml` unless `SERVER_CONFIG_FILE` names another).

## What you get with Static Web Server

- On-the-fly Gzip, Deflate, Brotli and Zstandard compression
- HTTP/2 over TLS with automatic security headers
- Fallback page for single-page apps
- Optional directory listing in HTML or JSON
- Basic authentication (bcrypt) and CORS with preflight

## Static Web Server use cases

- Serve a built React, Vue or Svelte app
- Host the output of a static site generator
- Share a folder of files with directory listing on

## After you deploy Static Web Server

1. Once the server is **Running**, find the root directory in the SWS config (the default is `./public`) and upload your files with `rsync` or `scp`.
2. Load `http://<server IP>/` to confirm the pages appear.
3. For an SPA, set `--page-fallback` (`SERVER_FALLBACK_PAGE`) to your `index.html`.
4. Point a domain at the IP, then enable HTTPS with `--http2` plus `--http2-tls-cert` and `--http2-tls-key`, or leave certificates to a proxy such as Caddy.

## Static Web Server ports

Open these in your firewall if you use one: `80/tcp HTTP (default)`, `443/tcp HTTPS (once TLS is configured)`.

## Static Web Server FAQ

### Which SWS version should I run?

Use the v2 line for production. The project site marks v3 as a development release, so test it before you switch.

### Can SWS sit behind another reverse proxy?

Yes. Keep TLS off in SWS, bind it with `--host 127.0.0.1` and a local `--port`, and let the proxy terminate HTTPS and forward requests.

**Disclaimer.** The Static Web Server project has no affiliation with CloudSat and does not endorse it. Names and logos belong to their owners and appear only to identify the software.

## Apps like Static Web Server

[All apps in Web servers](https://cloudsat.io/apps/category/web-and-proxy-servers)

- [Caddy](https://cloudsat.io/apps/deploy-caddy): Web servers Caddy is an open-source web server and reverse proxy that obtains and renews TLS certificates automatically, configured with a short, readable Caddyfile.
- [NGINX](https://cloudsat.io/apps/deploy-nginx): Web servers NGINX is the open-source web server and reverse proxy that serves static files, terminates TLS and balances traffic across app servers with low memory use.
- [Lighttpd](https://cloudsat.io/apps/deploy-lighttpd): Web servers Lighttpd is a lightweight open-source web server with FastCGI, URL rewriting, TLS and HTTP/2, built to stay efficient on small servers.
- [Ferron](https://cloudsat.io/apps/deploy-ferron): Web servers Ferron is a memory-safe web server written in Rust that serves static sites and reverse-proxies apps, with TLS certificates issued and renewed for you.
- [Algernon](https://cloudsat.io/apps/deploy-algernon): Web servers Algernon is a single-binary web server written in Go, with HTTP/2, QUIC, Lua handlers, Markdown and templates built in, plus a bundled database.
- [Angie](https://cloudsat.io/apps/deploy-angie): Web servers Angie is a drop-in nginx replacement built by former nginx developers, adding automatic HTTPS, a JSON metrics API, a web console and dynamic upstreams.
