• Stars
    star
    199
  • Rank 196,105 (Top 4 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 5 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Home Assistant in Proxmox LXC container

Many benefits can be gained by using a LXC container compared to a VM. The resources needed to run a LXC container are less than running a VM. Modifing the resouces assigned to the LXC container can be done without having to reboot the container. The serial devices connected to Proxmox can be shared with multiple LXC containers simulatenously.

Usage

Note: Before using this repo, make sure Proxmox is up to date.

To create a new LXC container on Proxmox and setup Home Assistant to run inside of it, run the following in a SSH connection or the Proxmox web shell.

bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/create_container.sh)"

After running the above command, you should modify the container's Resources (Cores, Memory, Root disk) before you continue to setup Home Assistant. Failure to do so could result in Home Assistant not functioning as expected. Modified Resources will be applied immediately without the need to reboot the container. Hardware changes to Proxmox (for example plugin/unplug USB device) requires the container to restart in order for Home Assistant to parse the changes.

Update device hooks

To update the list of devices that are shared with the LXC ID of 100, run the following in a SSH connection or the Proxmox web shell.

bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/set_autodev_hook.sh)" -s 100

Note: The changes will apply on the next start of LXC.

Copy data between containers

To ease the process of updating the LXC configuration, a script has been provided. To copy Home Assistant data from one container to another, run the following in a SSH connection or the Proxmox web shell.

bash -c "$(wget -qLO - https://github.com/whiskerz007/proxmox_hassio_lxc/raw/master/copy_data.sh)"

Known limitations

  • Unable to use bluetooth devices due to the limitation of LXC
  • Setting up container on a ZFS pool will cause issues with addons that use mySQL/MariaDB due to ZFS not implementing fallocate properly
  • WireGuard addon might generate a warning for IP forwarding being disabled. To enable this feature you'll need to add post-up echo 1 > /proc/sys/net/ipv4/ip_forward to /etc/network/interfaces under Proxmox, then reboot Proxmox. [Link]

Console

There is no login required to access the console from the Proxmox web UI. If you are presented with a blank screen, press CTRL + C to generate a prompt.