Configuration
Set these as environment variables, or asKEY=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
manylayerssystem user: no shell, no home, no extra groups, neverdocker. The agent refuses to run as root unlessMANYLAYERS_AGENT_ALLOW_ROOT=true(for isolated containers only). - Credentials belong to the agent alone: the data directory is
0700,node.jsonandagent.envare0600, all owned bymanylayers. The agent tightens loosened modes on start and refuses an identity file owned by someone else. - The systemd unit runs as
User=manylayerswith no capabilities,NoNewPrivileges,ProtectSystem=strict(only the data directory writable), private/tmpand devices, kernel and cgroup protection,RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIXand the@system-servicesyscall filter minus@privilegedand@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.confso 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@resourcesfrom the syscall deny-list (PyTorch sets CPU affinity and memory policy). Every other setting above stays. Install withMANYLAYERS_AGENT_GPU=0to keep the GPU from the agent.
Logs
control channel connected, reconnect warnings and command succeeded/failed lines with their durations. Logs never contain credentials, payloads or results.