- Go (1.16 or later)
- Node.js (22.x recommended) and npm -- only needed for the web management frontend
- Git -- used to embed version information in the binaries
- Make -- for the automated build
To build the frontend and all client/server binaries for every supported platform:
makeThis produces binaries under dist/{os}/{arch}/:
dist/
linux/ i386/ amd64/ arm/ arm64/
windows/ i386/ amd64/ arm/ arm64/
darwin/ amd64/ arm64/
You can also build a subset:
make linux # all Linux architectures
make windows-arm64 # Windows ARM64 only
make client # client for all platforms
make server-linux-amd64 # single targetRun grep '^[a-z]' Makefile to see all available targets.
If you need more control over the build process, you can run each step separately.
The web management UI is an Angular application in the webmanager/ directory. The compiled assets are embedded into the Go binaries at build time.
cd webmanager
npm install
npm run build-prod
cd ..
rm -rf internal/assets/browser
cp -r webmanager/dist/webmanager/browser internal/assets/This only needs to be done once (or whenever you modify the frontend). If you skip this step, the binaries will use whatever assets are already in internal/assets/.
Each binary is built with go build, targeting ./cmd/engarde-client or ./cmd/engarde-server:
go build -ldflags "-s -w" -o engarde-client ./cmd/engarde-client
go build -ldflags "-s -w" -o engarde-server ./cmd/engarde-serverThis builds for your current OS and architecture. The -s -w flags strip debug information to reduce binary size.
Go supports cross-compilation natively via the GOOS and GOARCH environment variables. For example, to build the server for Linux ARM64:
GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -o engarde-server ./cmd/engarde-serverFor Linux targets, you may want to disable CGO to produce fully static binaries:
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -o engarde-server ./cmd/engarde-serverCommon GOOS/GOARCH combinations:
| OS | GOARCH |
|---|---|
| linux | 386, amd64, arm, arm64 |
| windows | 386, amd64, arm, arm64 |
| darwin | amd64, arm64 |
See the full list with go tool dist list.