高木のブログ

Raspberry Pi上にDocker ComposeでHomebridgeを起動する

2020/12/27

Raspberry Pi上にDocker ComposeでHomebridgeを起動する手順。

手順

ディレクトリを作成し、移動

$ mkdir /path/to/homebridge
$ cd /path/to/homebridge

docker-compose.ymlを作成

$ vim docker-compose.yml
version: '3'
services:
  homebridge:
    image: oznu/homebridge:raspberry-pi
    restart: always
    network_mode: host
    volumes:
      - ./config:/homebridge
    environment:
      - PGID=1000
      - PUID=1000
      - HOMEBRIDGE_CONFIG_UI=1
      - HOMEBRIDGE_CONFIG_UI_PORT=8080

起動

$ docker-compose up -d

起動ログ

$ docker-compose logs -f

...

homebridge_1  | Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
homebridge_1  |
homebridge_1  |     ┌────────────┐
homebridge_1  |     │ XXX-XX-XXX │
homebridge_1  |     └────────────┘
homebridge_1  |
homebridge_1  | [12/26/2020, 10:14:29 PM] Homebridge v1.2.4 is running on port 51393.
homebridge_1  | [12/26/2020, 10:14:31 PM] [Homebridge UI] Homebridge Config UI X v4.36.0 is listening on :: port 8080
homebridge_1  | [12/26/2020, 10:14:32 PM] [Homebridge UI] Added new user: admin
homebridge_1  | [12/26/2020, 10:14:32 PM] [Homebridge UI] Username and password have been set to default:
homebridge_1  | [12/26/2020, 10:14:32 PM] [Homebridge UI] Username: admin
homebridge_1  | [12/26/2020, 10:14:32 PM] [Homebridge UI] Password: admin

確認

http://192.168.10.2:8080にアクセスする。

初期ユーザー名: admin
初期パスワード: admin

Homebridge001

Homebridge002

参考

Homebridge on Raspberry Pi · oznu/docker-homebridge Wiki


SNS でシェアする


ytkg

Written by ytkg, Twitter, GitHub