Compiling
Both the hub and agent are written in Go, so you can easily build them yourself, or cross-compile for different platforms. Please install Go first if you haven't already.
Clone the repository
# Clone the repository
git clone --branch v0.15.1 --depth 1 https://github.com/henrygd/beszel.git
# Navigate to the repository
cd beszelUsing Makefile
Run make. This creates a build directory containing the binaries.
# Builds both the agent and hub
make
# Builds the agent only
make build-agent
# Builds the hub only (requires Node or Bun)
make build-hubYou can also build for different platforms:
make OS=freebsd ARCH=arm64See a list of valid options by running go tool dist list.
Manual compilation
Prepare dependencies
go mod tidyAgent
Go to src/cmd/agent and run the following command to create a binary in the current directory:
go build -ldflags "-w -s" .Windows builds require an additional step
We embed LibreHardwareMonitorLib and a .NET wrapper in the Windows executable, so you need to build this first:
dotnet build -c Release ./agent/lhm/beszel_lhm.csprojHub
The hub embeds the web UI in the binary, so you must build the website first. I use Bun, but you may use Node.js if you prefer:
cd src/site
bun install
bun run buildThen in src/cmd/hub:
go build -ldflags "-w -s" .Cross-compiling
You can cross-compile for different platforms using the GOOS and GOARCH environment variables.
For example, to build for FreeBSD ARM64:
GOOS=freebsd GOARCH=arm64 go build -ldflags "-w -s" .See a list of valid options by running go tool dist list.