cmc/cleberg.net

My personal web garden & blog.

clone: git clone https://gitbay.org/cmc/cleberg.net.git

main: content/blog/2020-05-03-homelab.org · raw

  1#+date:        [2020-05-03 Sun 00:00:00]
  2#+title:       A Look Inside My Homelab
  3#+description: A retrospective guide after throwing together the first iteration of my home lab.
  4#+slug:        homelab
  5#+filetags:    :self-hosting:
  6
  7* What is a Homelab?
  8
  9Starting as a developer, I have stayed away from hardware-based hobbies (other
 10than building a gaming desktop). However, as the quarantine for COVID-19
 11stretches out further and further, I found myself bored and in search of new
 12hobbies. After spending the last few months browsing the [[https://www.reddit.com/r/homelab/][r/homelab]] subreddit, I
 13decided it was time to jump in and try things out for myself.
 14
 15Since I am a beginner and just recently graduated from college, everything I've
 16done so far in my homelab is low-budget.
 17
 18* Hardware
 19
 20** Raspberry Pi 4
 21
 22Luckily, I had actually purchased a [[https://www.raspberrypi.org/products/raspberry-pi-4-model-b/][Raspberry Pi 4]] before the quarantine started
 23so that I could try to keep Plex Media Center running, even while my desktop
 24computer was turned off. I started here, using the Pi to hold Plex and Pi-hole
 25until I grew tired with the slow performance.
 26
 27Here are the specifications for the Pi 4:
 28
 29- Broadcom BCM2711, Quad core Cortex-A72 (ARM v8) 64-bit SoC @ 1.5GHz
 30- 4GB LPDDR4-3200 SDRAM
 31- Gigabit Ethernet
 32- H.265 (4kp60 decode), H264 (1080p60 decode, 1080p30 encode)
 33- 64 GB MicroSD Card
 34
 35** Dell Optiplex 5040
 36
 37Since I wasn't happy with the Pi as my main server, I turned to Craigslist. I
 38know a lot of other homelabbers use Ebay, but I can't seem to ever trust it
 39enough to purchase items on there. So I used Craigslist and found a Dell
 40Optiplex 5040 desktop computer on sale for $90. While this computer might be
 41underpowered, it was one of the few computers under $100 that was available
 42during quarantine.
 43
 44Here are the specifications for the Dell Optiplex 5040:
 45
 46- Intel Core i3 6100
 47- 8GB RAM DDR3
 48- Intel HD Graphics
 49- Gigabit Ethernet
 50- 500GB Hard Drive
 51
 52While this hardware would be awful for a work computer or a gaming rig, it
 53turned out to be wonderful for my server purposes. The only limitation I have
 54found so far is the central processing unit (CPU). The i3-6100 only has enough
 55power for a single 4k video transcode at a time. I haven't tested more than
 56three 1080p streams at a time, but the maximum amount of streams I've ever
 57actually used is two.
 58
 59** WD easystore 10TB & 8TB
 60
 61Application storage and temporary files are stored on the internal hard drive of
 62the server, but all media files (movies, television, games, books, etc) are stored
 63externally on my WD easystore hard drive. Creating auto-boot configurations in
 64the =/etc/fstab= file on my server allows the hard drives to automatically mount
 65whenever I need to restart my server.
 66
 67#+begin_quote
 68Update: In March 2022, I shucked the hard drives out of their external cases,
 69put some Kapton tape on the third power pin to prevent power shutdowns, and
 70stuck them inside my server tower using internal Serial AT Attachment (SATA)
 71cables.
 72#+end_quote
 73
 74** Netgear Unmanaged Switch
 75
 76To manage all the ethernet cords used by my homelab, my desktop, and my living
 77room media center, I purchased an 8-port gigabit ethernet switch for $50 at my
 78local computer store. This is probably much more than I should have spent on an
 79unmanaged switch, but I am comfortable with the choice.
 80
 81** TP-Link Managed Switch
 82
 83Since I use the unmanaged switch to group all living room devices together, I
 84use the managed switch to configure virtual local area networks (VLANs) and
 85secure my network.
 86
 87** Arris TM1602A Modem & Sagecom Fast 5280 Router
 88
 89My default modem and router, provided by my ISP, are fairly standard. The Arris
 90modem supports DOCSIS 3.0, which is something that I definitely wanted as a
 91minimum. The Sagecom router is also standard, no fancy bells or whistles.
 92However, it does support the dynamic host configuration protocol (DHCP) for
 93internet protocol version 4 (IPv4) and internet protocol version 6 (IPv6), which
 94is something you can use to route all household traffic through a pi-hole or
 95firewall.
 96
 97** TP-Link EAP
 98
 99In order to gain better control over the network, I use my own wireless access
100point instead of the one included in the Sagecom router above. Now I can control
101and organize all of my ethernet connections through the VLANs on the managed
102switch and wireless connections through the VLANS on the EAP.
103
104** Generic Printer
105
106The last piece to my homelab is a standard wireless printer. Nothing special
107here.
108
109* Software
110
111** Ubuntu Server 20.04
112
113While the 20.04 version of Ubuntu was just released, I always like to experiment
114with new features (and I don't mind breaking my system - it just gives me more
115experience learning how to fix things). So, I have Ubuntu Server 20.04 installed
116on the Dell Optiplex server and Ubuntu Server 19.10 installed on the Raspberry
117Pi. Once I find an acceptable use for the Pi, I will most likely switch the
118operating system.
119
120** Docker
121
122I am /very/ new to Docker, but I have had a lot of fun playing with it so far.
123Docker is used to create containers that can hold all the contents of a system
124without interfering with other software on the same system. So far, I have
125successfully installed pi-hole, GitLab, Gogs, and Nextcloud in containers.
126However, I opted to delete all of those so that I can reconfigure them more
127professionally at a later time.
128
129** Plex Media Server
130
131Plex is a media center software that allows you to organize your movies, TV
132shows, music, photos, and videos automatically. It will even download metadata
133for you so that you can easily browse these collections.
134
135** Pi-hole
136
137Pi-hole is an alternative ad-blocker that runs at the DNS level, allowing you to
138block traffic when it hits your network, so that you can reject any traffic you
139deem to be bad. Pi-hole uses blacklists and whitelists to decide which traffic
140block and, luckily, there are a lot of pre-made lists out there on Reddit,
141GitHub, etc.
142
143** Nextcloud
144
145While I had trouble with the Docker version of Nextcloud, I was very successful
146when setting up the snap version. Using this, I was able to map Nextcloud to a
147subdomain of a domain I own in Namecheap. Additionally, Nextcloud has an
148integration with Let's Encrypt that allows me to issue certificates
149automatically to any new domain I authorize.
150
151** Webmin
152
153To monitor my servers, and the processes running on them, I use the Webmin
154dashboard. This was fairly painless to set up, and I currently access it
155straight through the server's IP address. In the future, I will be looking to
156configure Webmin to use a custom domain just like Nextcloud.