Turn an Android phone into an always-on Home Assistant hub. This runs Home Assistant Core inside a lightweight Ubuntu container via proot-distro.
Requirements & Limitations
- No Bluetooth: HA cannot access the phone's Bluetooth stack via Termux.
- No USB Dongles: Zigbee/Z-Wave sticks won't work without root.
- No mDNS/Auto-discovery: Android 10+ blocks
/proc/net/dev. You must add devices manually by IP address or cloud API. - No Docker/Add-ons: This is HA Core, not HA OS.
Installation
Run the following in Termux:
curl -O https://raw.githubusercontent.com/mayukh4/linux-anroid/main/setup-homeassistant.sh
bash setup-homeassistant.sh
Note: Installation takes 15–45 minutes as it compiles Python dependencies.
Management
Start HA:
bash ~/start-homeassistant.sh
Stop HA:
bash ~/stop-homeassistant.sh
Accessing the Dashboard
Open a browser on any device on your WiFi network and navigate to:
http://<your-phone-ip>:8123
To find your phone's IP, run this in Termux:
ip addr show wlan0 | grep 'inet '
Keeping HA running in the background
To prevent Android from killing the process, use termux-wake-lock and nohup:
termux-wake-lock
nohup bash ~/start-homeassistant.sh > ~/hass.log 2>&1 &