Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
selfhost:approach [2024/10/18 07:18] – willy | selfhost:approach [Unknown date] (current) – removed - external edit (Unknown date) 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== The Approach ====== | ||
- | |||
- | Self-hosting is something that grows by the months, getting more complex and elaborated over time. You start small, with some recycled hardware and makeshift cables to host some experimental services, then you start self-hosting important stuff. | ||
- | |||
- | One day your home internet connection is down and so you find out about how **reliability** important... | ||
- | |||
- | ==== Basics & Approaches ==== | ||
- | The following are the **very basics** that i assume you will take into consideration, | ||
- | * Have a **proper backup plan** in place (see [[selfhost: | ||
- | * Have **two** ISPs to provide a failsafe internet connection (see [[router: | ||
- | * Stored your data on some redoundant **RAID array** (see [[selfhost: | ||
- | * Have an **UPS** solution to protect your server / disk RAIDS from blackouts | ||
- | * Maybe even have an additional 4G SIM card for **last chance** internet connectivity? | ||
- | |||
- | Still, bad things happens over time, and the above guidelines are just the **bare minimum** that is mandatory to start a self-hosting journey. | ||
- | |||
- | In addition to the above basics, i will illustrate two approaches. One, the basic one, will fit your bill but might prove limited over time. The advanced one, instead, resemble more how things are done at a professional level and offer better reliaiblity and scalability at a higher price range and complexity. | ||
- | |||
- | |||
- | ==== The Simple approach ==== | ||
- | This is how i started, and while it has it's limitations and possible issues, it's a perfectly valid self.hosted approach. | ||
- | |||
- | The basic idea is to stay cheap, save on hardware using something you already have available and adapting to it's limitations. My choice has been an older, but powerfull, laptop which has quite a few advantages: | ||
- | * Doesn' | ||
- | * It's fairly low-power, which is good for something on 24/7 | ||
- | * It doesn' | ||
- | * It uses little space (specially compared to a PC with monitor& | ||
- | * Can fit vertically behind furniture, if you don't have a place for your self-hosted rig | ||
- | * Come with WiFi out of the box | ||
- | |||
- | But it also have some drawbacks: | ||
- | * Limited storage space (usually one SDD or maybe one NVME and one SSD) | ||
- | * Limited upgradeability CPU/RAM wise | ||
- | * Louder fans under heavy load | ||
- | * Usually one (or even none) internal network interface card | ||
- | * An always plugged in battery **will** swallow over time and can be a fire hazard | ||
- | |||
- | Most of the drawbacks can be overcome with modern USB devices. Today' | ||
- | |||
- | As a final word, this **simpler** approach works very well and might be all you need. The limitations come from the **single point of failure** that having only one piece of hardware implies: when it goes down, for hardware failure, software bugs or just maintenance, | ||
- | |||
- | == Storage == | ||
- | Let's focus. You need RAID storage, which means at very least two hard-drives (or SSDs) in RAID1. Better would be many devices on RAID6 or such, but letìs stick with two RAID1 mirrors for the simple approach. | ||
- | |||
- | Assuming your laptop cannot host two drives internally, you need to buy an external device. Laptops nowadays only come with various USB connectors, so i will not talk about E-SATA or other connection types, but only USB. Those are also the less expensive, so it's a win-win for the simple approach. | ||
- | |||
- | A few key concepts to follow: | ||
- | * Prefer USB-C over USB-3 | ||
- | * Don't go anything less than USB-3 (USB-2 and USB-1 are just too slow) | ||
- | * Get a multi-disk enclosure (2 disks, or even better 4 disks) | ||
- | * Get an externally powered enclosue, always | ||
- | * Get a JBOD (Just a Bunch Of Disks), not a RAID enclosure | ||
- | * Get a small UPS to keep those disks spinning on power loss | ||
- | * Do **not** be cheap on this: get a reliable brand and model. | ||
- | |||
- | As i said above, USB-3 and USB-C are more than capable to sustain disk troughputs and network loads, so USB will not be your bottleneck. but USB is quite unreliable, bot the protocol or bus itself, but the USB devices are usually low-quality. To ensure you have no issues over time, buy only reputable brands enclosures, do not save money on this item, and avoid RAID enclosures because i will be showing you how to leverage Linux built-in **software raid**, and JBOD enclosures have a better quality/ | ||
- | |||
- | Since laptops have limited USB ports, get only **one** big enclosure to fit all your drives, not many smaller ones. Prefer one which is externally powered, because they are more resillient, and buy a cheaper UPS power strip (anything in the lower end should fit) to keep the disks spinning then the occasional power outage **will** strike. In fact, having a laptpo which will survive a blackout while the disks don't, it's not a good nor safe idea. (remember: UPS batteries will need to be replaced every year or two, do it) | ||
- | |||
- | == Networking == | ||
- | The second issue with using a laptop | ||
- | |||
- | |||
- | |||
- | |||
- | ==== The Advanced approach ==== | ||
- | The advanced approach gives your more peace of mind, stronger resillience and more flexibility at the price of higher hardware cost, more knowledged involved, and more setup times. | ||
- | |||
- | |||
- | |||