A controller lobster is a special lobster that can manage the entire fleet from inside Docker. It has the same capabilities as a regular lobster, plus:
- 🔌 Docker socket access — can spawn, stop, restart, and upgrade other lobsters
- 📁 Farm directory mounted at
/farm/— full access to configs, scripts, and compose files - 📝 Read-write company-config — can update fleet policies without host access
| Scenario | Recommendation |
|---|---|
| Personal use, 2-3 lobsters | Controller in Docker (this guide) |
| Team use, 5+ lobsters | Controller on host (more secure) |
| Enterprise / strict security | Controller on host with RBAC |
# 1. Make sure you have docker-compose.yml ready
cp docker-compose.base.yml docker-compose.yml # if not already done
# 2. Spawn the controller
./scripts/spawn-controller.sh lilshell U0XXXXXXXXX xoxb-your-bot-token xapp-your-app-token
# 3. Spawn regular lobsters (can be done from host OR from the controller)
./scripts/spawn-lobster.sh alice U0YYYYYYYYY xoxb-alice-bot-token xapp-alice-app-token┌──────────────────────────────────────────────┐
│ Host Machine │
│ │
│ docker-compose.yml │
│ ┌────────────────┐ ┌────────────────┐ │
│ │ Controller 🎛️ │ │ Lobster A 🦞 │ │
│ │ /farm/ (rw) │ │ /shared/ (ro) │ │
│ │ docker.sock │ │ workspace │ │
│ │ company-config│ └────────────────┘ │
│ │ (rw) │ ┌────────────────┐ │
│ │ │ │ Lobster B 🦞 │ │
│ │ Can manage ──────▶ /shared/ (ro) │ │
│ │ all containers│ │ workspace │ │
│ └────────────────┘ └────────────────┘ │
└──────────────────────────────────────────────┘
Once running, tell the controller lobster in Slack:
- "Show me fleet status" → runs
docker psand reports - "Spawn a new lobster named bob" → runs
spawn-lobster.sh - "Restart alice" → runs
docker compose restart lobster-alice - "Check fleet health" → runs
health-check.sh - "Upgrade all lobsters" → runs
rolling-upgrade.sh - "Broadcast: meeting at 3pm" → runs
broadcast.sh
- Start/stop any container on the host
- Mount any host directory
- Execute commands as root via Docker
Mitigations:
- The controller runs as the
lobsteruser (non-root) inside the container - Only the fleet owner (configured
SLACK_USER_ID) can send commands - The AGENTS.md rules require confirmation before destructive operations
For higher security:
- Run the controller on the host instead of in Docker
- Use Docker socket proxies (e.g., Tecnativa/docker-socket-proxy) to limit API access
- Enable OpenClaw exec approvals for sensitive commands
| Feature | Regular Lobster | Controller |
|---|---|---|
| Docker management | ❌ | ✅ via socket |
| Farm directory | ❌ | ✅ at /farm/ |
| company-config | Read-only | Read-write |
| Fleet scripts | ❌ | ✅ at /farm/scripts/ |
LOBSTER_ROLE env |
(unset) | controller |
| Default AGENTS.md | Basic | Fleet management rules |
If you already have lobsters running and want to promote one to controller,
you'll need to update its service definition in docker-compose.yml to add
the controller-specific volumes. See spawn-controller.sh for the exact
volume mounts needed.
- Bind mount changes are live. When the controller edits
company-config/files, all other lobsters see the changes immediately (they mount the same host directory). No restart needed for file content changes. - Docker Compose changes require restart. If the controller edits
docker-compose.yml(e.g., adding a new lobster), it needs to rundocker compose up -dto apply.