Cloud VPS from $1.98/mo · pay with Bitcoin, Ethereum, Monero, USDT or Solana · paid in crypto

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.

1 GBMinimum memory
Ubuntu 24.04 LTSBase image
80/tcp, 443/tcpPorts
MIT OR Apache-2.0License

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.

Static Web Server on your own server.
Ready in under 5 minutes.

Pick a region and a size; the console shows the address as soon as it is up.

Every server delivered in under 5 minutesPay with crypto14-day money-back