Case Study | Submitted Nov 25th, 2023

Home Labs: Self-Hosted Digital Ecosystem

Self-Hosted Cloud Storage, Media, Ad Blocking, and Code Development [cite: 15, 12]

Abstract & Motivation

The rise of self-hosted home labs is a compelling response to growing concerns about data privacy, personalization, and control in the digital age[cite: 532, 533]. This project presents a methodology for setting up a self-hosted ecosystem, integrating essential services to give the user total control over their data and digital experience[cite: 26, 535].

The integrated system includes Cloud Storage, a Torrent Client, a Media Server, a Network-Wide Ad-Blocker, and a Code Development Server[cite: 37].


Technology & Architecture

Raspberry Pi 5 Board Components

The Raspberry Pi 5 Single Board Computer [cite: 12]

Hardware & OS Foundation

  • SBC: Raspberry Pi 5 (chosen for its cost, power-efficiency, and performance)[cite: 49, 388, 389].
  • CPU: Broadcom BCM2712 2.4GHz quad-core 64-bit Arm Cortex-A76[cite: 67].
  • OS: Raspberry Pi OS Lite (64-bit) (Linux ARM-64 Based)[cite: 77].
  • Access: Server is accessed headless using SSH (Secure Shell) to conserve resources[cite: 391, 393].

Core Software Stack

  • Virtualization: Docker (uses OS-level virtualization to deliver software in isolated containers)[cite: 397].
  • Management UI: Portainer (lightweight management tool for Docker environments)[cite: 398].
  • Web/DB: Apache2 (Web Server) [cite: 403] , PHP, and MariaDB (Database Server)[cite: 82].
  • Security: Twingate (docker image) for secure, private remote access[cite: 401, 402].

Integrated Services & Applications

Cloud & Development

Nextcloud: File hosting, office suite, and calendar[cite: 227].

Code Server: Run VSCode in the browser remotely[cite: 451].

Media & Networking

Jellyfin: Free software media server for streaming[cite: 446].

Pi-hole: Network-wide DNS-based ad and tracker blocker[cite: 314].

Qbittorrent: Torrent client for file downloading[cite: 305].


Performance & Metrics

Database Comparison (Memory)

MariaDB vs MySQL Memory Usage
  • Result: MariaDB consumed the least amount of memory across all use cases (Idle, Moderate, Heavy)[cite: 471].
  • Heavy Usage: MariaDB used 200 memory units compared to MySQL's 887 , confirming its choice for performance-focused home labs[cite: 471, 486, 482].

Server Stress Testing

Jellyfin Streams vs CPU Utilization Graph
  • Jellyfin Load: The server successfully handled 7 simultaneous users streaming media[cite: 524]. Stream lag occurred upon the 8th user connection[cite: 525, 526].
  • Ad Blocker Benefit: Pi-hole reduces bandwidth usage and data consumption by preventing unwanted traffic, improving overall network performance[cite: 443, 444].