darkmatterforge/chowkidar

By darkmatterforge

Updated 3 days ago

Chowkidar watches containers, reacts to unhealthy events, and sends alerts automatically.

Image
Security
Developer tools
Monitoring & observability
0

1.7K

darkmatterforge/chowkidar repository overview

Chowkidar

Lightweight Docker health monitor with configurable restart and notification actions.

Chowkidar watches your containers for unhealthy health events and exited states, then reacts automatically — restarting, stopping, or running a custom script — and sends notifications via Discord, Slack, Telegram, email, and more.

License: AGPL-3.0 Build Docker Pulls Image Size Go GitHub Stars


Features

  • Container monitoring — polls Docker for unhealthy and exited containers; supports Docker-native health checks and custom bash health-check scripts per job
  • Configurable actionsrestart, start, stop, none, run-script per job
  • Per-job health-check script — define a bash script that determines container health (exit 0 = healthy, non-zero = unhealthy); dry-run and template picker included
  • Per-job overrides — individual retry count, monitoring interval, action timeout, and post-action wait
  • Multi-context job rules — pin each job to one or more Docker contexts; jobs with no context run on all hosts
  • Multi-provider notifications — Discord, Slack, Telegram, ntfy, Gotify, Pushover, SMTP/email, raw Apprise URLs
  • Notification templates — customise message content per provider per lifecycle event
  • Jobs system — define targeted monitoring rules with container name/label/env var filters
  • Bash script action — run a custom inline script per job with built-in templates, dry-run execution, and automatic template upgrade detection
  • Multi-Docker-host — monitor containers across multiple Docker hosts or sockets; each host individually enabled/disabled with its own monitoring interval, ping timeout, and offline confirm window
  • Per-host offline notifications — configure notification agents and custom message templates per Docker host; notifies once on down, once on recovery (no spam)
  • Web UI — dashboard, jobs, notification profiles, action history, settings
  • Authentication — optional username/password protection with bcrypt hashing
  • Encryption — notification credentials encrypted at rest via CHOWKIDAR_SECRET_KEY
  • 3 dashboard layouts — Card List, Compact Table, Status Grid; service groups are collapsible with state persisted across reloads
  • Dashboard filters — filter by status, tag, job action, Docker host, container name, label, env var, and job name; advanced filters panel for power users
  • Maintenance windows — schedule service pauses using six strategies (Manual, Single Window, Cron, Interval, Day of Week, Day of Month); targets jobs or Docker hosts (mutually exclusive); optional effective date ranges; per-window control over queued/in-flight action handling when a window opens (allow-finish / cancel-queued / force-cancel); bell notifications on start and end; auto-prune of expired single-occurrence windows
  • Notification bell — persistent system alerts (boot, failed recovery, paused monitoring) with per-alert dismiss and mark-all-read
  • Version check — settings sidebar shows running version; background check surfaces a bell alert when a newer release is available
  • Light/dark/auto theme
  • Persistent config — everything stored under /config (YAML + JSON history + logs)
  • Docker socket proxy support for reduced attack surface

Quick Start

docker compose up -d

Open http://localhost:8080


Development

Runs with live reload via Air. Go file changes rebuild the binary automatically; web/ is served directly from disk so HTML/CSS/JS changes are visible on refresh with no rebuild.

docker compose -f docker-compose.dev.yml up --build

Open http://localhost:8080


Docker CLI

docker run -d \
  --name chowkidar \
  --restart unless-stopped \
  -p 8080:8080 \
  -e CHOWKIDAR_SECRET_KEY=your-long-random-secret \
  -v /mnt/user/appdata/chowkidar:/config \
  -v /var/run/docker.sock:/var/run/docker.sock \
  darkmatterforge/chowkidar:latest

Environment Variables

Most settings are configured through the web UI (Settings page) and persisted to /config/config.yaml. The env vars below are the ones you typically set at container creation time. Every env var still overrides the config file if set.

Required at startup
VariableDefaultDescription
CHOWKIDAR_SECRET_KEYEncryption key for notification credentials. Set to a random 32+ char string. If unset, credentials are stored as plaintext. Cannot be changed after first use.
APP_PATH/configBase directory for config, database and logs. Must match your volume mount.
APP_PORT8080HTTP port the server listens on.
Docker connectivity

Chowkidar connects to Docker via the mounted socket by default. Additional Docker hosts are added through Settings → Docker Hosts in the web UI. Each host can be individually enabled/disabled and has its own monitor interval, ping timeout, and offline notification settings.

