Contribute
Development setup
Node 26 and Go are all you need. The server runs TypeScript directly; there's no server build step.
What to install
- Node 26. The server uses Node's own type stripping and
node:sqlite, so older versions won't run it. - Go, for the agent. Any recent release; the agents are cross-compiled with
CGO_ENABLED=0, so no C toolchain. - git. The version numbers are worked out from git history.
First run
git clone https://git.klab.gg/xvoltzz/CERMM.git && cd cermm
npm install
npm run agents # builds every agent into agent/dist/ (the server hands them out)
npm run build # typechecks web and server, builds the web app into dist/
npm run server # https://localhost:4800; the setup code is in its output
Data goes in data/ in the checkout (the database, keys, certificates, setup-code.txt). Delete it to start over.
The scripts
| Command | Does |
|---|---|
npm run server | Starts the server on port 4800 (also npm start). Settings from the environment. |
npm run dev | Vite's dev server for the web app, with hot reload. It sends /api, /install.*, /download and /ca.crt to the server on :4800 (or CERMM_DEV_SERVER), so run npm run server beside it. |
npm run build | Typechecks the web app and the server, then builds the web app into dist/, which the server serves. |
npm run agents | agent/build.sh: cross-compiles the agent for Linux (amd64, arm64, arm), Windows (amd64, arm64) and macOS (amd64, arm64) into agent/dist/, and writes agent/dist/VERSION. |
Day to day
npm run serverin one terminal. Restart it after changing anything inserver/orshared/.npm run devin another, and open the address it prints. The web app reloads as you editsrc/.npm run agentsafter changingagent/, then reinstall or update a test agent (Testing an agent without root).
The agent has Go tests for the parts that read other programs' output (containers, health, Proxmox, Hyper-V):
cd agent && go test ./...
Scripts against the local server
The server uses its own certificate, so tell your tools not to check it: curl -k, or NODE_TLS_REJECT_UNAUTHORIZED=0 for a Node script.