7 Homelab Ideas | Why You Should Have A Homelab

Why You Should Have a Homelab

In 1998 my friend Meredith gave me a RedHat Linux CD.  I spent hours each day experimenting with Linux–I loved it.  2 years later I’m in a room with 30 other students at a University applying for the same computer lab assistant job–I’m thinking my chances are grim.  Part-way through the mass interview a man walks to the front of the room and asks if anyone has ever used Linux.  I raise my hand–I’m the only one.  He takes me out of the interview for the lab assistant job, introduces me to the department director.  They took me out to lunch.  By the end of the day I had my first job as a Systems Administrator.

Learn things on your own and it will broaden your opportunities.

One of the best ways to learn about systems, applications, and technology is starting a homelab.  A Homelab can give you an enjoyable, low stress, practical way to learn technology.  A homelab will also help you find out the technical areas in which you are interested.  It’s also practical in that you can use it to service your own home.

What is a Homelab?

A homelab is an environment located at your home where you can experiment safely.

It is a place outside of the corporate environment for your personal projects, growth, and a fun hobby. While not all homelab projects lead to professional development, many of them do.

The homelab environment for most technologists consists of one or more servers running a virtualization environment and a storage solution to support various virtual servers providing services. Specialty home labs can also be built (e.g. an aspiring network engineer may build a homelab out of Cisco networking equipment).

Here are 7 Ideas for Your Homelab

1. Router /  Firewall

Ubiquiti EdgeRouter X

The most essential piece of equipment will be your router.  I started out with consumer routers that I’d flash to DD-WRT / Tomato but now I use a virtual pfSense router.  Routers are great to learn about DHCP, DNS, VPN, Firewalls, etc.  I discourage using the router provided by your ISP, they’re usually not very capable and often not secure.  In most cases you can buy a DSL or Cable modem instead of the ISP provided modem combined with the router.  One inexpensive physical router I’d recommend is the Ubiquiti EdgeRouter X.   Ubiquiti provides free software updates (their model is you buy the hardware and the software is free), and you’ll get a handful of advanced features–it’s a very capable router and much better than a typical consumer router–to step up from Ubiquiti you’d be going to pfSense, Juniper or Cisco.

2. Storage

Supermicro Storage

The main reason I started my homelab was storage.  I was taking a lot of family pictures and videos and wanted to save them.  I know there are cloud services, but at the time they were expensive, and then you’re sort of trusting that provider to not delete all your photos or get bought out by a larger company and shutdown.

Then I started using VMware.  I needed faster storage with more IOPS.  One of the best Homelab storage solutions is ZFS.  ZFS takes the best of filesystems, and the best of RAID, and combines them into a software-defined storage solution that I’ve not seen any hardware technology able to match.  Two popular free ZFS appliances I like are Napp-It (based on OmniOS) and FreeNAS.  OmniOS is a fork of OpenSolaris and is very robust and has tight integration with ZFS.

FreeNAS Logo

I’m currently using FreeNAS which is the free open source version of iX System’s TrueNAS which is used by organizations of all sizes–from small businesses with a few TB of storage to large government agencies with PBs of storage.  FreeNAS has done a great job at technology convergence.  It is both a NAS and a SAN allowing you to try both approaches to storage (I prefer NAS because it takes better advantage of ZFS, but many prefer using SAN and there are benefits and drawbacks to both), it also has many built-in storage protocols:  FTP,  iSCSI, NFS, Rsync server, S3 emulator, SMB (Windows file server), TFTP, WebDav, it can join AD, it can even be an AD DC  (if you like living on the edge) it has a built-in hypervisor (bhyve) to run VMs for whatever you want.  This is now marketed as hyper-converged storage.  All of it is completely free.  You can build your own FreeNAS server as I did, or get started with a FreeNAS Mini from iX Systems.

A few years after I learned ZFS for home, my employer was looking for a new storage solution so having this knowledge and experience was helpful.  I was able to determine one vendor with a traditional RAID solution didn’t handle the RAID-5 write-hole problem properly.

