Skip to content

Download and Install

Latest v2.32.0 release 2024-06-19 (changelog, sha256sum)

See also the release history on GitHub.

Docker

If you are working with Docker containers then check out the Docker feature page.

Installation methods

Binary installer (Linux/BSDs)

Use the binary installer if your package manager is not supported.

curl --proto '=https' --tlsv1.2 -sSfL https://get.static-web-server.net | sh

static-web-server will be installed by default under the /usr/local/bin directory.

Alternatively, you can install a specific version of SWS to a custom location by setting environment variables.

export SWS_INSTALL_VERSION="2.31.0" # full list at https://github.com/static-web-server/static-web-server/tags
export SWS_INSTALL_DIR="~/.local/bin"
curl --proto '=https' --tlsv1.2 -sSfL https://get.static-web-server.net | sh

Make sure you set the environment variables for the piped process (sh in our case), not the piping process (curl).

If you don't want to export environment variables then use:

curl --proto '=https' --tlsv1.2 -sSfL https://get.static-web-server.net | SWS_INSTALL_DIR="~/.local/bin" sh

Arch Linux

Via Yay or your favorite AUR Helper.

yay -S static-web-server-bin

Exherbo Linux

Add the rust repository and install the package through cave:

cave sync
cave resolve -x repository/rust
cave resolve -x static-web-server

NixOS

Via Nix (Linux/MacOS)

nix-shell -p static-web-server
# or
nix-env -iA nixpkgs.static-web-server

MacOS

Via Homebrew (also Linux)

brew tap static-web-server/static-web-server

# Just the binary
brew install static-web-server-bin

# Or build from source
brew install static-web-server

Windows

Via Scoop

scoop install static-web-server

WebAssembly

Via Wasmer

wasmer run wasmer/static-web-server --net --enable-threads --mapdir /public:/my/host/dir -- --port 8787

TrueNAS SCALE

If you use TrueNAS SCALE then visit TrueCharts Community Website and its Introduction to SCALE page to install SWS application in your instance.

Binaries

Pre-compiled binaries grouped by CPU architectures.

x86_64

ARM64

x86

ARM

PowerPC

S390X

Source files