VariableDefaultDescription
DOCKER_HOSTOverride the primary Docker endpoint (e.g. tcp://socket-proxy:2375 if using a socket proxy). Leave unset to use the mounted socket.
DOCKER_SOCKET_PATH/var/run/docker.sockPath to the mounted socket inside the container. Only change if using a non-standard socket location.
Container filtering

Useful to set at the container level so monitoring starts correctly on first boot:

VariableDefaultDescription
CONTAINER_NAMEComma-separated container names to monitor. Leave empty to watch all.
CONTAINER_LABELWatch only containers with this label.
CONTAINER_ENV_VARWatch only containers with this env var value.
Logging
VariableDefaultDescription
LOG_LEVELinfodebug / info / warn / error. Useful for troubleshooting at startup.
Advanced overrides

All of these are also configurable via the web UI. Set as env vars only if you need to enforce values that the UI cannot override (e.g. in a managed deployment).

VariableDefaultDescription
ACTIONrestartDefault action: restart / start / stop / none / run-script
RETRY_COUNT3Action retry attempts
RETRY_DELAY10Seconds between retries
WORKER_COUNT2Parallel action workers
QUEUE_SIZE64Action queue capacity
ACTION_TIMEOUT_SECONDS20Per-action timeout (seconds)
STARTUP_DELAY_SECONDS0Seconds to wait before monitoring begins
START_EXITEDfalseAuto-start exited containers
REQUIRE_FILTER_FOR_EXITEDtrueRequire a filter before acting on exited containers
APPRISE_NOTIFICATION_SERVICESComma-separated Apprise URLs (alternative to UI notification profiles)
NOTIFICATION_RATE_PER_SEC5Max notifications per second
NOTIFICATION_COOLDOWN_SECONDS3600Min seconds between repeated notifications per container
EXTERNAL_HOSTNAMEHostname shown in notification payloads
PRIMARY_BASE_URLPublic base URL for links in notifications
RUN_SCRIPT_PATHScript path for the run-script action
DISPLAY_TIMEZONEUTCIANA timezone for web UI timestamps
SERVER_TIMEZONEUTCIANA timezone for scheduling
LOG_TO_FILEtrueWrite logs to $APP_PATH/logs/
LOG_RETENTION_DAYS7Log file retention in days
HTTP_CLIENT_TIMEOUT_SECONDS15HTTP client timeout
DOCKER_PING_TIMEOUT_SECONDS5Docker daemon liveness ping timeout
DOCKER_CLIENT_RETRY_COUNT1Docker client retry attempts
DOCKER_CLIENT_RETRY_DELAY_SECONDS2Seconds between Docker client retries

Notification Providers

Configure via the web UI under Settings → Notifications.

ProviderNotes
DiscordWebhook URL
SlackIncoming webhook
TelegramBot token + chat ID
Email (SMTP)Full SMTP config with optional DKIM signing
ntfySelf-hosted or ntfy.sh
GotifySelf-hosted Gotify server
PushoverMobile push alerts
WebhookHTTP POST to any URL
Apprise URLAny raw Apprise service URL
Notification Events

Templates can be customised per provider for each lifecycle event:

EventTrigger
bootUpChowkidar started and Docker is reachable
unhealthyDetectedContainer health check failed
retryingRecovery action attempt N of M
cooldownMonitoring paused after action
containerRecoveredContainer returned to healthy
actionFailedAction execution error
retryLimitMax retries exhausted

Template variables: {{.ContainerName}}, {{.Action}}, {{.Reason}}, {{.Cycle}}, {{.MaxRetries}}, {{.Cooldown}}, {{.RuleName}}


API

MethodPathDescription
GET/api/healthLiveness check — returns version, bootTime, latestVersion
GET/api/diagnosticsDocker socket diagnostics
GET/api/containersWatched containers
GET/PUT/api/settingsApp settings
PUT/api/settings/themeSave theme preference
GET/POST/api/jobsList / create jobs
PUT/DELETE/api/jobs/{id}Update / delete a job
GET/PUT/api/notificationsNotification profiles
DELETE/api/notifications/{id}Delete a notification profile
POST/api/test-notificationSend a test notification
POST/api/scripts/dry-runExecute a script in an isolated container without triggering real actions
POST/api/scripts/dry-run/cleanupClean up dry-run containers
GET/PUT/api/scriptsScript allowlist
GET/PUT/api/docker-hostsMulti-host profiles
GET/api/docker-hosts/statusMulti-host status
GET/DELETE/api/historyAction history / clear all history
POST/api/actionTrigger a manual action
POST/api/containers/{id}/reset-cooldownReset monitoring cooldown for a container
GET/api/system-alertsActive system alerts (bell notifications)
POST/api/system-alerts/dismissDismiss alerts by ID
GET/api/auth/statusAuth state and setup status
POST/api/auth/loginLogin
POST/api/auth/logoutLogout
POST/api/auth/change-passwordChange password
POST/api/auth/disableDisable authentication

Unraid

Install via Community Applications or add the template manually:

https://raw.githubusercontent.com/darkmatterforge/chowkidar/main/unraid/chowkidar.xml

Map /mnt/user/appdata/chowkidar/config and set CHOWKIDAR_SECRET_KEY.


License

AGPL-3.0 — Copyright (C) 2026 Dark Matter Forge.

You may use and build on this software, but any modified version must remain open source under the same terms. See NOTICE for full usage terms and trademark information.

Tag summary

Content type

Image

Digest

sha256:4ea6b80f7

Size

76 MB

Last updated

3 days ago

docker pull darkmatterforge/chowkidar