Skip to content
Home » Instructions: Install Home Assistant as LXC container in Proxmox

Instructions: Install Home Assistant as LXC container in Proxmox

Advertisements

Some of the links shared in this post are affiliate links. If you click on the link and make a purchase, we will receive an affiliate commission at no additional cost to you.


Installing Home Assistant on a Proxmox server as an LXC container is an efficient way to run the home automation platform in a virtualized environment. This method offers advantages such as lower resource consumption and better performance compared to a full VM, but comes with disadvantages in terms of flexibility and security. In this guide, I will show you step by step how to install Home Assistant in an LXC container on Proxmox using the scripts from tteck.github.io.

LXC Container or VM – Which is better?

LXC is a container platform similar to Docker or Kubernetes, which means that each LXC container shares the kernel with the host. For this reason, only Linux operating systems can be used. LXC containers have some disadvantages:

If the resources allow it, you should rely on a fully virtualized Homeassistant instance, i.e. the installation of Homeassistant OS in a virtual machine. With this variant, USB devices can also be passed through without creating the security gap that Homeassistant has root access to the host, i.e. Proxmox itself, in the privileged LXC container.

Proxmox: Install Homeassistant as LXC container under Proxmox

If you have carefully weighed up the decision to install Homeassistant in a VM or an LXC container and have decided in favor of the LXC variant, continue here.

Prerequisites

Before we start the installation, make sure that the following requirements are met:

  1. Proxmox VE installed and configured: Make sure that your Proxmox Virtual Environment is correctly set up and ready to use.
  2. Network access: Your Proxmox server should have an active Internet connection.
  3. SSH access: You should have SSH access to your Proxmox server or be able to use the web shell.
  4. PVE 8.2.2 with kernel 6.8.4-3-pve or newer

Step 1: Preparation for Proxmox

  1. Open the Proxmox web interface: Log in to your Proxmox web interface by accessing the IP address or hostname of your Proxmox server in a web browser.
  2. Check storage: Make sure that there is enough disk space on the storage volume on which you want to install the LXC container.

Step 2: Create LXC container for Home Assistant

The easiest way to create an LXC container for Home Assistant in Proxmox is to use an automation script.

  1. Prepare the script: Open the shell in the Proxmox web interface or connect to your Proxmox server via SSH.

2. execute the script: Enter the following command in the shell to run the Home Assistant LXC script from tteck.github.io:

bash -c "$(wget -qLO - https://github.com/tteck/Proxmox/raw/main/ct/homeassistant-core.sh)"

3. follow the instructions: The script will automatically download all required packages and create the LXC container for Home Assistant. Select Ubuntu 24.04 as the operating system.

During execution, you will be prompted to specify some options such as container ID, host name and the size of the root file system. Follow the instructions on the screen to make the desired settings.

4. start Home Assistant: Once the script has been successfully executed, Home Assistant should be automatically started as a service in the container. You can check the status of the Home Assistant service in the console of the LXC container with :

systemctl status home-assistant@homeassistant

5. access to Home Assistant: Open a web browser and enter the IP address of the container followed by port 8123, e.g. http://192.168.1.100:8123. You can find out the exact IP address in the Proxmox web interface or via ip a in the container console.

The Homeassistant Config file is located under the following path:

/var/lib/docker/volumes/hass_config/_data

Step 3: Basic configuration of Home Assistant

  1. Start the setup wizard: The first time you access the Home Assistant interface, you will be guided through a setup wizard. This is where you set up your user account and configure the basic settings such as language and location.
  2. Add integrations: Go to “Settings” > “Integrations” and add all the required smart home devices and integrations.

Step 4: Create backups

It is advisable to set up automatic backups so that Homeassistant can be restored quickly if necessary. Backups can be created by Proxmox or by Homeassistant itself.

Installing Home Assistant as an LXC container in Proxmox is an efficient way to run the home automation platform. The script from tteck.github.io makes setup quick and easy, and the advantages of an LXC container – such as lower resource consumption and better performance – make this method particularly attractive.

Due to the automatic administration and configuration via the script, this approach is also suitable for users who do not yet have in-depth knowledge of Proxmox or Linux.

Leave a Reply

Your email address will not be published. Required fields are marked *

Mastodon