Peekd is a lightweight web file server for quickly browsing and sharing local files.
- Rich previews for markdown, html, xml, code, text, csv, tsv, images, audio, video, PDF, and standard-library archive listings (ZIP, TAR, and TAR.GZ).
- Fast direct file serving with HTTP range and
sendfilesupport - Lightweight single binary with automatic dark mode
Install the latest release on Linux or macOS:
curl -fsSL https://jiacai2050.github.io/peekd/install.sh | shInstall a specific version or location:
curl -fsSL https://jiacai2050.github.io/peekd/install.sh | sh -s -- \
--version v1.2.1 \
--prefix "$HOME/.local/bin"go install github.com/jiacai2050/peekd@latestServe the current directory:
peekdServe another directory:
peekd ~/Downloads -addr :9000If the selected port is occupied, Peekd tries the next port automatically.
Peekd uses the browser Sec-Fetch-Dest header to distinguish document
navigation from subresource requests. Some browsers omit this header for LAN
navigation, so Upgrade-Insecure-Requests: 1 is used as a fallback. This
header is normally sent only for top-level navigation, not subresources.
Markdown images and media therefore load as original files without special
query parameters. Add ?raw=1 to force the original file response.
Change the maximum Markdown and text preview size:
peekd -max-preview-size 8MSupported size formats include 4M, 512K, 4MiB, and byte counts such as
4194304.
Show version information:
peekd -versionSet both environment variables to protect the server with HTTP Basic Authentication:
PEEKD_AUTH_USER=admin PEEKD_AUTH_PASSWORD=secret peekdIf only one variable is set, Peekd refuses to start. Basic Authentication encodes credentials rather than encrypting them, so use HTTPS or a trusted network when protecting sensitive files.
Direct file responses support HTTP range requests. Resume an interrupted download with:
curl -C - -O http://127.0.0.1:8090/large-file.isoAny directory can be downloaded as a ZIP archive. Click the ↓ ZIP button in
the directory header, or append ?download=zip to the directory URL:
curl -O http://127.0.0.1:8090/my-folder/?download=zipThe archive is generated on the fly using deflate compression, preserving the directory structure and file permissions.
go test ./...
go vet ./...
go build ./...