selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitHub
ha-dockermon logo

Self-host ha-dockermon

v0.0.13

Docker container monitor and control API for Home Assistant

AlphaOpen SourceMIT
Updated7 years ago
LanguageJavaScript
Setup difficultyEasy
Stars
289
Port
8126 (HTTP API)
Requires
Docker Engine
Docker
philhawthorne/ha-dockermon
Install with Docker

What is ha-dockermon?

HA Dockermon is a lightweight Node.js service that exposes a RESTful HTTP API for querying and controlling Docker containers. It is designed primarily for integration with Home Assistant, allowing users to monitor container state, start/stop/pause/unpause/restart containers, execute arbitrary commands inside containers, and retrieve CPU/memory statistics. The service connects to the Docker daemon via the local Unix socket or optionally over HTTP. It can be deployed as a Docker container (with the socket mounted), via Docker Compose, or run directly with Node.js. Configuration is done through a YAML file (debug flag, HTTP port, optional basic auth, Docker connection type and path). The API uses optional HTTP Basic Authentication for access control. There is no web UI; it is a headless API intended for automation.

Should you self-host ha-dockermon?

ha-dockermon scores 43/100 on selfhost.directory (how scoring works) and ranks #81 of 104 in Home Automation. It has 289 GitHub stars.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in JavaScript.

Its closest alternative on selfhost.directory is Home Assistant (91/100, 91 793 stars). It scores higher overall, so compare the two before you pick. See ha-dockermon vs Home Assistant side by side.

Features

  • ARM/Raspberry Pi support
  • Command execution in containers
  • Container lifecycle control
  • Container StatisticsKnown issue on some hosts (e.g., Synology NAS) may not return a response.
  • Container status monitoring
  • Custom Home Assistant componentMaintained separately by Joakim Sørensen (@ludeeus).
  • Docker socket or HTTP connection
  • Home Assistant RESTful switch integration
  • HTTP Basic Authentication
  • List all containers

ha-dockermon README

How to install ha-dockermon

Install ha-dockermon with Docker

Docker Engine with access to /var/run/docker.sock

docker run -d
--name=ha-dockermon --restart=always
-v /var/run/docker.sock:/var/run/docker.sock
-v /path/to/config:/config
-p 8126:8126
philhawthorne/ha-dockermon

Mount Docker socket and config directory. ARM tag available as :arm.

How to configure ha-dockermon

  • debugfalseIf set to true, will output some helpful debug messages to the console.

    If set to true, will output some helpful debug messages to the console.

    values: true, false

  • docker_connection.hostNoneThe host IP/Domain of the host Docker to connect to. Only used when type is http.

    The host IP/Domain of the host Docker to connect to. Only used when type is http.

    values: IP or domain

  • docker_connection.path/var/run/docker.sockThe path to the Docker socket.

    The path to the Docker socket.

    values: file path

  • docker_connection.portNoneThe port of the host Docker to connect to. Only used when type is http.

    The port of the host Docker to connect to. Only used when type is http.

    values: port number

  • docker_connection.typesocketHow the service connects to docker. Valid options are socket or http.

    How the service connects to docker. Valid options are socket or http.

    values: socket, http

  • http.passwordNonePassword for HTTP basic authentication. If set, must not be empty.

    Password for HTTP basic authentication. If set, must not be empty.

    values: string

  • http.port8126The HTTP port the service listens on.

    The HTTP port the service listens on.

    values: valid HTTP port

  • http.usernameNoneUsername for HTTP basic authentication. If set, must not be empty.

    Username for HTTP basic authentication. If set, must not be empty.

    values: string

More in Docker Management

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…