| name | serviceman |
| description | Deploy and manage system services with serviceman. Use when adding, checking, or managing daemons on Linux (systemd/OpenRC) or macOS (launchctl). |
serviceman Skill
Install Check
command -v serviceman || curl -sS https://webi.sh/serviceman | sh
source ~/.config/envman/PATH.env
Critical Rules
- Never
sudo serviceman — it sudo's internally. Running as root breaks
user-context paths.
-- is required before the command — without it, command flags bleed into
serviceman's parser.
--workdir must exist at add-time (or pass --force).
Add a Service
Auto-detection is safe. Use --daemon for always-on system boot services, --agent
for user login session services (not always-on).
serviceman add --name 'myapp' --workdir ~/srv/myapp -- ~/bin/myapp serve
Output and Exit Codes
- Informational output (what serviceman is doing) goes to stderr
list output goes to stderr — capture with serviceman list 2>&1
- Exit
0 = success; non-zero = error
List Managed Services
serviceman list --daemon
serviceman list --all --daemon
Common Operations
serviceman restart myapp --daemon
serviceman logs myapp
serviceman disable myapp --daemon
sudoers for Passwordless Operation
# /etc/sudoers.d/serviceman
%wheel ALL=(ALL) NOPASSWD: /usr/bin/install
# OpenRC
%wheel ALL=(ALL) NOPASSWD: /sbin/rc-service
%wheel ALL=(ALL) NOPASSWD: /sbin/rc-update
# systemd
%wheel ALL=(ALL) NOPASSWD: /usr/bin/systemctl
install handles file placement and can be NOPASSWD. rc-service, rc-update,
and systemctl control running services and require sudo but can also be NOPASSWD.
Manager Detection
--agent — user login session; only runs while logged in (macOS default)
--daemon — system boot service; always-on, survives logout (Linux default)
Auto-detection is safe for most deployments.