3. Virtualization

VMware

Virtualization allows you to run multiple virtual servers on the same piece of hardware.  VMware ESXi is king in the small to mid-size business hypervisor market, and VMware offers its hypervisor for free.  The free version of ESXi is just like the paid versions except you won’t be able to use some features (most involving high availability and fail-over with multiple servers).  But you can learn most of the concepts and features of VMware.  I’ve tried to use a number of hypervisors but I always come back to VMware.  I consider VMware my basic infrastructure.  From there you can learn about other things like networking, storage, and play with any OS or Linux distribution you want to.

Knowing VMware ESXi is beneficial, I’ve implemented it for several businesses, and one of my previous employers.  And knowing how it works means I can discuss the VMware stack intelligently with the ops team.

See my FreeNAS on VMware Guide if you’re interested in running a virtual FreeNAS server inside VMware.

Proxmox VE is another popular hypervisor–I also run it in my homelab. For a free virtualization solution you can’t beat Proxmox . It gives you for free High-Availability, Ceph Storage Clustering, and Live Migration which are paid features for VMware ESXi. I have a preference for Proxmox. But if you’re on the fence and trying to learn for your career you will want to stick with VMware. You won’t find too many businesses running Proxmox compared to VMware.

4. Networking

A Homelab without decent networking won’t get you far.  Fortunately if you use VMware you can leverage it to use virtual network switches.  For physical switches I really like the Unifi products.  They are simple enough for non-network engineers like me.  Everything can be configured using the GUI.  Unifi exposes you to managed switches, central management (with the Unifi controller), VLANs, and PoE (Power over Ethernet), port trunking, port mirroring, redundant paths with spanning tree, etc.

Unifi 8 Port Switch

I started with this little UniFi 8-port switch (4 are PoE ports).  I also added a UniFi 24-port switch so I could learn how to do setup a LAG and configuring VLANs across multiple switches (which was really simple using the Unifi interface).  I also like Unifi’s philosophy–they sell you the hardware but the software is free–which means you don’t pay for maintenance or support but continue to get free updates.  In a homelab you may not need to go crazy on VLANs, but separating your main network from your IoT devices may be prudent.

Learning how to setup VLAN tagging, and link aggregation and understanding how networking works helps me communicate better with the network engineers when discussing design and deployment options–they may be working on Juniper or Cisco equipment but I know the concepts of what they’re doing.

5. Wireless APs

Having a robust wireless setup is also a necessity for a homelab.  If you have a large house you get to set up multiple APs and make sure they can handoff connections.  If I was buying today I’d get a UniFi nanoHD AP.  I use an older model, the Unifi UAP AC Pro (I just have one because that’s all I need to cover my house, but if you can find an excuse to have 2 or more I’d recommend it since you can practice rolling updates without downtime, wireless handoff, etc.).  These are managed by the same Unifi controller as the switches.  I first gave them a try because I read Linus Torvalds uses Unifi APs, and they seem to be highly rated by tech professionals–and now I don’t think I’d go back to anything else.

I have written more about Unifi Equipment here.

6. Network Monitoring

Icinga

It is hard to maintain a reliable network and application stack without monitoring for failures.  There are hundreds of network monitoring solutions and it really depends on your needs.  The most widely deployed solution is Nagios.  I have had that on my Homelab, later I switched to Icinga, and nowadays I use Zabbix because it’s simple and it integrates into Ansible. The simplest decentralized system monitor you can get is Netdata.

7. Infrastructure Automation

