Skip to main content

Agent Configuration

Mode Detection

VariableDefaultDescription
CONTROLLER_URLIf set: Managed Mode (connects to controller). If unset: Solo Mode (standalone).
AGENT_TOKENAuthentication token for controller (Managed Mode only)
AGENT_NAMEhostnameDisplay name for the agent

Solo Mode

Scheduling

VariableDefaultDescription
WW_SCHEDULE@every 24hCheck schedule. Supports cron (0 4 * * *) and intervals (@every 6h, @every 30m).
WW_AUTO_UPDATEfalseAutomatically apply updates when found
WW_MONITOR_ONLYfalseCheck for updates but never apply them

Update Behavior

VariableDefaultDescription
WW_UPDATE_STRATEGYrecreaterecreate (stop-first) or start-first (blue-green zero-downtime). Blue-green automatically falls back to stop-first for containers with direct port mappings.
WW_PRUNEfalseRemove old images after successful update
WW_STOP_TIMEOUT10Container stop timeout in seconds
WW_INCLUDE_STOPPEDfalseAlso monitor stopped containers
WW_INCLUDE_RESTARTINGfalseAlso monitor restarting containers

Notifications

VariableDefaultDescription
WW_NOTIFICATION_URLSpace-separated shoutrrr URLs (e.g. telegram://TOKEN@telegram?channels=CHATID)
WW_TELEGRAM_TOKENTelegram bot token
WW_TELEGRAM_CHAT_IDTelegram chat ID (comma-separated for multiple chats)
WW_SLACK_WEBHOOKSlack incoming webhook URL
WW_WEBHOOK_URLGeneric HTTP POST webhook endpoint
WW_WEBHOOK_HEADERSJSON object of extra headers: '{"X-Secret":"abc"}'

ntfy

VariableDefaultDescription
WW_NTFY_URLntfy server URL (e.g., https://ntfy.sh or self-hosted)
WW_NTFY_TOPICTopic name for notifications
WW_NTFY_PRIORITYdefaultMessage priority: low, default, high, urgent
docker run -d \
--name watchwarden \
-v /var/run/docker.sock:/var/run/docker.sock \
-e WW_SCHEDULE="@every 6h" \
-e WW_NTFY_URL=https://ntfy.sh \
-e WW_NTFY_TOPIC=watchwarden-updates \
ghcr.io/watchwarden-labs/watchwarden-agent:latest

Notification Templates

VariableDefaultDescription
WW_NOTIFICATION_TEMPLATEGo text/template for custom message formatting

Available variables: {{.AgentName}}, {{.ContainerName}}, {{.Image}}, {{.OldDigest}}, {{.NewDigest}}, {{.Duration}}, {{.Error}}, {{.EventType}}

Example:

WW_NOTIFICATION_TEMPLATE='{{.ContainerName}} {{.EventType}}\nImage: {{.Image}} ({{.Duration}})'

HTTP Status Server

VariableDefaultDescription
WW_HTTP_PORT8080Status server port
WW_HTTP_TOKENBearer token for API auth (optional; /health always open)

Endpoints:

MethodPathAuthDescription
GET/healthNoHealth check for Docker HEALTHCHECK
GET/api/statusTokenAgent mode, schedule, uptime, Docker info
GET/api/containersTokenMonitored container list with update status
GET/api/eventsTokenRecent events (checks, updates, errors)
POST/api/checkTokenTrigger immediate check
POST/api/update/{id}TokenTrigger update for specific container

Registry Authentication

VariableDefaultDescription
WW_DOCKER_USERNAMERegistry username
WW_DOCKER_PASSWORDRegistry password
WW_DOCKER_SERVERindex.docker.ioRegistry server
WW_REGISTRY_AUTHJSON array for multiple registries

Example multi-registry:

WW_REGISTRY_AUTH='[
{"registry":"ghcr.io","username":"user","password":"token"},
{"registry":"registry.example.com","username":"admin","password":"secret"}
]'

Shared (Both Modes)

VariableDefaultDescription
DOCKER_SOCKET/var/run/docker.sockDocker socket path (for rootless Docker/Podman setups)
WATCHWARDEN_LABEL_ENABLE_ONLYfalseOnly monitor containers with com.watchwarden.enable=true
REQUIRE_SIGNED_IMAGESfalseBlock updates if cosign signature verification fails
COSIGN_PUBLIC_KEYPEM-encoded public key for cosign verification

Watchtower Compatibility

All standard Watchtower environment variables are automatically mapped on startup. WatchWarden-native WW_* variables take precedence if both are set.

Watchtower VariableWatchWarden EquivalentTransform
WATCHTOWER_POLL_INTERVALWW_SCHEDULESeconds → @every Ns
WATCHTOWER_SCHEDULEWW_SCHEDULEDirect (cron expression)
WATCHTOWER_CLEANUPWW_PRUNEDirect
WATCHTOWER_MONITOR_ONLYWW_MONITOR_ONLYDirect
WATCHTOWER_INCLUDE_STOPPEDWW_INCLUDE_STOPPEDDirect
WATCHTOWER_INCLUDE_RESTARTINGWW_INCLUDE_RESTARTINGDirect
WATCHTOWER_LABEL_ENABLEWATCHWARDEN_LABEL_ENABLE_ONLYDirect
WATCHTOWER_ROLLING_RESTARTWW_UPDATE_STRATEGYtruestart-first
WATCHTOWER_TIMEOUTWW_STOP_TIMEOUTDirect (seconds)
WATCHTOWER_HTTP_API_TOKENWW_HTTP_TOKENDirect
WATCHTOWER_NOTIFICATION_URLWW_NOTIFICATION_URLDirect (shoutrrr URLs)
WATCHTOWER_NOTIFICATION_TELEGRAM_TOKENWW_TELEGRAM_TOKENDirect
WATCHTOWER_NOTIFICATION_TELEGRAM_CHAT_IDWW_TELEGRAM_CHAT_IDDirect
WATCHTOWER_NOTIFICATION_SLACK_HOOK_URLWW_SLACK_WEBHOOKDirect
REPO_USERWW_DOCKER_USERNAMEDirect
REPO_PASSWW_DOCKER_PASSWORDDirect

Mappings are logged at startup:

[compat] WATCHTOWER_POLL_INTERVAL=3600 → WW_SCHEDULE=@every 3600s
[compat] WATCHTOWER_CLEANUP=true → WW_PRUNE