I installed it with docker-compose, using the following docker-compose.yml:
1
version: '3.8'
2
services:
3
homeassistant:
4
image: homeassistant/home-assistant
5
container_name: home-assistant
6
restart: unless-stopped
7
volumes:
8
- ./home-assistant:/config
9
ports:
10
- '8123:8123'
11
environment:
12
- TZ=Asia/Shanghai
Home Assistant is then available at http://localhost:8123 in your browser.
TIP
To reach Home Assistant from the public internet, put it behind a reverse proxy with Nginx Proxy Manager — see Nginx Proxy Manager: A Comprehensive User Guide (in Chinese). At this point you probably still can’t get in remotely; the home-assistant container logs will show something like:
Terminal window
1
2024-12-2614:59:40.393ERROR (MainThread) [homeassistant.components.http.forwarded] A request from a reverse proxy was received from 192.168.97.1, but your HTTP integration is not set-up for reverse proxies
Fix it by editing the home-assistant config: add the following to configuration.yaml:
Home Assistant is a remarkably capable smart-home platform, and it makes short work of integrating Xiaomi devices. It supports a huge range of other devices too — browse the official Home Assistant docs to learn more.
Installing Home Assistant in Docker and Integrating Xiaomi Mi Home