Installation#
Go install#
go install github.com/fasthttpd/fasthttpd/cmd/fasthttpd@latestDownload binary#
Download binary from release.
VERSION=0.5.1 GOOS=linux GOARCH=amd64; \
curl -fsSL "https://github.com/fasthttpd/fasthttpd/releases/download/v${VERSION}/fasthttpd_${VERSION}_${GOOS}_${GOARCH}.tar.gz" | \
tar xz fasthttpd && \
sudo mv fasthttpd /usr/sbin- GOOS supports
linuxdarwinwindows - GOARCH supports
amd64arm64386
Homebrew#
brew tap fasthttpd/fasthttpd
brew install fasthttpdUsing yum or apt#
Download deb or rpm from release, and then execute apt install or yum install.
VERSION=0.5.1 ARCH=amd64; \
curl -fsSL -O "https://github.com/fasthttpd/fasthttpd/releases/download/v${VERSION}/fasthttpd_${VERSION}_${ARCH}.deb"
sudo apt install "./fasthttpd_${VERSION}_${ARCH}.deb"Docker#
- Default configuration path is
/etc/fasthttpd/config.yaml. - Default log directory is
/var/log/fasthttpd. - FastHttpd is automatically started by systemd.
See https://hub.docker.com/r/fasthttpd/fasthttpd
Exposing external port#
docker run --rm -p 8080:80 fasthttpd/fasthttpdServe static content#
docker run --rm -p 8080:80 -v $(pwd)/public:/usr/share/fasthttpd/html fasthttpd/fasthttpdSpecify config.yaml#
docker run --rm -p 8080:80 -v your.config.yaml:/etc/fasthttpd/config.yaml fasthttpd/fasthttpd