Sign inSign up

mneveroff/ipmi-server

By mneveroff

•Updated over 2 years ago

IPMI Server Docker Container for Home Assistant. Details: https://github.com/mneveroff/ipmi-server

Image
0

10K+

mneveroff/ipmi-server repository overview

⚠️ ARCHIVED: This repository is no longer actively maintained as I've moved to HA OS. The Docker Hub image will remain available but is not recommended. Feel free to fork this repo—I'm happy to link any active forks here.

⁠IPMI Docker Container for Home Assistant

Repository: https://github.com/mneveroff/ipmi-server⁠

Installation guide: https://neveroff.dev/blog/ipmi-control-in-apple-home/⁠

⁠Details of the container

⁠IPMI Server

This container is a lightweight fully-fledged webserver that allows us to execute ipmitool⁠ commands and returns a json object with some results, courtesy of @ateodorescu⁠ and their Home Assistant Add-on, ipmi-server⁠ and uses their Symphony app and nginx configuration.

The image itself is based on the HomeAssistant Add-on, so contains a fair amount of junk, it's on my to-do to significantly reduce the size of the image whilst keeping the functionality.

⁠Applications

This repository is provided for convenience, so people, including myself, can pull it from docker hub and wouldn't have to build it themselves.

It was initially inspired by the home-assistant-ipmi⁠ by @ateodorescu⁠.

WARNING This container's content contains several unpatched CVEs, most notably CVE-2023-24540⁠⁠, CVE-2023-24538⁠⁠ and CVE-2022-23806⁠⁠ for stdlib and CVE-2023-38545⁠⁠ for alpine. I can't be bothered with updating the underlying home assistant add-on base image, so please isolate the container well and ensure that it's only accessible via the caddy_net.

⁠How to use

⁠Docker Compose

I'm assuming you're using caddy as your reverse-proxy, but it's largely irrelevant.

This docker-compose will set up the container as is, and it will become available using http://ipmi_server:80 from any other container on the same network.

# docker-compose.yml
services:

  ipmi_server:
    image: mneveroff/ipmi-server:1.0.0
    container_name: ipmi_server
    hostname: ipmi_server
    restart: unless-stopped

    env_file: .env

networks:
  default:
    name: $DOCKER_MY_NETWORK
    external: true
# .env
TZ=Europe/London
DOCKER_MY_NETWORK=caddy_net
⁠Integrating it with HomeAssistant

To integrate it with HomeAssistant you can use home-assistant-ipmi⁠ by @ateodorescu⁠.

There is a PR⁠ with updated version of home-assistant-ipmi, if it's accepted then as of version 1.3.0 you'll be able to specify ipmi-server host, set it to ipmi_server and your port to 80 in the configuration and it'll be available in HomeAssistant.

If that hasn't happened then all you need is to edit the contents of custom_components/ipmi/const.py, replacing the IPMI_URL = "http://localhost" with IPMI_URL = "http://ipmi_server" (don't omit http:// as it's crucial). Reload the entire Home Assistant and it should start working (don't forget to still set port to 80).

⁠How to build it yourself

If you want to build this container yourself feel free to use

docker build \                         
  --build-arg BUILD_ARCH=amd64 \
  --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
  --build-arg BUILD_REF=$(git rev-parse --short HEAD) \
  --build-arg BUILD_VERSION=1.0.0 \
  --build-arg BUILD_REPOSITORY="MNeverOff/ipmi-server" \
  -t ipmi-server:1.0.0 .

Replace the repository, and <name>:<version> respectively

The resulting docker container can to be used with -p 9595:80 if you want to quickly test it against localhost:9595

Tag summary

Content type

Image

Digest

sha256:5d9a5bf59…

Size

32.6 MB

Last updated

over 2 years ago

docker pull mneveroff/ipmi-server