mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-11-09 05:24:49 +09:00
The packaged systemd units ran the agent as User=root with a self-contradictory ProtectSystem=strict, while the script installer (install.sh) runs a dedicated, hardened serverkit-agent account. Align the packages with install.sh: - User/Group=serverkit-agent; NoNewPrivileges=yes, ProtectSystem=strict, ProtectHome=yes, PrivateTmp=yes, ReadWritePaths for config/log/data. - Create the account (deb postinst / rpm %pre), add it to the docker group, create+chown the data dirs, and re-chown the config dir on (re)install so an existing root-owned agent.key becomes readable after upgrade. - ExecStartPre=+chown fixes credential ownership at start regardless of how the operator ran `register`; install docs now use `sudo -u serverkit-agent`. Tradeoff: packaged agents match install.sh's capability set (Docker + metrics + file access) and no longer do systemd/package management or self-update by default (both need root). Disabling self-update also routes updates through the OS package manager's signed path. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>