Setting up home server¶
Setup static IP/disable Wifi¶
Download debian: Debian -- The Universal Operating System
Create usb bootdrive: Rufus - Create bootable USB drives the easy way
Setup basic utils in root:
su root
apt install sudo passwd login adduser util-linux
/usr/sbin/adduser clifton sudo # add user to sudo priveleges
Allow laptop to continue running with lid closed:
sudo vi /etc/systemd/logind.conf
Add:
HandleLidSwitch=ignore
HandleLidSwitchDocked=ignore
Restart daemon:
sudo systemctl restart systemd-logind
find name of lan port:
ip a
Enable lan port:
sudo ip link set enp2s0f0 up
edit network interfaces:
sudo vi /etc/network/interfaces
add:
# Loopback interface
auto lo
iface lo inet loopback
# Ethernet static IP
auto enp2s0f0
iface enp2s0f0 inet static
address 192.168.1.50
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 1.1.1.1 8.8.8.8
# Disable Wi-Fi on boot
allow-hotplug wlp3s0
iface wlp3s0 inet manual
pre-up ip link set wlp3s0 down
disable wifi:
sudo ip link set wlp3s0 down
restart networking:
sudo systemctl restart networking
Install docker + home assisstant¶
Docker:
sudo apt update
sudo apt install docker.io -y
sudo systemctl enable docker
HA:
sudo docker run -d \
--name homeassistant \
--restart=unless-stopped \
-e TZ=Africa/Johannesburg \
-v /home/ubuntu/homeassistant:/config \
--network=host \
ghcr.io/home-assistant/home-assistant:stable