OS (Armbian)
Installing
# download debian (minimal) image from https://www.armbian.com/orangepi3-lts/
# extract and write img to SD card
dd if=Armbian_community_24.8.0-trunk.495_Orangepi3-lts_bookworm_current_6.6.36_minimal.img of=/dev/sdX bs=4M status=progess
# boot from Orange Pi (w8 1-3 min)
# login via SSH (root:1234)
# in 1st login - u n prompt new root psswd
ssh root@pi-machine-ip
# install to eMMC
armbian-install
# -> boot from eMMC / NAND, system on eMMC/NAND
# -> ext4
# shutdown pi machine
halt -p
# when power is off - eject SD card and power on
# now u boot from eMMC, more speed and zbs!
# and again ssh login
ssh root@pi-machine-ip
Configure
# upgrade os
apt update
apt upgrade
# install armbian-config
apt install armbian-config
# configure what u need and change hostname over armbian-config
armbin-config
# configure cgroupv1 and apparmor
apt install apparmor
# in `/boot/armbianEnv.txt` set extraargs (space is separator)
# extraargs=apparmor=1 security=apparmor systemd.unified_cgroup_hierarchy=false systemd.legacy_systemd_cgroup_controller=false
# u can disable ipv6 if u do not use it, add to extraargs:
# ipv6.disable=1
# and update root file system image
update-initramfs -u
# and reboot
halt --reboot
# after reboot - plz check:
# apparmor
aa-status
# cgroupv1
grep cgroup /proc/filesystems
Dependencies
apt install \
apparmor \
bluez \
cifs-utils \
curl \
dbus \
jq \
libglib2.0-bin \
lsb-release \
network-manager \
nfs-common \
systemd-journal-remote \
systemd-resolved \
udisks2 \
wget -y
Docker
curl -fsSL get.docker.com | sh
# if u use not root user, plz add u user to docker group
usermod -aG docker <user>
OS Agent / Supervisord / HA
Sloppy hack
for avoid error “[error] Armbian 24.8.0-trunk.544 bookworm is not supported!” change PRETTY_NAME
in /etc/os-release
to:
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
Now u can install…
OS Agent
# https://github.com/home-assistant/os-agent/
# download latest from https://github.com/home-assistant/os-agent/releases/latest
wget https://github.com/home-assistant/os-agent/releases/download/1.6.0/os-agent_1.6.0_linux_aarch64.deb
dpkg -i os-agent_1.6.0_linux_aarch64.deb
# test OS Agent installation
gdbus introspect --system --dest io.hass.os --object-path /io/hass/os
Supervisord
# https://github.com/home-assistant/supervised-installer/
wget -O homeassistant-supervised.deb https://github.com/home-assistant/supervised-installer/releases/latest/download/homeassistant-supervised.deb
dpkg -i homeassistant-supervised.deb
# choose -> raspberrypi4-64
Now, Supervisord itself will raise everything you need in Docker, including HA. W8 few mins and check observer http://pi-machine-ip:4357/
and use HA http://pi-machine-ip:8123/
.
Of course, you also need to configure Nginx proxy server with SSL/TLS, but that is another story…
GL HF!
Tips
-
for find u machine-ip u can use nmap, aka:
sudo nmap -sS -p22 192.168.X.1/24
; -
for better security u need to disable password login via ssh and use key:
- on your machine:
ssh-copy-id root@pi-machine-ip
; - on pi-machine: set
PasswordAuthentication=no
in/etc/ssh/sshd_config
and restart sshdsystemctl restart sshd.service
.
- on your machine:
-
if u can trasfer docker files to USB:
- stop docker daemon -
systemctl stop docker.service
; - mv to USB stick -
mv /var/lib/docker /media/usb1/
; - edit
/etc/docker/daemon.json
and add:
"data-root": "/media/usb1/docker"
- for auto-mounting USB, add to
/etc/fstab
:
findUUID
fromls -l /dev/disk/by-uuid/
;
UUID=<log-device-uuid-here> /media/usb1 auto defaults,nofail,x-systemd.automount 0 2
- start docker daemon
systemctl start docker.service
.
- stop docker daemon -
-
if u disable ipv6 on host pi-machine, u can disable it for docker containers in
/etc/docker/daemon.json
:"ip6tables": true
-
if u are from Mother-Russia, configure docker mirrors in
/etc/docker/daemon.json
:"registry-mirrors": ["https://mirror.gcr.io", "https://huecker.io", "https://daocloud.io", "https://c.163.com/", "https://registry.docker-cn.com"]