https://github.com/mwdle/homeassistantconfig
A sample Docker Compose configuration for the smart home services I use: Home Assistant, MQTT, Frigate, Music Assistant, and RouterRebooter.
https://github.com/mwdle/homeassistantconfig
docker docker-compose frigate frigate-nvr home-assistant home-assistant-config mosquitto-mqtt-broker mqtt-broker mqtt-docker mqtt-server music-assistant router-rebooter
Last synced: 5 months ago
JSON representation
A sample Docker Compose configuration for the smart home services I use: Home Assistant, MQTT, Frigate, Music Assistant, and RouterRebooter.
- Host: GitHub
- URL: https://github.com/mwdle/homeassistantconfig
- Owner: mwdle
- License: gpl-3.0
- Created: 2024-08-18T21:46:54.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-20T04:27:55.000Z (over 1 year ago)
- Last Synced: 2025-03-17T01:42:49.278Z (about 1 year ago)
- Topics: docker, docker-compose, frigate, frigate-nvr, home-assistant, home-assistant-config, mosquitto-mqtt-broker, mqtt-broker, mqtt-docker, mqtt-server, music-assistant, router-rebooter
- Homepage:
- Size: 25.4 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Multi-Service Docker Compose Configuration for Home Assistant
A sample Docker Compose configuration for the smart home services I use: [Home Assistant](https://www.home-assistant.io/), [Mosquitto MQTT](https://mosquitto.org/), [Frigate NVR](https://frigate.video/), [Music Assistant](https://music-assistant.io/), and [selenium/standalone-chrome](https://hub.docker.com/r/selenium/standalone-chrome) for Selenium automation within Home Assistant.
## Table of Contents
- [Description](#multi-service-docker-compose-configuration-for-home-assistant)
- [Getting Started](#getting-started)
- [License](#license)
- [Disclaimer](#disclaimer)
## Getting Started
1. Clone the repository:
```shell
git clone https://github.com/mwdle/HomeAssistantConfig.git
```
2. Create a folder on your system for Docker bind mounts / storing container files. The folder should have the following structure:
```shell
docker_volumes/
├── Frigate/
│ ├── config/
│ └── storage/
├── HomeAssistant/
│ ├── config/
│ └── .ssh/
├── MQTT/
│ ├── config/
│ ├── data/
│ └── log/
└── MusicAssistant/
└── data/
```
3. Create a file called `.env` in the same directory as `compose.yaml` containing the following properties:
```properties
DOCKER_VOLUMES= # The folder created in the previous step.
RTSP_USER= # For Frigate
RTSP_PASSWORD= # For Frigate
MQTT_USER= # For Frigate
MQTT_PASSWORD= # For Frigate
MUSIC_VOLUME= # A folder containing your local music library for Music Assistant.
ROUTER_PASSWORD= # For router rebooter pyscript automation
EXTENDER_PASSWORD= # For extender rebooter pyscript automation
```
4. Open a terminal in the directory containing the compose.yaml file.
5. Create docker networks for the containers
```shell
docker network create -d macvlan --subnet=192.168.0.0/24 --gateway=192.168.0.1 -o parent=eno1 AAA_LAN # Ensure the gateway and subnet match your LAN network. YOUR LAN SHOULD BE TRUSTED. AAA in the name ensures Docker uses this network as the primary interface for all connected containers.
docker network create Frigate
docker network create HomeAssistant
docker network create MusicAssistant
docker network create Chrome
```
The networks are configured in compose.yaml such that:
- Containers in the same network are accessible from each other by their container names.
- Music Assistant is in a macvlan, making it appear to be a physical interface on the host's LAN (allowing mDNS / device discovery). Make sure to reserve the IP address listed for Music Assistant in compose.yaml on your router's web interface.
- Home Assistant is in a macvlan, making it appear to be a physical interface on the host's LAN (allowing mDNS / device discovery). Make sure to reserve the IP address listed for Home Assistant in compose.yaml on your router's web interface.
- Frigate's Port 8555 (for WebRTC) is bound to port 8555 on the host.
- Frigate and MQTT can directly communicate.
- Home Assistant and MQTT can directly communicate.
- Home Assistant and Chrome can directly communicate for Selenium automation via pyscript.
- Home Assistant and Music Assistant can communicate so long as you add your Reverse Proxy for MA to the Home Assistant Docker network using a _Docker Network Alias_ to connect with.
- Home Assistant and Frigate can communicate so long as you add your Reverse Proxy for Frigate to the Home Assistant Docker network using a _Docker Network Alias_ to connect with.
6. Start the containers:
```shell
docker compose up -d
```
7. Configure Home Assistant Dashboard (Optional): After deploying Home Assistant with the router_rebooter pyscript app files from this repository and setting up template buttons in `configuration.yaml` to trigger the services, you can add a dashboard card for easy access to the rebooter functionality:
```yaml
type: entities
entities:
- entity: button.reboot_router
- entity: pyscript.router_rebooter_status
- entity: button.reboot_extender
- entity: pyscript.extender_rebooter_status
title: Rebooters
```
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Disclaimer
This repository is provided as-is and is intended for informational and reference purposes only. The author assumes no responsibility for any errors or omissions in the content or for any consequences that may arise from the use of the information provided. Always exercise caution and seek professional advice if necessary.