Simple and Fast Installing Home Assistant Core (and Matter Server) on Android: No Root, No QEMU

Got an old Android phone and don’t want to buy a Raspberry Pi or a PC to host Home Assistant? This tutorial is for you!

Requirements: Android Phone – No Root Required

Credit: Special thanks to George-Seven for the Termux-Udocker repository.


Step 1: Install the Termux app from F-Droid.org

Note:

  • Although Termux is also available on the Play Store, according to the Termux developers, the version on F-Droid is the most stable.
  • After installing Termux, it is recommended, though not required, to install OpenSSH and enable remote access from a PC for easier interaction with the Termux Terminal. For details on setting up Termux remote access. See more: Termux Remote Access Guide.

Step 2: Install Git in Termux:

# Update & Upgrade Termux packages
pkg update && pkg upgrade
# Install git
pkg install git

Step 3: Install HomeAssistant-Termux

Clone HomeAssistant-Termux:

git clone https://github.com/huytungst/HomeAssistant-Termux.git

Go to the root directory of HomeAssistant-Termux:

cd HomeAssistant-Termux

Install Udocker from the cloned repository:

./install_udocker.sh

Run the script home-assistant-core.sh:

./home-assistant-core.sh

Wait about 10 minutes, then you can access Home Assistant on port 8123 (http://localhost:8123/)

Also, you can install and run the Python Matter Server to enable Matter compatibility.

Note: To keep both containers (Home Assistant Core and Python Matter Server) running at the same time, start each one in a separate Termux session. Two easy ways are either opening two Termux terminal sessions (using the Termux GUI) or using the screen command. See more

Run the script matter-server.sh:

./matter-server.sh

Then, enable the Matter Integration in Home Assistant and connect them using the WebSocket URL:

ws://localhost:5580/ws

Tips: Running Multiple Containers Simultaneously

To keep both containers (Home Assistant Core and Python Matter Server) running at the same time, start each one in a separate Termux session. Two easy ways are either opening two Termux terminal sessions (using the Termux GUI) or using the screen command.

Option 1: Using Termux GUI

  1. Open Termux.
  2. Start the first container in the initial Termux session.
  3. Open a new Termux session by swiping from the left edge to open the drawer, then selecting New Session.
  4. In this new session, start the second container.

Option 2: Using screen

If you prefer to use screen to manage multiple sessions in a single Termux window:

  1. Open Termux and install screen if you haven’t already:
    pkg install screen
    
  2. Start screen and create a new session:
    screen -S container1
    
  3. Start the first container in this screen session.
  4. To create a new screen session, detach from the current session by pressing Ctrl + A followed by D.
  5. Start a new session for the second container:
    screen -S container2
    
  6. Start the second container in this new session.
  7. To switch between sessions, use:
    screen -r container1  # For the first container
    screen -r container2  # For the second container
    

This completes the setup for running Home Assistant Core and the Matter Server on Android without root.

:bangbang: Known Issue: Home Assistant setup failed for some dependencies, including ‘bluetooth,’ ‘usb,’ ‘zeroconf,’ etc. :robot::wrench: Any help would be appreciated! :pray:

2 Likes

Hello!
After run script “home-assistant-core.sh” and downloading layer,
Error: runc or crun executable not found.
How to fix and run HA?

I have no idea… It worked fine for me on Samsung Galaxy A30 / Android 11 without any issues. Can you give some information about your phone model and it’s Android version?

I’m having exactly the same problem. Tried it multiple times on Android 8,10 and 11. Could it be some incompatibility with the latest version of Termux or Python?

Hi all,

When running “home-assistant-core.sh”, I get:
Error: manifest not found or not authorized
Error: no files downloaded
Error: Image or container not availale

Running on Android 6.0
Any Idea how to fix?

Tried it, very quick setup but some integrations I need are not working: Solarman(custom), Meteo France, Sonoff - this one seems to be related to zeroconf issue

I get
no image found in manifest for platform (linux/arm/v4)
no manifest for given image and platform
Error: no files downloaded

Samsung Tab A running lineage OS 20.0
Android 13.

Looking for tips to solve.

Did you login with ?
Try logout and run the script once more.