{"id":15148382,"url":"https://github.com/antonvanassche/homelab-automation","last_synced_at":"2026-01-19T09:01:29.458Z","repository":{"id":175026350,"uuid":"653220283","full_name":"AntonVanAssche/homelab-automation","owner":"AntonVanAssche","description":"All scripts used to automate the setup of my homelab ","archived":false,"fork":false,"pushed_at":"2024-01-08T17:08:14.000Z","size":19282,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T02:47:35.325Z","etag":null,"topics":["debian","grafana","homelab","homelab-automation","node-exporter","pi-hole","prometheus","raspberry-pi","transmission","vpn","wireguard"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntonVanAssche.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-13T16:17:28.000Z","updated_at":"2025-02-26T17:18:25.000Z","dependencies_parsed_at":"2024-11-02T07:15:02.314Z","dependency_job_id":null,"html_url":"https://github.com/AntonVanAssche/homelab-automation","commit_stats":{"total_commits":110,"total_committers":1,"mean_commits":110.0,"dds":0.0,"last_synced_commit":"c60f79be6f8ddce046b8745428b5ed4df8f255b6"},"previous_names":["antonvanassche/homelab-automation"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AntonVanAssche/homelab-automation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonVanAssche%2Fhomelab-automation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonVanAssche%2Fhomelab-automation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonVanAssche%2Fhomelab-automation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonVanAssche%2Fhomelab-automation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntonVanAssche","download_url":"https://codeload.github.com/AntonVanAssche/homelab-automation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonVanAssche%2Fhomelab-automation/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28565001,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T08:53:44.001Z","status":"ssl_error","status_checked_at":"2026-01-19T08:52:40.245Z","response_time":67,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debian","grafana","homelab","homelab-automation","node-exporter","pi-hole","prometheus","raspberry-pi","transmission","vpn","wireguard"],"created_at":"2024-09-26T13:03:25.023Z","updated_at":"2026-01-19T09:01:29.439Z","avatar_url":"https://github.com/AntonVanAssche.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003ch1\u003e\n        Homelab Automation\n    \u003c/h1\u003e\n    \u003cp align=\"center\"\u003e\n        All scripts used to automate the setup of my homelab \n        \u003cbr/\u003e\n        \u003cstrong\u003e·\u003c/strong\u003e\n        \u003ca href=\"https://github.com/AntonVanAssche/homelab-automation/issues\"\u003eReport Bug\u003c/a\u003e\n        \u003cstrong\u003e·\u003c/strong\u003e\n        \u003ca href=\"https://github.com/AntonVanAssche/homelab-automation/issues\"\u003eRequest Feature\u003c/a\u003e\n   \u003c/p\u003e\n\u003c/div\u003e\n\n## About The Project\n\n\u003cimg src=\"./assets/raspberry-pi-4b.png\" alt=\"img\" align=\"right\" width=\"25%\"\u003e\n\nThe Homelab Project is a personal endeavor to create a small-scale, self-hosted infrastructure using two Raspberry Pi 4B devices.\nThe project consists of two servers, named Homer and Marge, each serving different purposes within the homelab environment.\nBoth servers run Debian Bullseye and are completely automated using Bash scripts.\nThe script will install and configure things like AppArmor, firewalld, Podman and server specific applications.\nAnd yes I know that firewalld isn't a normal choice for a debian based distribution, but I like it more than ufw, so deal with it 😁.\nSame goes for Podman, I just like it more than Docker, so I'm using it instead.\n\n## Encountered Issues\n\nOriginally, I was planning on using a RHEL-based distribution for the servers, such as Oracle Linux 9 or Fedora Server 38.\nBut due to the lack of support for the Raxda Rock Pi SATA HAT, I had to switch to Debian Bullseye.\nI tried to get the SATA HAT working on Fedora Server 38 by packaging the drivers myself in a RPM package, which successfully installed the drivers.\nBut made me end up in the well beloved \"Dependency Hell\" and I couldn't get the drivers to work properly.\nFor example, the GPIO drivers are packaged differently in Fedora Server 38 than in Debian Bullseye, which meant that I had to rewrite the SATA HAT drivers to get them to work with the GPIO drivers in Fedora Server 38.\n\n## Server: Homer\n\nEmby takes the spotlight on Homer, functioning as the media streaming powerhouse. With Emby, I can effortlessly stream my media files to various devices throughout my home. It provides a seamless and enjoyable media experience, allowing me to access my favorite movies, TV shows, and documentaries with ease.\n\nTorrenting capabilities are also integrated into Homer through its transmission-daemon instance. Transmission serves as a BitTorrent client, empowering me to download and seed torrent files efficiently. It adds another dimension of content acquisition to my media server setup.\n\nAdditionally, Homer boasts an essential component: Grafana. This powerful tool enables me to monitor both Homer and Marge through an intuitive web interface. Thanks to Prometheus and Node Exporter, both servers are continuously monitored, providing valuable insights into their performance and health.\n\nTo streamline the monitoring process, I've automated the creation of Grafana dashboards using Grafana's API. These dashboards are automatically provisioned using a dedicated provisioning script, ensuring that I have access to the most relevant and up-to-date information at all times.\n\nIn summary, Homer is a multifaceted server that elevates my media streaming experience with Emby, empowers torrenting with Transmission, and facilitates comprehensive monitoring through Grafana, Prometheus, and Node Exporter. It serves as a central hub for all my media-related activities and ensures that my servers are running optimally and efficiently.\n\n## Server: Marge\n\n\u003cimg src=\"./assets/rockpi-sata-kit.png\" alt=\"img\" align=\"right\" width=\"25%\"\u003e\n\nMarge is my dedicated Network-Attached Storage (NAS) server designed to provide secure data storage and advanced network functionalities within my homelab environment. Marge is equipped with a RAID 5 array, comprising four SATA HDDs, ensuring data redundancy and availability.\n\nTo seamlessly integrate Marge into the network, I've deployed Samba, an open-source implementation of the Server Message Block (SMB) protocol. Samba enables effortless file sharing and network integration, allowing other devices on the network to access and interact with the stored data. Whether it's a Windows, macOS, or Linux machine, Marge provides compatibility and interoperability, facilitating smooth file transfers, sharing, and collaborative workflows across different operating systems.\n\nTo expand Marge's capabilities, I've integrated additional services that enhance network security and privacy. First, I've set up a Pihole instance, utilizing Unbound as the DNS forwarder. Pihole acts as a DNS sinkhole, effectively blocking advertisements and trackers at the network level. With Pihole in place, all devices within the network benefit from network-wide ad-blocking, providing a cleaner and more streamlined browsing experience.\n\nIn addition to ad-blocking, Marge serves as a WireGuard VPN server, ensuring secure remote access to the homelab environment. WireGuard, a modern and efficient VPN protocol, enables encrypted communication between external devices and the network. This allows me to connect to the homelab securely from anywhere in the world, accessing resources and services hosted on Marge with peace of mind.\n\nTo overcome the limitations of connecting SATA devices directly to a Raspberry Pi, I've integrated the Raxda Rock Pi SATA HAT into Marge's setup. This HAT expands the Raspberry Pi's capabilities, allowing the connection of up to four SATA devices. By utilizing the GPIO pins and USB 3 buses, the SATA devices seamlessly integrate with Marge's storage infrastructure, providing reliable and expandable storage options.\n\nIn summary, Marge serves as a robust NAS solution with Samba for seamless file sharing, Pihole with Unbound for network-wide ad-blocking, and WireGuard VPN for secure remote access. Together, these services create a reliable and secure storage environment while enhancing privacy and accessibility within my homelab setup.\n\n## Setup Guide\n\n### Prerequisites\n\nDepending on the server you want to set up, different environment variables need to be added to the `.env` file.\nThis file must be placed in the `provisioning` directory.\n\n#### Homer\n\nHomer requires the following environment variables to be set:\n\n```bash\n# Network configuration\nNETWORK_INTERFACE=                      # e.g. \"eth0\"\nHOMER_IP_ADDRESS=                       # e.g. \"192.168.0.2\"\nMARGE_IP_ADDRESS=                       # e.g. \"192.168.0.3\"\nSUBNET_MASK_CIDR=                       # e.g. \"24\"\nDEFAULT_GATEWAY=                        # e.g. \"192.168.0.1\"\nDNS_SERVER=                             # e.g. \"1.1.1.1\"\n\n# Host configuration\nHOST_NAME=                              # \"homer\" or \"marge\"\nUSER_NAME=                              # e.g. \"homer\"\nUSER_PASSWORD=                          # e.g. \"password\"\n\n# Timezone configuration\nTIMEZONE=                               # e.g. \"Europe/Brussels\"\n\n# Server configuration\nSERVER_DOMAIN=                          # e.g. \"awesome-homelab.com\"\n\n# Grafana contact point\nDISCORD_WEBHOOK_URL=                    # e.g. \"https://discord.com/api/webhooks/...\"\n```\n\n#### Marge\n\nMarge requires the following environment variables to be set:\n\n```bash\n# Network configuration\nNETWORK_INTERFACE=                      # e.g. \"eth0\"\nHOMER_IP_ADDRESS=                       # e.g. \"192.168.0.2\"\nMARGE_IP_ADDRESS=                       # e.g. \"192.168.0.3\"\nSUBNET_MASK_CIDR=                       # e.g. \"24\"\nDEFAULT_GATEWAY=                        # e.g. \"192.168.0.1\"\nDNS_SERVER=                             # e.g. \"1.1.1.1\"\n\n# Host configuration\nHOST_NAME=                              # \"homer\" or \"marge\"\nUSER_NAME=                              # e.g. \"marge\"\nUSER_PASSWORD=                          # e.g. \"password\"\n\n# Timezone configuration\nTIMEZONE=                               # e.g. \"Europe/Brussels\"\n\n# Pi-hole configuration\nPIHOLE_PASSWORD=                        # e.g. \"password\"\n\n# WireGuard configuration\nPUBLIC_IP_ADDRESS=                      # e.g. \"209.141.217.63\" (https://www.whatismyip.com/)\n```\n\n### Installation\n\nTo install the server, navigate to the `provisioning` directory and run the `init.sh` script.\n\n#### Homer\n\n```console\n# cd provisioning\n# ./init.sh\n```\n\n**Note:** The script **must** be run as root (`sudo -i`).\n\n#### Marge\n\nIn case you want to install Marge, you'll have to run the `install.sh` script located in the `rockpi-sata` directory first.\nSimply navigate to the `rockpi-sata` directory and run the `install.sh` script.\n\n```console\n# cd rockpi-sata\n# ./install.sh\n# systemctl reboot\n```\n\nAfter the installation of the SATA HAT, navigate back to the `provisioning` directory and run the `init.sh` script.\n\n```console\n# cd provisioning\n# ./init.sh\n```\n\n**Note:** The script **must** be run as root (`sudo -i`).\n\n## Contributing\n\nFeel free to contribute to this repository by submitting pull requests with improvements, bug fixes, or additional server configurations.\nYour contributions are highly appreciated!\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details.\n\n## References\n\n-   [Raxda Rock Pi SATA HAT Documentation](https://wiki.radxa.com/Dual_Quad_SATA_HAT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonvanassche%2Fhomelab-automation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantonvanassche%2Fhomelab-automation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantonvanassche%2Fhomelab-automation/lists"}