Automating your infrastructure may not make as much sense in a small Homelab, but it does make sense to automate any task you do repetitively or a manual task that could be automated.  For me, this was installing updates, deploying servers and renewing SSL certificates with Let’s Encrypt.  To manage this I use Ansible which is one of the most well thought out infrastructure automation tools I’ve seen.  Ansible can manage Linux and Windows servers.  Learning infrastructure automation, especially if you do it using version control and CI/CD tools like Azure DevOps (you can get a free account for up to 5 users with unlimited private repositories) is a great thing to learn for your career if you’re interested in the DevOps world.   The book, Ansible for DevOps by Jeff Geerling helped me get started.  I suggest getting the eBook since he has been known to provide updates to the book (not sure if he will continue to provide updates, but just in case).

At work we completely automated the deployment of Linux servers using Ansible–infrastructure as code.  It took a month of investment but it paid off big time with developers now being able to deploy VMware VMs at will with Ansible by making a Git Pull Request, our entire fleet of servers is updated automatically, and our server and configurations are all consistent.  This replaced an old process of waiting several weeks for a VM to be provisioned and configured by hand.

Home Lab Servers

My first homelab server was a repurposed desktop. I installed FreeBSD on it. I had a DSL line and ran a LAMP stack. It hosted this blog and it also hosted email for my b3n.org domain. Um… I also started a hosting company and hosted other people’s and businesses’ websites and email. All running from an old desktop in my bedroom closet. Now I run Supermicro mini servers with Proxmox and VMware and lots of Linux containers and VMs.

Depending on your budget and what you want in your homelab you can use a repurposed desktop, or get something as small as a Raspberry Pi to a rack server. You could get a rack of servers. Maybe even multiple racks. What should you get? This depends on your budget, what you think you need, what your spouse thinks you need, and how much space you have in your house. For most people something in between a Pi and a rack server is suitable. I like the small Microserver form factor. They’re quiet, can be equipped with powerful CPU, tons of memory, and lots of storage. Yet can hide one under your desk.

Here are a few options:

  1. Supermicro Mini Tower. Essentially a Datacenter in a Box. I have guides to build these based on the Intel Xeon D, and the AMD EPYC. These can be built with a lot of CPU and memory, and with 4 storage bays making them suitable for VMware ESXi, Proxmox VE, or TrueNAS/FreeNAS. One feature I like about these is they have IPMI/KVM over IP so you never need to hook up a monitor or mouse. My homelab is equipped with 3 of these servers.
  2. HP Microserver. If you’d rather not build it yourself, the HP MicroServer (Amazon) series has a good lineup of servers to choose from. I’ve seen people name their HP Microservers “Tardis” because of how small they are for what they can do.
  3. Raspberry Pi. The CanaKit Raspberry Pi 4 4GB Start Kit (Amazon) would be a good start if you are on a budget and don’t need a lot of compute power or need it in a small or remote location.
  4. Rack Server. If you’re after rack servers (just to warn you the fans are loud) you will find good deals on used or off-lease servers on eBay.

Homelab Essentials

  1. Domain. Buy a domain for your homelab even if you’ll only be using it internally. With a domain you can get SSL certificates, and you aren’t accessing devices by IP. I like Hover, Namecheap, or Cloudflare as a domain registrar and external DNS hosting.
  2. VPN. Setup a VPN so you can access your homelab remotely. OpenVPN, Wireguard, or ZeroTier.
  3. DNS Filtering. Essential as the first line of defense to keep you and your family safe from malicious and inappropriate sites. See my post on DNS Filtering.
  4. Dynamic DNS Service – Chances are your ISP gives you a dynamic IP. You can keep DNS updated with your current IP so that you can access your VPN and servers remotely by hostname. DNS-O-Matic can keep multiple DNS providers updated.
  5. Password Manager – You’re going to want to keep track of your passwords using something like KeePass or LastPass.
  6. Backups – You want to make sure anything important gets backed up offsite with some cadence.
  7. Version Control – If you’re going to be using some sort of infrastructure management tool like Ansible, or even if you need a place to keep scripts, I suggest using a service like GitHub, GitLab, or Azure DevOps to keep it all.

