CERMM/wiki>

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

CommandDoes
npm run serverStarts the server on port 4800 (also npm start). Settings from the environment.
npm run devVite'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 buildTypechecks the web app and the server, then builds the web app into dist/, which the server serves.
npm run agentsagent/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

  1. npm run server in one terminal. Restart it after changing anything in server/ or shared/.
  2. npm run dev in another, and open the address it prints. The web app reloads as you edit src/.
  3. npm run agents after changing agent/, 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.

CERMM is in development. Something here wrong or out of date? Tell us or fix it.