The compute agent is a single static binary that uses only the Go standard library. It never shells out and never listens on a port.

Configuration

Set these as environment variables, or as KEY=VALUE lines in /etc/manylayers/agent.env (the installer writes it). The environment wins over the file. After the first registration you may remove MANYLAYERS_AGENT_TOKEN.

Failure handling

Least privilege

  • The installer creates a manylayers system user: no shell, no home, no extra groups, never docker. The agent refuses to run as root unless MANYLAYERS_AGENT_ALLOW_ROOT=true (for isolated containers only).
  • Credentials belong to the agent alone: the data directory is 0700, node.json and agent.env are 0600, all owned by manylayers. The agent tightens loosened modes on start and refuses an identity file owned by someone else.
  • The systemd unit runs as User=manylayers with no capabilities, NoNewPrivileges, ProtectSystem=strict (only the data directory writable), private /tmp and devices, kernel and cgroup protection, RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX and the @system-service syscall filter minus @privileged and @resources.
  • The model engine runs inside the same sandbox: no root and no Docker socket.
  • GPU machines. On a machine with an NVIDIA GPU, the installer adds manylayers-agent.service.d/gpu.conf so vLLM and SGLang can use the GPU. The drop-in allows the NVIDIA device nodes and no other device, allows writable-executable memory (CUDA generates code at run time), and drops @resources from the syscall deny-list (PyTorch sets CPU affinity and memory policy). Every other setting above stays. Install with MANYLAYERS_AGENT_GPU=0 to keep the GPU from the agent.

Logs

Look for control channel connected, reconnect warnings and command succeeded/failed lines with their durations. Logs never contain credentials, payloads or results.