Skip to content

Instantly share code, notes, and snippets.

@bezalel6
Created May 11, 2024 05:31
Show Gist options
  • Save bezalel6/0c573a496465137011c3d768b1ec9559 to your computer and use it in GitHub Desktop.
Save bezalel6/0c573a496465137011c3d768b1ec9559 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Ensure the script is run as root
if [ "$(id -u)" -ne 0 ]; then
echo "Please run this script as root or with sudo"
exit 1
fi
# Update the system
apt update && apt upgrade -y
# Install required dependencies
apt install -y software-properties-common apparmor-utils apt-transport-https ca-certificates curl dbus jq network-manager socat avahi-daemon
# Ensure that Network Manager is installed and running
systemctl enable NetworkManager
systemctl start NetworkManager
# Download and install Docker
curl -fsSL https://get.docker.com | sh
# Install OS Agent
OS_AGENT_VERSION="1.4.1"
wget https://github.com/home-assistant/os-agent/releases/download/${OS_AGENT_VERSION}/os-agent_${OS_AGENT_VERSION}_linux_x86_64.deb
dpkg -i os-agent_${OS_AGENT_VERSION}_linux_x86_64.deb
rm os-agent_${OS_AGENT_VERSION}_linux_x86_64.deb
# Download and install Home Assistant Supervised
SUPERVISED_INSTALLER_VERSION="1.5.1"
wget https://github.com/home-assistant/supervised-installer/releases/download/${SUPERVISED_INSTALLER_VERSION}/homeassistant-supervised.deb
dpkg -i homeassistant-supervised.deb
rm homeassistant-supervised.deb
# Prompt user to configure Home Assistant Supervised
echo "Home Assistant Supervised installation is complete."
echo "Please visit http://your-debian-ip:8123 to access Home Assistant."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment