11 KiB
Download and Install
Latest {{RELEASE_VERSION}} release {{RELEASE_DATE}} (changelog, sha256sum)
See also the release history on GitHub.
!!! info "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.34.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
- SWS Nix package maintained by @figsoda
- SWS Nix module maintained by @mac-chaffee
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
Binaries
Pre-compiled binaries grouped by CPU architectures.
x86_64
- static-web-server-{{RELEASE_VERSION}}-x86_64-apple-darwin.tar.gz
SHA256SUM:{{x86_64-apple-darwin.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-x86_64-pc-windows-gnu.zip
SHA256SUM:{{x86_64-pc-windows-gnu.zip}} - static-web-server-{{RELEASE_VERSION}}-x86_64-pc-windows-msvc.zip
SHA256SUM:{{x86_64-pc-windows-msvc.zip}} - static-web-server-{{RELEASE_VERSION}}-x86_64-unknown-freebsd.tar.gz
SHA256SUM:{{x86_64-unknown-freebsd.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-x86_64-unknown-linux-gnu.tar.gz
SHA256SUM:{{x86_64-unknown-linux-gnu.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-x86_64-unknown-linux-musl.tar.gz
SHA256SUM:{{x86_64-unknown-linux-musl.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-x86_64-unknown-netbsd.tar.gz
SHA256SUM:{{x86_64-unknown-netbsd.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-x86_64-unknown-illumos.tar.gz
SHA256SUM:{{x86_64-unknown-illumos.tar.gz}}
ARM64
- static-web-server-{{RELEASE_VERSION}}-aarch64-unknown-linux-gnu.tar.gz
SHA256SUM:{{aarch64-unknown-linux-gnu.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-aarch64-unknown-linux-musl.tar.gz
SHA256SUM:{{aarch64-unknown-linux-musl.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-aarch64-apple-darwin.tar.gz
SHA256SUM:{{aarch64-apple-darwin.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-aarch64-linux-android.tar.gz
SHA256SUM:{{aarch64-linux-android.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-aarch64-pc-windows-msvc.zip
SHA256SUM:{{aarch64-pc-windows-msvc.zip}}
x86
- static-web-server-{{RELEASE_VERSION}}-i686-pc-windows-msvc.zip
SHA256SUM:{{i686-pc-windows-msvc.zip}} - static-web-server-{{RELEASE_VERSION}}-i686-unknown-freebsd.tar.gz
SHA256SUM:{{i686-unknown-freebsd.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-i686-unknown-linux-gnu.tar.gz
SHA256SUM:{{i686-unknown-linux-gnu.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-i686-unknown-linux-musl.tar.gz
SHA256SUM:{{i686-unknown-linux-musl.tar.gz}}
ARM
- static-web-server-{{RELEASE_VERSION}}-arm-unknown-linux-gnueabihf.tar.gz
SHA256SUM:{{arm-unknown-linux-gnueabihf.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-arm-unknown-linux-musleabihf.tar.gz
SHA256SUM:{{arm-unknown-linux-musleabihf.tar.gz}} - static-web-server-{{RELEASE_VERSION}}-armv7-unknown-linux-musleabihf.tar.gz
SHA256SUM:{{armv7-unknown-linux-musleabihf.tar.gz}}
PowerPC
- static-web-server-{{RELEASE_VERSION}}-powerpc64le-unknown-linux-gnu.tar.gz
SHA256SUM:{{powerpc64le-unknown-linux-gnu.tar.gz}}
S390X
- static-web-server-{{RELEASE_VERSION}}-s390x-unknown-linux-gnu.tar.gz
SHA256SUM:{{s390x-unknown-linux-gnu.tar.gz}}
Source files
- static-web-server-{{RELEASE_VERSION_NUM}}.tar.gz
SHA256SUM:{{SRC_TAR}} - static-web-server-{{RELEASE_VERSION_NUM}}.zip
SHA256SUM:{{SRC_ZIP}}