Skip to content

A Raspberry PI homelab setup

Last updated: February 10, 2022

Install Rocky Linux OS

  1. Download RockyPi Rocky Linux OS from Official Repo

    wget https://download.rockylinux.org/pub/rocky/8/rockyrpi/aarch64/images/RockyRpi_x.x_xxxxxxxx.img.xz
    
  2. Verify checksum of the img.xz with `RockyRpi_x.x_xxxxxxxx.sha256sum:

    xzcat RockyRpi_x.x_xxxxxxxx.img.xz | sha256sum
    
  3. Write image to SD card mounted at /dev/sdX:

    sudo bash -c "xzcat RockyRpi_x.x_xxxxxxxx.img.xz > /dev/sdX"
    
  4. Initial login to raspberry pi with password rockylinux:

    ssh rocky@rockypi
    
  5. Grow the SD card partition to max (where / is the 3rd partition)

    growpart /dev/sdX 3
    
  6. Resize the fs to max

    resize2fs /dev/sdX3
    

Setup Homelab using ansible playbook: Homelab

  1. Important: Make sure to run init first separately, where it will create a default user with sudo privileges. Edit playbook-setup.yml appropriately and use just to run the playbook

    ansible-playbook --diff -K --vault-password-file pass.key playbook-setup.yml # or: just run
    
  2. Run additional setup roles: ssh, timezone, packages, upgrade, dnfautomatic, firewalld:

    just run
    

Deploy all the services onto the raspberry pi

  1. Install docker using geerlingguy.docker.

  2. Configure firewall to allow all ports for the services using firewalld role.

  3. Setup up a presistent volume for all the data for the docker containers using fs role.

  4. Deploy all the services using roles (portainer, watchtower, pihole, ...)


Last update: March 9, 2022