1. write to sd card

download the latest image file, check below the references section.

umount -v /dev/sda?
xzcat img/raspios/2022-09-22-raspios-bullseye-arm64-lite.img.xz | sudo dd of=/dev/sda bs=4M iflag=fullblock oflag=direct status=progress

2. resize the microSD

test -f /bin/growpart || sudo yum -y install cloud-utils-growpart
sudo growpart /dev/sda 2
sudo fsck -fyv /dev/sda2
sudo resize2fs /dev/sda2

3. enable & configure SSH

(re)mount the SD card

touch $(ls -d /run/media/*/boot/)ssh
sudo mkdir -p $(ls -d /run/media/*/rootfs/root)/.ssh
curl -ns http://d01cid.ddns.net/sharel/img/sshkeys/ssh-20200601.tgz | sudo tar xz -C $(ls -d /run/media/*/rootfs/root)/.ssh/
sudo rm $(ls -d /run/media/*/rootfs/root)/.ssh/id_rsa
sudo chown root:root $(ls -d /run/media/*/rootfs/root)/.ssh/ -R
umount /run/media/*/*

Remove the SD card and put it in the SD slot of the raspberry.

Power on and determine the IP address/name of the device.

4. aftercares

ssh root@
apt update; apt -y dist-upgrade
curl -s http://d01cid.ddns.net/.sec/getsec | bash
/bin/cid-init | bash

5. homeassist

curl -ns http://d01cid.ddns.net/sharel/bin/inst-ha | bash

6. optional

6.1. apache

curl -ns http://d01cid.ddns.net/sharel/bin/inst-apache2 | bash

6.2. 3proxy

 source /etc/cid.conf
 wget -nv http://d01cid.ddns.net/sharel/img/3proxy/3proxy-0.9.3.$(uname -m) -O /bin/3proxy
 chmod +x /usr/bin/3proxy
 wget -N -nv http://d01cid.ddns.net/sharel/etc/3proxy.cfg -P /etc/
# sed -i s~"#tcppm 1xx"~"tcppm 1${dnsdomain:1:2}"~ /etc/3proxy.cfg
 mkdir -p /var/log/3proxy
 wget -N -nv http://d01cid.ddns.net/sharel/usr/lib/systemd/system/3proxy.service -P /usr/lib/systemd/system/
 systemctl enable --now 3proxy.service

6.3. rtunnel

wget -N -nv http://d01cid.ddns.net/sharel/bin/rtunnel -P /bin/
wget -N -nv http://d01cid.ddns.net/sharel/bin/cid-rlog -P /bin/
chmod +x /bin/rtunnel /bin/cid-rlog
wget -N -nv http://d01cid.ddns.net/sharel/usr/lib/systemd/system/ss-rtunnel.service -P /usr/lib/systemd/system/
systemctl enable --now ss-rtunnel.service

7. references