Bonus homelab application (VM or Container) server ideas…

  1. Minecraft Server — popular Java game–it’s like playing with Legos and a great way to get your friends together for some casual games.
  2. Mumble Server – one of the best voice protocols for in-game communication.
  3. Emby Media Server — Anyone that has kids realizes those flimsy blu-ray drives aren’t going to last long.  It’s great to store and host movies, home videos, pictures, and audio.
  4. Asterix PBX Server – VoIP Phone server (use Twilio or Flowroute for SIP trunking).  Polycom makes great VoIP phones.  With Twilio SIP Trunking you can have a real landline phone number with E911 capability for a few dollars a month–and if you get multiple phones you can use it as an intercom system.
  5. Web Server (maybe start a blog) — I hosted this blog from a server in my house for years–until my ISP couldn’t handle the bandwidth.  Nowadays you can also use a service like Cloudflare to act as a CDN which really reduces your bandwidth usage.  Hosting your own blog is a great learning experience and gives you a place to log your homelab experiments and share solutions to problems.
  6. Automatic Ripping Machine — Get all your Blu-Rays, DVDs, and CDs loaded onto your Emby server
  7. Backup server — I use FreeNAS/TrueNAS cloud sync tasks to backup my data from remote sites to home, and from home to the cloud.
  8. Pi-hole. DNS server that can block ads for your entire network.
  9. Storj Node – Earn cryptocurrency renting out your spare storage.

There are many more areas than I listed, but I think the above is a good baseline to get started.  Pick one area at a time–my homelab was built over many years–often the case is I will improve an area after a piece of equipment fails or I need to replace it for some other reason–that’s a great time to do research.  If you aren’t sure where to start, pick the area that you enjoy the most.  For areas you have no interest the best thing to do is something else–you’re probably not going to be great at something you don’t enjoy.   Certainly a homelab isn’t going to be a substitute for real-work experience.  But it does provide an environment to learn, experiment and enhance your abilities–and the great thing is since it’s your own lab you can learn things that interest you.

I think that’s the largest benefit of a homelab.  To me it’s a playground.  It’s a place to put the love of learning into practice.  It’s a place of freedom.  Nobody else is dictating what you do here.  It’s a place to have fun while enhancing your skills.

Do you see a man skillful in his work?
He will stand before kings;
he will not stand before obscure men.     – Proverbs 22:29 ESV

Automatic Ripping Machine | Headless | Blu-Ray/DVD/CD

The A.R.M. (Automatic Ripping Machine) detects the insertion of an optical disc, identifies the type of media and autonomously performs the appropriate action:

  • DVD / Blu-ray -> Rip with MakeMKV and Transcode with Handbrake
  • Audio CD -> Rip and Encode to FLAC and Tag the files if possible.
  • Data Disc -> Make an ISO backup

It runs on Linux, it’s completely headless and fully automatic requiring no interaction or manual input to complete it’s tasks (other than inserting the disk).  Once it completes a rip it ejects the disc for you and you can pop in another one.

Flowchart of Ripping Process

Automatic Ripping Machine Features

  • Determines if disc is Video, Data, or Audio
    • If video get the Title
    • Determine if it’s a TV or Movie
    • Rip using MakeMKV
    • Send rip to Handbrake and eject disc asynchronously
    • When done transcoding tell Emby to rescan library, or send notifications using PushBullet or IFTT
  • If audio CD – rip to mp3 or flac using abcde and eject
  • If data disc make an ISO backup
  • Can rip from multiple optical drives simultaneously
  • Completely headless design–no graphical interface.  The only interaction is inserting the disc and it takes it from there, ejecting it when done.
  • Can send push notifications to your phone using Pushbullet or IFTT.

Free Software

I uploaded the scripts to GitHub under the MIT license.  Since then quite a few contributors have made many improvements.  Now the ARM has been rewritten in Python and has a number of options to customize the way different people handle media.

Instructions to get it installed on Ubuntu 16.04 or 18.04 LTS follows.

Automatic Ripping Machine (Supermicro MicroServer) under my desk

ARM Equipment & Hardware

