A Raspberry PI homelab setup
Last updated: February 10, 2022
Install Rocky Linux OS
-
Download
RockyPi
Rocky Linux OS from Official Repowget https://download.rockylinux.org/pub/rocky/8/rockyrpi/aarch64/images/RockyRpi_x.x_xxxxxxxx.img.xz
-
Verify checksum of the
img.xz
with`RockyRpi_x.x_xxxxxxxx.sha256sum
:xzcat RockyRpi_x.x_xxxxxxxx.img.xz | sha256sum
-
Write image to SD card mounted at
/dev/sdX
:sudo bash -c "xzcat RockyRpi_x.x_xxxxxxxx.img.xz > /dev/sdX"
-
Initial login to raspberry pi with password
rockylinux
:ssh rocky@rockypi
-
Grow the SD card partition to max (where
/
is the3
rd partition)growpart /dev/sdX 3
-
Resize the fs to max
resize2fs /dev/sdX3
Setup Homelab using ansible playbook: Homelab
-
Important: Make sure to run
init
first separately, where it will create a default user withsudo
privileges. Editplaybook-setup.yml
appropriately and usejust
to run the playbookansible-playbook --diff -K --vault-password-file pass.key playbook-setup.yml # or: just run
-
Run additional setup roles:
ssh
,timezone
,packages
,upgrade
,dnfautomatic
,firewalld
:just run
Deploy all the services onto the raspberry pi
-
Install docker using
geerlingguy.docker
. -
Configure firewall to allow all ports for the services using
firewalld
role. -
Setup up a presistent volume for all the data for the docker containers using
fs
role. -
Deploy all the services using roles (
portainer
,watchtower
,pihole
, ...)