My Home Lab

My Home Lab

  • mdo  k3tan
  •   FOSS
  •   August 24, 2022

I have been tinkering with my home server throughout the winter. I wanted to share my setup and how I go about self hosting the services I run on my network. It's a fairly simple and clean set up, but I've spent quite a while learning and tinkering over the years.

Hardware

The hardware I am using for my home lab is a Dell Precision T7810. The specs are as follows:

  • CPU: Intel Xeon E5-2620 v3 @ 2.40GHz
  • RAM: 64GB ECC
  • GPU: NVIDIA Quadro K4200 4GB
  • Disks:
    • 1TB SATA Samsung 860 EVO SSD
    • 500GB SATA Samsung 850 EVO SSD
    • 2TB M.2 NVME SSD (via PCIe adapter)
    • 240GB SATA Crucial SSD

I picked up this computer (minus a few of the SSD's) secondhand from Facebook Marketplace for $800. I purchased it almost a year ago.

Operating System

The operating system this machine is running is Proxmox. It's a linux based operating system that specialises in running virtual machines (VM) and containers (CT), but it also manages your disks, backups and so much more. It is predominantly controlled using a web based graphical user interface.

Proxmox is installed on the 1TB SATA SSD. Its default configuration was to use 100GB for the images/iso files and 900GB for running containers and virtual machines.

The 500GB SATA drive is used to saved weekly backups. I have configured Proxmox every week to shut down all CT's/VM's, create a backup image, save it to the 500GB drive and start the CT's/VM's back up again. This was easily configured in the web user interface.

The 2TB M.2 NVMe is used for my main storage. It is set up as a single ZFS file system with compression enabled. I've named it "zfspool". It holds documents, PDF's, personal videos and photos, notes and more. Sensitive documents are encrypted using Cryptomator.

The 240GB SSD is used as a media storage. It's also set up as a single ZFS file system with compression enabled. I've named it "zfsmedia". It holds Movies and TV shows. I don't need much storage for this because I tend to delete the files after watching. I'm not really one to hoard music, movies and tv shows.

Resources for learning:

I highly recommend this crash course from LearnLinuxTV on Proxmox. It is a fantastic series, and gets you up to speed with what this operating system can do.

https://www.youtube.com/playlist?list=PLT98CRl2KxKHnlbYhtABg6cF50bYa8Ulo

Containers & Virtual Machines

I run quite a few containers and VM's. I'll go through them each in a bit of detail so you can understand what I use it for. Each of these is a mini project in itself for you to dive further into, if you're interested.

File Server

In any home network, you'll want to have a network storage where users can save and access all their files. This file server creates a samba share so anyone on your network can use it (with username/password authentication). In order to do this, I'm using the TurnKey Linux File Server image. This makes setting up a file server much easier, and you get a nice graphical web interface to manage it.

  • Type: CT
  • Image/ISO: Turnkey Linux File Server
  • RAM: 512MB
  • CPU: 1
  • Disk: 8GB
  • Mount points: 2TB "zfspool" and 240GB "zfsmedia"
  • Deployment details: turnkey linux image

Resources for learning:

Media Server

Any good home network should have a great media server, packed with the latest Movies, TV Shows and Music for the household to consume. I use an Ubuntu server proxmox container to install the following software.

  • Transmission-cli - torrent downloader
  • Samba client - mounted "zfsmedia" on boot of container. This ensures the downloads end up on the correct 240GB disk.
  • Jellyfin - media system (think of this as your personal Netflix)
  • Radarr - movies management
  • Sonarr - tv show management
  • Lidarr- music management
  • Prowlarr - content finder

One of the other cool things about this container is that I can use the NVIDIA graphics card to perform GPU hardware transcoding. Essentially, this reduces the load on the CPU when playing back files at a lower quality resolution when bandwidth is an issue. I've linked the video tutorial in the resources section for instructions on how to do this.

  • Type: CT
  • Image/ISO: Ubuntu server 20.04 LTS
  • RAM: 4GB
  • CPU: 12
  • Disk: 20GB
  • GPU: NVIDIA GPU passthrough
  • Deployment details: Each piece of software is installed and configured manually within the container. Mounted the samba shared drive to the container, installed transmission, *arr apps, jellyfin, then gpu passthrough.

Resources for learning:

Nextcloud

Nextcloud is a great place to store your documents. Think of it as a replacement for Dropbox/iCloud/Google Drive/OneDrive. Not only do I use it as a cloud storage replacement, I also use it to synchronise my contacts, calendar and notes. If I ever need to edit a document, I can do it through the web interface directly on Nextcloud.

I've got an Ubuntu server container set up in Proxmox that has Nextcloud server installed on it. I recommend the LearnLinuxTV tutorial linked below to get the Nextcloud instance up and running.

Instead of storing my documents within the Nextcloud instance, I store it on my already setup samba share. This way, if my Nextcloud instance breaks (for whatever reason), I can still access my files.

To access the samba share, I've installed the "External Storage" app within Nextcloud, filled out my samba share login details and I'm able to read/write directly to the samba share from Nextcloud.

  • Type: CT
  • Image/ISO: Ubuntu server 20.04 LTS
  • RAM: 4GB
  • CPU: 6
  • Disk: 30GB
  • Deployment details: installed as per LearnLinuxTV YouTube tutorial, some configuration changes required in order to get SSL working, served via apache2 server.

Resources for learning:

Vaultwarden

Vaultwarden is a fork of Bitwarden that allows you to self host your password manager. Instead of keeping your data on Bitwarden's encrypted servers, you can host your own using Vaultwarden. I integrate my own instance of Vaultwarden into my browser (via the Bitwarden extension) and into my phone. It quickly allows me to access my passwords and auto-fills the login details.

  • Type: CT
  • Image/ISO: Ubuntu server 20.04 LTS
  • RAM: 1GB
  • CPU: 1
  • Disk: 8GB
  • Deployment details: installed docker, used docker image

Resources for learning:

Photoview

Photoview is a lightweight photo content manager that I use to access my photos. It's got great functionality - albums, maps, user management, people tagging. Photoview scrapes all the data from my photos folder in my samba share and delivers them to me in a nice web and mobile web interface. The downside is that there's no native Android app (only iOS). I synchronise the camera folder on my phone with an android app called SMBSync2. It synchronises and uploads the contents of my phone to the samba share. Photoview then scrapes that new data and delivers it in the web graphical interface.

There are many photo management alternatives. My commentary on other popular ones below.

  • PhotoPrism - this is feature rich software, pretty heavy on resources and is catered for multiple users.
  • Immich - this is a fairly new project, looks promising, specifically catered for phone photos and backing them up, might switch to this.

Refer to the resources for a full comparison chart.

  • Type: VM
  • Image/ISO: Ubuntu server 20.04LTS
  • RAM: 4GB
  • CPU: 8
  • Disk: 32GB
  • Deployment details: installed samba and mounted samba share, installed docker, used docker image

Resources for learning:

Searxng

This is my go to search engine for searching the web. No trackers and profiling. Aggregates results from various search engines and databases (not just Google). It has a very nice and clean interface. I've set all my browsers on desktop and mobile to use this search engine, hosted in a proxmox container.

  • Type: CT
  • Image/ISO: Ubuntu server 20.04LTS
  • RAM: 1GB
  • CPU: 1
  • Disk: 15GB
  • Deployment details: installed docker, used docker image

Resources for learning:

FreshRSS

To keep up to date with all sorts of topics, I use RSS feeds to quickly get the information and notifications I need. This keeps me up to date on the release of software, blogs, youtube videos from my favourite content creators and news sites. FreshRSS scrapes the RSS feeds and the RSS feed reader on my devices will synchronise what I've already marked as read. I typically use newsboat for desktop and Readrops for mobile. In my browser, there's also a bookmark link that will find the RSS feed of the site and load it into FreshRSS.

Resources for learning:

Syncthing

Syncthing is a tool I use to synchronise important files across multiple computers. I use a proxmox container to install syncthing as a service, with my devices (laptop, desktop, mobile) synchronising to the folder. So essentially, I have plenty of copies of that folder should a device break. I also have a computer at my parents place that synchronises files for added redundancy (off site backup).

  • Type: CT
  • Image/ISO: Ubuntu server 22.04LTS
  • RAM: 1GB
  • CPU: 1
  • Disk: 30GB
  • Deployment details: manual installation as per video tutorials

Resources for learning:

Bludit

Bludit is a way for me to create content and host my own website. I currently run k3tan.com and ministryofnodes.com.au as a Bludit website. It's fast, lightweight and gets the job done. I'm also running Umami on this virtual machine. It provides me with insights into the traffic that is coming through to my two websites.

  • Type: VM
  • Image/ISO: Ubuntu server 20.04LTS
  • RAM: 2GB
  • CPU: 1
  • Disk: 30GB
  • Deployment details: Umami is run over docker. Websites are served via zip file install method. Traffic is served through Cloudflare argo tunnels.

Resources:

Matrix

Matrix is great for decentralised, encrypted chat. I host my own matrix server and connect up to other matrix servers. I use a proxmox container to install matrix-synapse from the apt repository (link in the resources section). I also enable federation with serve_server_wellknown: true in the homeserver.yaml file located in /etc/matrix-synapse folder. I use a postgresql database rather than the default mysql, improving efficiency. Link for this is in the resources section. I also expose port 8008 to my domain via a Cloudflare tunnel. This protects my real IP address from being exposed.

  • Type: VM
  • Image/ISO: Ubuntu server 20.04LTS
  • RAM: 2GB
  • CPU: 1
  • Disk: 30GB
  • Deployment details: Installed matrix-synapse over apt package manager. Traffic is served through a Cloudflare argo tunnel.

Popular chat rooms:

  • Citadel Dispatch
  • Bitcoin and Freedom Tech
  • OptOut Podcast

Resources for learning:

Others

I run a few other containers and virtual machines.

  • I have a VM for Pleroma (self hosted microblogging site, think of it as a twitter clone)
  • I run a container for a dashboard (I use flame, but there are others such as homer, heimdell and homarr).
  • I also have a test-env (testing environment) container where I play around and get familiar with the software before deploying it into production.

Improvement areas

The most notable area for improvement is the disks. The Dell Precision T7810 tower doesn't really have space for more drives. The motherboard has six SATA ports but only 2 drive bays. I'd like to explore RAID technology to make use of multiple drives and mitigate against disk failures.

Another area I'm keen to explore is security cameras. I'd like to install ZoneMinder (there's even a turnkey linux image for it) to create a dashboard of security cameras that will one day reveal who's dog keeps shitting on my front lawn. After I find out who it is, I'm thinking I might go full Billy Madison one day. Put it in a paper bag, leave it on their front porch, light it on fire, ring their doorbell and run away.

You'll notice that I run a lot of docker containers within my proxmox containers. I'd like to explore whether a software such as Portainer would make this a little more resource efficient or better managed.

Finally, I want to put the computer behind an uninterrupted power supply. This allow me time to safely shut down all the services and computer in the event of a power outage.

Accessing services outside of home

Accessing these services I've deployed from outside my home network (remote access) is done using Wireguard set up on my pfsense router. I'm able to tunnel in and obtain all the information I need. I'm also able to upload data from anywhere and store it at home, for example, photos from my phone are uploaded to the samba share for photoview to pick up and organise.

I can also remote control my media services. If I'm out and about and someone recommends me a movie or tv show, I'm able to queue up the download from anywhere and have it ready for watching by the time I'm home.

Resources

Over the years, I've come across great resources that have helped me along my self hosting and home lab journey. A list of great open source software recommendations here - https://github.com/awesome-selfhosted/awesome-selfhosted

Reddits:

YouTube channels:

  • LearnLinuxTV
  • DistroTube
  • NetworkChuck
  • Brodie Roberston
  • Luke Smith
  • Mental Outlaw


made with 💛 | k3tan.com