1. Update the System Immediately
Run a full package upgrade right after flashing the image. This closes security holes and fixes board‑specific quirks that can cause flaky USB, Wi‑Fi, or performance drops. Reboot if the upgrade requests it.
- sudo apt update && sudo apt full-upgrade -y
- sudo reboot
2. Record OS, Kernel, and Image Details
Write down the OS version, kernel version, and image source. When something breaks later, this breadcrumb tells you what changed.
- cat /etc/os-release
- uname -r
3. Secure Access and Harden SSH
Change default passwords, create a dedicated user, and disable unused remote login methods. Set up key‑based SSH, then turn off password authentication and root login.
- adduser piuser
- usermod -aG sudo piuser
- ssh-keygen -t ed25519
- Edit /etc/ssh/sshd_config: PasswordAuthentication no, PermitRootLogin no
4. Rename Hostname and Fix Network Identity
Give the board a meaningful hostname and assign a stable IP address (static or DHCP reservation). Consistent DNS or /etc/hosts entries prevent scripts from breaking.
- sudo hostnamectl set-hostname home-assistant-pi
- Configure static IP in /etc/dhcpcd.conf or router DHCP reservation
5. Verify Storage Health and Apply System Tweaks
Check the microSD health; consider SSD or eMMC for long‑running services. Adjust swappiness, enable ZRAM, and relocate noisy logs to reduce wear.
- sudo smartctl -a /dev/mmcblk0
- echo 'vm.swappiness=10' | sudo tee -a /etc/sysctl.conf
- sudo apt install zram-config
6. Set Up Monitoring, Backups, and Final Documentation
Install a lightweight monitoring agent, back up configuration files, and note the final setup in a cheat‑sheet stored off‑device. Perform a final reboot and smoke test.
- sudo apt install htop net-tools
- rsync -a /etc/ mybackup:/sbc-config/
- Document OS, kernel, hostname, IP, storage, and core services