Blu-Ray Hardware and VMware Settings

A WARNING ABOUT SOME BLU-RAY DRIVES

Most Blu-Ray drives have an anti-feature called “riplock” where it will purposefully cripple the read-speed on dvds and blue-rays to around 2X to 4X instead of the advertised drive speed (I believe this to be false advertising).  If you have a normal 5 1/4″ drive bay I suggest getting the LG WH16NS40 16X blu-ray drive since it is known to not be speed limited.  LG seems to be one of the better drive manufacturers in my experience.

You will need a server.  You can use Ubuntu on bare metal or run it under VMware.   I am using my Datacenter in a Box Build and run the ARM on Ubuntu Linux 16.04 LTS under VMware.  At first I tried using an external USB Blu-Ray drive but the VM didn’t seem to be able to get direct access to it.  Unfortunately my server case only has a slim-DVD slot on it so I’m using an LG BT30N (these can be found on eBay).

I wasn’t sure if VMware would recognize the Blu-Ray functions on the drive but it does!  Once physically installed edit the VM properties so that it uses the host device as the CD/DVD drive and then select the optical drive.

VMware Machine Properties, select CD/DVD drive, set Device Type to Host Device and select the optical drive.

Regions…

I kept getting this error while trying to rip a movie:

MSG:3031,0,1,”Drive BD-ROM NECVMWar VMware IDE CDR10 1.00 has RPC protection that can not be bypassed. Change drive region or update drive firmware from http://tdb.rpc1.org. Errors likely to follow.”,”Drive %1 has RPC protection that can not be bypassed. Change drive region or update drive firmware from http://tdb.rpc1.org. Errors likely to follow.”,”BD-ROM NECVMWar VMware IDE CDR10 1.00″

Defective By Design Logo

After doing a little research I found out DVD and Blu-Ray players have region codes that only allow them to play movies in the region they were intended–by default the Panosonic drive shipped with a region code set to 0.

World Map with DVD Region Codes
CC BY-SA 3.0 from https://en.wikipedia.org/wiki/DVD_region_code#/media/File:DVD-Regions_with_key-2.svg

Notice that North America is not 0.

Looking at http://tdb.rpc1.org/ it looks like it is possible to flash some drives so that they can play videos in all region codes.  Fortunately before I got too far down the flash the drive path I discovered you can simply change the region code!  Since I’m only playing North American movies I set the region code to 1 using:

You can only change this setting 4 or 5 times then it gets stuck so if you’re apt to watch movies from multiple regions you’ll want to look at getting a drive that you can flash the firmware.

Install MakeMKV, Handbrake, ABCDE and At

Please follow the instructions in the README.md file in the GitHub repository.

Mount Samba/CIFS Media Share

If you’re ripping to the local machine skip this section, if you’re ripping to a NAS like I am do something like this…

In FreeNAS I created a media folder on my data share at \zfs\data\media

Edit /etc/fstab

Once that’s in the file mount the folder and create an ARM and an ARM/raw folder.

Configure ARM Settings

You should look over the config file to make sure it suits your needs, if you want to add Android or iOS push notifications, trans-coding options, subtitle options, etc. that’s where to do it.

Figure out how to restart udev, or reboot the VM (make sure your media folder gets mounted on reboot).  You should be set.

Automatic Ripping Machine Usage

  1. Insert Disc.
  2. Wait until the A.R.M. ejects the disc.
  3. Repeat

Test out a movie, audio cd, and data cd and make sure it’s working as expected.  Check the logs. If you run into trouble feel free to post an issue here.

Install MakeMKV License

MakeMKV will run on a trial basis for 30 days.  Once it expires you’ll need to purchase a key or while it’s in BETA you can get a free key…  I would love to build this solution on 100% free open source software but MakeMKV saves so much time and is more reliable compared to anything else I’ve tried.  I ended up purchasing a license key for myself.

Grab the latest license key from: http://www.makemkv.com/forum2/viewtopic.php?f=5&t=1053

