- Node.js (with npm) — for building the frontend
- Go (1.21+) — for compiling the server binaries
- Both must be available in your PATH
cd web
npm run buildThis outputs the production frontend to web/dist/.
The Go binary embeds frontend files from server/static/ via //go:embed. You must copy the fresh build output before compiling.
cd ..
Remove-Item -Recurse -Force "server\static\*"
Copy-Item -Recurse "web\dist\*" "server\static\"ARM64 (Raspberry Pi 4/5, Radxa Zero 3W, etc.):
cd server
$env:GOOS="linux"; $env:GOARCH="arm64"; go build -o "bin/sentryusb-linux-arm64" .ARMv7 (Raspberry Pi Zero 2W, older Pi models):
$env:GOOS="linux"; $env:GOARCH="arm"; $env:GOARM="7"; go build -o "bin/sentryusb-linux-armv7" .Binaries are output to server/bin/.
Get-ChildItem "bin" | Select-Object Name, Length, LastWriteTimeConfirm both binaries are present with updated timestamps (~10-11 MB each).
cd web; npm run build; cd ..; Remove-Item -Recurse -Force "server\static\*"; Copy-Item -Recurse "web\dist\*" "server\static\"; cd server; $env:GOOS="linux"; $env:GOARCH="arm64"; go build -o "bin/sentryusb-linux-arm64" .; $env:GOOS="linux"; $env:GOARCH="arm"; $env:GOARM="7"; go build -o "bin/sentryusb-linux-armv7" .; cd ..- Build both binaries using the steps above
- Commit all changes (frontend source, server source, setup scripts)
- Push to the repo — the Sentry USB update mechanism on devices will pull new binaries and scripts
- Frontend changes not appearing: You forgot step 2. The Go binary embeds from
server/static/, notweb/dist/. Always copy before compiling. - Stale JS bundle: Check the hash in the filename (e.g.,
index-Dda2tfbK.js). If it hasn't changed after a build, your source changes may not have been saved.