Small Docker service that monitors hCaptcha v and hsw path changes for one or more sitekeys.
The service stores the last seen value for each host:sitekey in a JSON file, polls on an interval, and sends a Discord webhook alert when the value changes.
- Docker, or
- Node.js 22+ if running locally
PORT: HTTP port. Default:3000POLL_INTERVAL_MS: polling interval in milliseconds. Default:600000CORS_ORIGIN: allowed CORS origin. Default:*STATE_FILE: JSON file used to persist old values. Default:/data/state.jsonDISCORD_WEBHOOK_URL: optional Discord webhook for alertsHCAP_TARGETS: JSON array of targetsHCAP_SITEKEYS: optional comma-separated fallback ifHCAP_TARGETSis not setTLS_DEBUG: optional. Set to1to enablenode-tls-clientdebug output
Recommended target format:
[
{
"label": "default",
"host": "accounts.hcaptcha.com",
"sitekey": "a5f74b19-9e45-40e0-b45d-47ff91b7a6c2"
}
]Install dependencies:
npm installRun one manual lookup:
node hcaptcha.js --sitekey a5f74b19-9e45-40e0-b45d-47ff91b7a6c2 --host accounts.hcaptcha.com --minimaldocker build -t hcaptcha-monitor:latest .Example docker-compose.yml:
services:
hcaptcha-monitor:
image: hcaptcha-monitor:latest
container_name: hcaptcha-monitor
restart: unless-stopped
ports:
- "3000:3000"
volumes:
- /home/{user}/hcaptcha-monitor:/data
environment:
PORT: "3000"
POLL_INTERVAL_MS: "600000"
CORS_ORIGIN: "*"
STATE_FILE: "/data/state.json"
DISCORD_WEBHOOK_URL: "${DISCORD_WEBHOOK_URL}"
HCAP_TARGETS: >-
[{"label":"default","host":"accounts.hcaptcha.com","sitekey":"a5f74b19-9e45-40e0-b45d-47ff91b7a6c2"}]Start it:
docker compose up -dBasic health and runtime metadata.
Example:
curl http://localhost:3000/healthReturns config and saved state for all monitored targets.
Example:
curl http://localhost:3000/stateForces an immediate poll cycle.
Example:
curl -X POST http://localhost:3000/runRuns a one-off lookup without changing the configured target list.
Example:
curl -X POST http://localhost:3000/check \
-H "Content-Type: application/json" \
-d '{"sitekey":"a5f74b19-9e45-40e0-b45d-47ff91b7a6c2","host":"accounts.hcaptcha.com","minimal":true}'