Edit the /root/.MakeMKV/settings.conf  and add a line:

Get an OMDB API Key

Next you’ll want to get an OMDB API key and put it in your ARM config file.  A free key will let you do 1,000 API queries a day which should be more than enough: http://www.omdbapi.com/apikey.aspx

How it Works?

When UDEV/systemd detects a disc insert as defined by /lib/udev/rules.d/51-automedia.rules it runs the wrapper which in turn runs /opt/arm/identify.sh which identifies the type of media inserted and then calls the appropriate scripts.  (if you ever need it this is a great command get get info on a disk):

Video Discs (Blu-Ray/DVD)

For video discs the first step is ARM tries to obtain the disc title.   If it’s a blu-ray it can often be extracted from the disc, if it’s a DVD we calculate a hash of the DVD and then query Windows Media Metaservice (which is what Windows Media Player queries when a disc is inserted) to get the title.

Once the title is obtained we send that to the OMDB API which will tell us whether the video is a Movie, or a TV Show.  If the video is a Movie ARM can usually determine the main title feature, and rip that.  And optionally rip all the other titles into an Extras folder.  Once done ARM can automatically tell Emby to rescan the library.  If the video is a TV Show ARM will rip all the titles and you’ll need to use Filebot to rename the shows.

All tracks get ripped using MakeMKV and placed in the /mnt/media/ARM/raw folder as soon as ripping is complete the disk ejects and transcoding starts with HandBrakeCli transcoding every track into /mnt/media/ARM/timestamp_discname.  You don’t have to wait for transcoding to complete, you can immediately insert the next disk to get it started.

FileBot Screenshot Selecting files for rename

Most of the time everything just works, but in some cases if ARM can’t determine the title some video file renaming needs to be done by hand.  The ARM will name the folder using the disc title, but this isn’t always accurate.  For a Season of TV shows I’ll name them using FileBot and then move them to one of the Movie or TV folders that my Emby Server looks at.  Fortunately this manual part of the process can be done at any time, it won’t hold up ripping more media.  The Emby Server then downloads artwork and metadata for the videos.

Screenshot of Emby's Movies Page

Audio CDs

If an audio track is detected it is ripped to a FLAC file (or mp3 or whatever you want) using the abcde ripper.  I opted for the FLAC format because it’s lossless, well supported, and is un-proprietary.  If you’d prefer a different format ABCDE can be configured to rip to MP3, AAC, OGG, whatever you want.  I have it dropping the audio files in the same location as the video files but I could probably just move it directly to the music folder where Emby is looking.

emby_beethovens_last_night

Data Disks (Software, Pictures, etc.)

If ARM determines there is no video on the disc, then a simple script is run to make a backup ISO image of the disc.

Screenshot of TurboTax ISO file

What about the stuff that fails?

So, I built the ARM with the 80/20 rule in mind.  My goal was it to automate 90% of my rips.  There are always oddball discs that don’t quite work right or need to be handled manually.  Here’s a good article with a comparison of ripping software by the TheSweetBits that will do that job.

Morality of Ripping

Two Evils: Piracy vs. DRM

I am for neither Piracy or DRM.  Where I stand morally is I make sure we own every CD, DVD, and Blu-Ray that we rip using the ARM.

I don’t advocate piracy.  It is immoral for people to make copies of movies and audio they don’t own.  On the other hand there is a difference between Piracy and copying for fair use  which publisher’s often wrongly lump together.

What really frustrates me is DRM.  It’s waste of time.  I shouldn’t have to mess with region codes, and have to use software like MakeMKV to decrypt a movie that I bought! And unfortunately the copy-protection methods in place do nothing to stop piracy and everything to hinder legitimate customers.

For me it doesn’t really even matter because I don’t really like watching movies anyway–there’s not much more painful than sitting for an hour to get through a movie.  I just like making automatic ripping machines.

Well, hope you enjoy the ARM.

War Games DVD in Tray