Skip to content

Home lab

This agent checks the containers on your home server every 15 minutes. When one is down, it reads the logs and posts the cause. It proposes a fix as a tool call, which you approve in Slack.

Requires uv, a daemon user with access to the Docker socket, and a Slack app.

~/.config/wardrik/config.yaml
mcp:
docker:
command: uvx
args: [mcp-server-docker]
channels:
slack:
type: slack
token: ${SLACK_BOT_TOKEN}
signing_secret: ${SLACK_SIGNING_SECRET}
members: {U024BE7LH: user:admin}
notify:
targets:
homelab: {channel: slack, room: "#homelab"}
~/.config/wardrik/policies/homelab.yaml
allow:
- docker/list_*
- docker/fetch_container_logs
ask:
docker/stop_container: This stops a service.
docker/start_container: This starts a service.
docker/recreate_container: This recreates a container from its image.
deny:
docker/remove_*: Nothing is deleted.
docker/run_container: New containers are started by you.
docker/build_image: Images are built by you.
budget: {usd: 0.50, per: day}
~/.config/wardrik/agents/homelab.md
---
description: Keeps my home lab's containers running.
tools: [docker/*]
policy: homelab
notify: {to: [homelab], on: [parked, failed]}
triggers:
- name: check
every: 15m
prompt: Check every container.
---
List the containers. If one has exited, keeps restarting, or is unhealthy, read its last 100 log
lines and say in two sentences what went wrong. Then propose the smallest fix: restart it, or
recreate it from its image. If everything is fine, answer "All good."
systemctl --user restart wardrik # reads config.yaml and policies/
docker stop jellyfin
wardrik ask homelab "Check every container."

#homelab shows the findings and a start_container call for jellyfin, with Approve and Deny. After editing only an agent file, wardrik reload is enough.

  • notify sends only pending calls and failures, so healthy checks post nothing.
  • Docker access is root on the machine, so every change needs approval and destructive calls are denied.
  • Logs are content from outside, so no log line can make a call run without approval.
  • A turn interrupted by a power loss resumes when the daemon starts. See Durable runs.