Skip to content

lento234/homelab

Repository files navigation

License Raspberry Pi

Ansible-based personal homelab setup.

Description

The project contains a set of ansible playbooks use to setup (and manage) a personal homelab infrastructure. The homelab runs on a Raspberry Pi 4 running on Debian.

Homepage

Setup

  1. Setup virtual environment using uv:
uv venv
source .venv/bin/activate
  1. Install python dependencies (incl. ansible):
uv pip install -r requirement.txt
  1. Use the make command runner to setup the homelab:
$ make
dry-run         Dry-run default playbook
ping            Ping all hosts
pre-commit      Run pre-commit on all files
run             Run default playbook run
vault-create    Create the secret vault file vault
vault           Edit the secret vault file vault
  1. Add hosts into the hosts.ini file (example):
[homelab]
heimdall ansible_python_interpreter=/usr/libexec/platform-python
  1. Modify group vars file group_vars/all/vars.yml

  2. Create and edit vault secrets:

$ make vault-create
  1. Run dry-run or run to deploy the infrastructure.
$ make dry-run

Hosted services

Server management

  • homer - A very simple static homepage for your server.
  • portainer.io - A centralized service delivery platform for containerized apps.
  • Watchtower - A container-based solution for automating Docker container base image updates.
  • Wireguard - Self-hosted VPN (optional: or use alternative service, e.g. (OpenVPN)) or Tailscale.
  • healthchecks - A cron monitoring tool written in Python & Django.
  • rdiff - Reverse differential backup tool, over a network or locally (or use similar ideas).

Monitoring

  • Glances - An Eye on your system.
  • Munin

Media

  • plex media server - Organizes video, music and photos from personal media libraries.
  • FreshRSS - A free, self-hostable RSS feed aggregator.

File storage & Sharing

  • nextcloud - ☁️ cloud Nextcloud server, a safe home for all your data.
  • photoprism - Photos App powered by Go and Google TensorFlow 🌈 ✨.
  • vaultwarden - Alternative implementation of the Bitwarden server.

Automation

  • home assistant - My self-hosting infrastructure, fully automated from empty disk to operating services.
  • grocy - Grocy is a web-based self-hosted groceries & household management solution for your home.

Hardware / software stack

  • Raspberry Pi 4 Model B 8GB: OKdo
  • OS: Debian bookworm (12)
  • Storage - (primary) Sandisk microSDXC 128GB (/, ext4)
  • Storage - (data) ZFS pool ~40 TB (/mnt/store/)

References

Homelab / Self-hosted

Home automation / IOT