Change a node
Update images, configuration, node roles, and manage node removal.
Roll a new image
Section titled “Roll a new image”The scheduler image updates automatically if the auto-update profile is enabled (watchtower). To roll manually or check the current version:
# Pull the latest imagedocker compose pull
# Start the updated image (recreates the scheduler)docker compose up -d
# Verify the versiondocker compose exec scheduler cat /app/build-info.json | jq .
# Or check the dashboard — nodes show "behind" if an older image is runningTo pin to a specific build (for testing or rollback):
echo "AGENT_OPS_IMAGE=ghcr.io/pullwright/agent-ops:<sha>" >> .envdocker compose pulldocker compose up -dCheck the package registry for available SHAs. A documentation-only merge publishes no image.
Timing
Section titled “Timing”Don’t recreate the scheduler mid-cycle. Use --disable to wait out any in-flight cycle first:
docker compose exec scheduler /app/agent-cycle.sh --disable "rolling new image"docker compose exec scheduler /app/agent-cycle.sh --status # wait for cycle to finish
# Now safe to restartdocker compose up -d
docker compose exec scheduler /app/agent-cycle.sh --enableIf watchtower is enabled, it already does this — its pre-update hook reads the same locks and defers the roll.
Update configuration
Section titled “Update configuration”config.json is committed to this repository and baked into the image at build time (deploy/docker/Dockerfile’s COPY --chown=agent:agent . /app) — there is no volume mount for it. A configuration change reaches a node the same way a code change does:
-
Edit the config file in a clone of this repository:
Terminal window $EDITOR config.json -
Validate it:
Terminal window ./scripts/doctor.sh --config config.json -
Open a pull request and get it merged to
main. The merge publishes a new image toghcr.io/pullwright/agent-ops. -
Roll the node onto that image — automatically if the
auto-updateprofile is enabled, or manually (see Roll a new image above). The change takes effect once the node is running the new image.
Change the node’s role
Section titled “Change the node’s role”Promote a standby node to active, or demote an active node to standby:
# Edit .envROLE=active # or standby
# Recreate the scheduler so it picks up the new .env valuedocker compose up -ddocker compose up -d recreates the scheduler container with the new environment — a compose environment: entry is read once, at container start, not from the host’s .env on every cycle. Once recreated, the role is checked at the start of every subsequent cycle, so no further action is needed.
Allow an extra egress domain
Section titled “Allow an extra egress domain”If a Vercel project or another service serves from a custom domain:
echo "EGRESS_EXTRA_ALLOW=preview.example.com" >> .envdocker compose up -d egress-proxyFor fleet-wide additions (domains multiple nodes need), add to deploy/docker/egress-allowlist.txt in the repository:
example.com # used by custom Vercel domainsThen rebuild or wait for the next image to be pulled.
For multiple domains, comma- or whitespace-separate them:
echo "EGRESS_EXTRA_ALLOW=preview.example.com other-domain.com" >> .envdocker compose up -d egress-proxyTake one node out while others keep working
Section titled “Take one node out while others keep working”To pause a single node without affecting the rest of the fleet:
docker compose exec scheduler /app/agent-cycle.sh --disable "maintenance" --this-node# ... do maintenance ...docker compose exec scheduler /app/agent-cycle.sh --enable --this-nodeThis does not publish to the state repository; it affects only this node’s local switch.
Remove a node for good
Section titled “Remove a node for good”To retire a node permanently:
-
Check the fleet can spare it:
Terminal window # Verify at least one other node is activegh api repos/Poetic-Poems/agent-ops-state/branches \| jq -r '.[] | select(.name | startswith("nodes/")) | .name' -
Let any in-flight cycle finish:
Terminal window docker compose exec scheduler /app/agent-cycle.sh --status# Wait until cycle: idle and review: idle -
Take off anything you want to keep. Logs and cycle records live in the
statevolume, not on the host, so stream them out beforedown -vdestroys it (see Archive logs below for the command). The node’s own settings are in~/poetic-node/.env;config.jsonneeds no backup — it is committed to this repository and baked into the image. -
Destroy the stack, volumes, and credentials:
Terminal window docker compose down -v# Revoke the node's GitHub token at github.com/settings/tokens# Revoke the Tailscale identity (if enabled) -
Remove from the fleet’s memory (if state repository is configured):
Terminal window # The node's branch in the state repository will be pruned# after it hasn't published for longer than state sync retention# Or delete manually:git push origin :nodes/<node-name> -f # force-delete the branch -
Delete the directory:
Terminal window rm -rf ~/poetic-node
Uninstall
Section titled “Uninstall”To remove agent-ops entirely from a host:
-
Archive logs first, if you want to keep them. They live in the
statevolume, not on the host, and step 2’sdown -vdeletes it — so stream the tarball out of the running container while it is still there:Terminal window docker compose exec -T scheduler \tar cz -C /home/agent/.local/state poetic-agents \> "agent-ops-logs-$(date -u +%F).tar.gz" -
Stop and remove containers:
Terminal window docker compose down -vcd ..rm -rf ~/poetic-node -
Revoke credentials (if the node had them):
- GitHub PAT: github.com/settings/tokens
- Anthropic API key: console.anthropic.com
- Tailscale (if enabled): app.tailscale.com/admin/machines
-
Remove from fleet (if state repository is configured):
Terminal window # Delete the node's branchgit push origin :nodes/<node-name> -f
Related pages
Section titled “Related pages”- Install a node — bringing nodes up
- Run and pause — operating the switch and drain
- Diagnose by symptom — troubleshooting
- The node runbook (
deploy/docker/README.md) — the detail behind updating, changing a node’s role, and the failover drill