Skip to content

Agent Installation

The agent is a Rust binary that runs on your machine. It reads your wrapd.yaml, connects to Wrapd via WebSocket, and executes commands when your endpoints are called.

Terminal window
docker run -d --name wrapd-agent \
-e WRAPD_TOKEN="wrapd_at_your_token" \
-v $(pwd)/wrapd.yaml:/app/wrapd.yaml \
-w /app \
ghcr.io/wrapd/agent:latest

Make sure wrapd.yaml is in your current directory.

Terminal window
docker logs wrapd-agent

You should see:

INFO wrapd_agent::connection: websocket connected
INFO wrapd_agent::connection: authenticated successfully agent_id=...
INFO wrapd_agent::connection: registered endpoints with hub count=3
  • The agent automatically reconnects if the connection drops.
  • Reconnection uses exponential backoff: 1s, 2s, 4s, 8s, 16s, 30s (max).
  • On reconnect, the agent re-authenticates and re-registers all endpoints.
VariableDescriptionDefault
WRAPD_TOKENAgent authentication token (required)
WRAPD_HUB_URLWebSocket hub URLwss://hub.wrapd.sh
WRAPD_CONFIG_PATHPath to wrapd.yamlwrapd.yaml
RUST_LOGLog level (debug, info, warn, error)info

CLI flags override environment variables. See CLI Reference.