Skip to content

Building from Source

Prerequisites

The default build requires CGO and libappindicator3 for the system tray. See System Tray — Build requirements for per-distro package names.

Go is required to build from source. The released binary has no runtime dependencies.

Build commands

make build       # → ./build/lerd  (CGO, with tray support)
make build-nogui # → ./build/lerd-nogui  (no CGO, no tray)
make install     # build + install to ~/.local/bin/lerd
make test        # go test ./...
make clean       # remove ./build/

Cross-compile for arm64

Without tray (no CGO required):

CGO_ENABLED=0 GOARCH=arm64 GOOS=linux go build -tags nogui -o ./build/lerd-arm64 ./cmd/lerd

Installing a local build

To test a local build end-to-end using the installer:

make build
bash install.sh --local ./build/lerd

This runs the full installer flow (prerequisite checks, PATH setup, lerd install) using your locally built binary instead of downloading from GitHub.