Seeking Advice: Making My Diverse Self-Hosted Setup Portable and Easily Swappable reddit / selfhosted ---------------------------------------------------------------------- nanithedata · 2023-12-09 20:33 Hello everyone I've been running a mix set of hardware for my home setup and I'm really happy with how all the services are working. However, I've been thinking on making this setup more portable and easily swappable/reproducible since doing this manually again would take me too much time and I would like to have a robust backup strategy for the infrastructure. **Current Setup**: 1. **Old Notebook**: Huawei matebook with broken screen running Jellyfin/Invidious/Koel. 2. **Raspberry Pis** * **Raspberry Pi 1**: Running Pi-hole for network-wide ad-blocking. * **Raspberry Pi 2**: Dedicated to PiVPN, so I can tunnel back. * **Raspberry Pi 3**: Executes a variety of custom scripts. 1. **Two Desktop PCs**: * **PC with GPU**: Currently running Proxmox for virtualization. * **PC with 6 Hard Drives**: Utilizing OpenMediaVault for NAS + some containers that use NAS data e.g. Photoprism. Each machine (real or virtual) in my setup is running its own instance of NGINX/Traefik as a reverse proxy, all secured with HTTPS. I've also implemented Authelia for two-factor authentication for an added layer of security for sensitive apps e.g. Firefly, Ghostfolio. **Goal**: My main goal now is to make this entire setup more modular and portable. Ideally, I want to be able to easily swap out or replace parts of the setup without causing major disruptions. For instance, if a Raspberry Pi needs replacement or if I want to upgrade the notebook or PCs. Maybe even changing the distribution of the containers. **Thoughts So Far**: * **Infrastructure as Code**: I've heard this could be a solution. Tools like Terraform or Ansible might help in recreating my setup quickly on new hardware. * **Uniform Virtualization**: Maybe standardizing on Proxmox across all devices might help? **Questions**: 1. Are there any tools or practices you'd recommend for achieving this level of modularity and portability ? 2. Would implementing a uniform virtualization layer across all devices help, and is it even practical ? (I heard for example that OMV is better with VM though might not be the case anymore if the drives are passed directly) I'm not even sure I am even looking in the right direction, so any pointers, experiences, or advice would be incredibly appreciated. Looking forward to your thoughts and thank you in advance! ---------------------------------------------------------------------- coffinspacexdragon · 2023-12-09 23:08 You could easily get rid of the Raspberry Pis and the old note book by running the same things in virtual machines on your existing proxmox host. You would get the portability of being able to move around and back up the vhds. If you upgrade the host you can just move the vhds to the new host. Better yet this can all be accomplished with one machine running whatever linux distro you prefer on your pc with 6 drives. Keep all your media and whatever on that, install kvm/qemu and docker/podman/whatever for your container apps, run your pi-hole or whatever dns in a vm, do your vpn host in another vm, and your scripts in another vm. If you chose to run pfSense or OPNsense as a router/firewall, you can eliminate several pis and vms by consolidating your ad blocking dns, reverse proxy and vpn in one box and you can back it up and make it portable just from utilizing the native configuration backups of each. All of your data from your firewall/router, ad blocker, reverse proxy and vpn can be backup up and transferred to another device if necessary from a simple xml file. ---------------------------------------------------------------------- nanithedata · 2023-12-09 23:42 Thank you for the pointers and I will certainly keep it in mind for the future. Unfortunately right now the Proxmox host is already running at full capacity and I can't afford upgrading to fit all the tasks that the other machines are doing. All my hardware are things that I simply had in a closet that were collecting dust due to poor or no resale value where I live. For the foreseeable future any additions will be incremental and this is why I was thinking about how to create a system that is robust to handle this ---------------------------------------------------------------------- NinjaFragrant7710 · 2023-12-10 08:40 I would advice to consolidate on each level, hardware, virtual and containers. For example if 2 hardware devices can be consolidated to one, or if a physical workload can be virtualised, and ultimately if something can be containerised. The ultimate goal imho is to containerise as much as possible. Don't underestimate the value a -relatively- cheap and low power SBC or NUC can provide if you use containers. Now, some general pointers for a good home lab is to have a solid network and storage infrastructure. For example you should run your server workloads in a dedicated vlan. This way you don't bombard your network with broadcast messages and you have increased security. I use terraform at work for cloud infrastructure, but I am not aware if it can be used locally. You be great if it did :) ---------------------------------------------------------------------- nanithedata · 2023-12-10 15:41 From my little experience it also seemed to me that containerizing whatever can be is the most portable/repeatable. I assumed that still some things such as the VPN/DNS are better off as separate machines such that I don't cut the connections for the others whenever I am fiddling with my stack. I really learn by breaking things and will most likely keep destroying everything every so often. I did not at all consider your comment about dedicating a vlan for the server workloads thank you for bringing this to my attention. Would consider having a dedicated machine just for the sensitive data ? Thanks again for sharing all of this!