undecidedtech

software engineer

Homelabbing

Last updated on


Recently I decided to repurpose my old gaming rig to do something I’ve wanted to do since my college roommate introduced me to the concept of an *arr stack. My roommate had a little more compute than I have now (he got a secondhand Dell R710), but I’m more than pleased with my “low profile” and “nearly silent” setup. As of right now I have a Ryzen 3600, 16gb DDR4 ram, and a Nvidia 3060 in my homeserver to fulfill all of my media consumption needs.

  <b>Legal Disclaimer</b>:
  For legal reasons I must state that I do not condone illegal pirating of copyrighted material. This is made for educational purposes only. I expect that everyone who follows this guide will only use this for legal purposes. Please never ever use this to illegally download copyrighted material such as, but not limited to, movies and TV Shows.
I figured it’s about time I make a write-up so that I can just have something ready when people ask me about whether it’s easy or not to get a home media server setup
  1. Download the Proxmox ISO and flash it to a USB drive, Balena Etcher has a GUI, it’s easy. Once this is done just remove it and plug it into your server.
  2. Power on your server and interrupt the boot sequence to get to the BIOS, you probably need to look up what your motherboard is expecting you to press but usually it’s like holding delete on your keyboard while the manufacturer logo is displayed. Change the boot order so that your USB is loaded first and reboot without interrupting.
  3. You’ll be presented with the screens to install Proxmox, you can name it whatever you want, it’s good to just keep a notepad handy and write down any relevant info, IP address, hostname, but you can just stick to the defaults for most of the setup.

[!WARNING] You’ll want to select ZFS as your storage method during the install, it will provision a zpool for you and will make your life easier later on in this process

Proxmox _this is pretty much what you should be seeing when you enter your proxmox-virtual-environment_
  1. Once you’ve finished your install of proxmox, remove your flash drive from your server and reboot once again. Navigate to your proxmox-virtual-environment in your browser, login and click into your datacenter and there should be a single node that exists. Select this and open the shell from the sidebar.

You’re in luck because the wonderful open-source community have established and maintained a repo of handy scripts for quickly launching all of your proxmox services to get your homeserver up and running.

  1. Now that you have the shell open just start running the scripts for:
  1. Ensure the ZFS pool is mounted on the Proxmox host: You should already have this configured. You can confirm by navigating to Datacenter > Storage > Add > ZFS in the Proxmox web interface and selecting your pool.

Enter the shell again for the Proxmox Host, and run

#!/bin/bash
 
set -e
 
# Define expected ZFS pool name
ZPOOL_NAME="tank"
 
# Define container hostnames that should receive the media mount
TARGET_HOSTNAMES=("radarr" "sonarr" "deluge" "jellyfin")
 
# 1. Check if ZFS pool exists
if ! zpool list "$ZPOOL_NAME" >/dev/null 2>&1; then
  echo "❌ ZFS pool '$ZPOOL_NAME' not found. Please create it first."
  exit 1
fi
echo "✅ ZFS pool '$ZPOOL_NAME' exists."
 
# 2. Get mountpoint
MOUNTPOINT=$(zfs get -H -o value mountpoint "$ZPOOL_NAME")
 
if [ ! -d "$MOUNTPOINT" ]; then
  echo "❌ Mountpoint '$MOUNTPOINT' does not exist or is not mounted."
  exit 1
fi
 
# 3. Create media directories
MEDIA_DIR="$MOUNTPOINT/media"
mkdir -p "$MEDIA_DIR/TV-shows" "$MEDIA_DIR/Movies" "$MEDIA_DIR/Downloaded"
echo "✅ Created directories under '$MEDIA_DIR'."
 
# 4. Check LXC configs for target hostnames
LXC_DIR="/etc/pve/lxc"
MOUNT_ENTRY="lxc.mount.entry: /$ZPOOL_NAME/media mnt/media none bind,create=dir"
 
cd "$LXC_DIR"
 
for CONF in *.conf; do
  CONTAINER_ID="${CONF%%.conf}"
  HOSTNAME=$(grep -E "^hostname:" "$CONF" | awk '{print $2}')
 
  if [[ " ${TARGET_HOSTNAMES[*]} " =~ " ${HOSTNAME} " ]]; then
      if grep -Fxq "$MOUNT_ENTRY" "$CONF"; then
          echo "✅ $HOSTNAME (CT $CONTAINER_ID) already has mount entry."
      else
          echo "$MOUNT_ENTRY" >> "$CONF"
          echo "➕ Added mount entry to $CONF for hostname: $HOSTNAME"
      fi
  else
      echo "ℹ️ Skipping CT $CONTAINER_ID with hostname: $HOSTNAME"
  fi
done
 
  1. Go out and purchase a MullvadVPN subscription, at $5.78 a month you’re still doing way better than Netflix who charge $7.99 FOR YOU TO STILL GET ADS and $17.99 for a standard subscription. On your Deluge instance, open a shell and run:
# Download the Mullvad signing key
sudo curl -fsSLo /usr/share/keyrings/mullvad-keyring.asc https://repository.mullvad.net/deb/mullvad-keyring.asc
 
# Add the Mullvad repository server to apt
echo "deb [signed-by=/usr/share/keyrings/mullvad-keyring.asc arch=$( dpkg --print-architecture )] https://repository.mullvad.net/deb/stable stable main" | sudo tee /etc/apt/sources.list.d/mullvad.list
 
# Install the package
sudo apt update
sudo apt install mullvad-vpn

If that doesn’t work for any reason you can read more about the Downloads here or just run:

curl -sSL https://mullvad.net/download/app/deb/latest-beta/ --output /tmp/mullvad.deb
sudo apt install /tmp/mullvad.deb -y

Mullvad takes some extra configuration out of the box before we can enable it (special shoutout to this guy on Proxmox forums for publishing his workarounds) Run this on your Proxmox host:

script=/root/pepare-mullvad-lxc.sh
servicename=pepare-mullvad-lxc
cat > $script <<EOF
#!/usr/bin/env bash
chown 100000:100000 /dev/net/tun
mkdir -p /tmp/net-cls-v1
mount -t cgroup -o net_cls none /tmp/net-cls-v1
chown -R 100000:100000 /tmp/net-cls-v1
EOF
chmod +x $script
cat > /etc/systemd/system/$servicename.service <<EOF
[Service]
ExecStart=$script
[Install]
WantedBy=default.target
EOF
systemctl enable $servicename
systemctl start $servicename

Now go ahead and restart your deluge instance, and when it’s live again go and run each of these commands:

mullvad account set {YOUR_ACCOUNT_ID}
mullvad auto-connect on
mullvad lan set allow
mullvad connect
  1. Quick Deluge configuration options (You can’t do this one through the WebUI it’s completely bricked):
deluge-console plugin --enable Label

while you’re still in the console add this to ~/.config/deluge/core.conf

"download_location": "/mnt/media/Downloads",

but here’s a script you can run if you don’t want to use nano or vi:

# Define the new download path
NEW_DOWNLOAD_PATH="/mnt/media/Downloads"
 
# Determine Deluge config directory (assuming a common Linux setup)
DELUGE_CONFIG_DIR="$HOME/.config/deluge"
 
# Ensure the Deluge daemon is not running (crucial for modifying core.conf)
# This checks for the 'deluged' process
if pgrep "deluged" > /dev/null; then
    echo "Warning: Deluge daemon is currently running. Attempting to stop it."
    sudo systemctl stop deluged || { echo "Error: Failed to stop Deluge daemon. Please stop it manually and retry."; exit 1; }
    sleep 2 # Give it a moment to stop
fi
 
# Use sed to replace the download_location line
# The `sed -i` option edits the file in place.
# We're using a comma as a delimiter for the sed command
# because the path might contain slashes.
if sed -i "s#\"download_location\": \".*\"#\"download_location\": \"$NEW_DOWNLOAD_PATH\"#" "$DELUGE_CONFIG_DIR/core.conf"; then
    echo "Deluge download location successfully updated to $NEW_DOWNLOAD_PATH"
else
    echo "Error: Failed to update Deluge download location."
    echo "Please check the core.conf file and permissions."
    exit 1
fi
 
# (Optional) Attempt to restart the Deluge daemon
# This part depends on how Deluge is set up to run (e.g., systemd service, init.d)
echo "Attempting to restart Deluge daemon (if it was running)."
sudo systemctl start deluged  # Or sudo service deluged start, depending on the system

[!WARNING] If you opted to changing it manually, make sure to restart the Deluge service with “sudo systemctl start deluged”

Configure Labels in WebUI:

  1. *arr stack configuration

Prowlarr

In order to get anything out of Radarr and Sonarr, special consideration needs to be made for the setup of Prowlarr, as it interfaces with both services. Off the gate it’s worth setting up the Captcha solver we have in FlareSolverr. Go to “Settings > Indexers > Add Indexer Proxies” Make sure to add the tag because that will come in handy when using the public trackers with Captchas in place.

In “Settings > Apps > Add Application” you’ll want to add your Sonarr and Radarr instances, to do this you will need their API-key (which you can grab from “Settings>General”) as well as their IP address + port.

Now you can add the indexers, make sure you add the tag “cloudflare” to any tracker that necessitates the use of a captcha solver.

Radarr

First you need to navigate to your Radarr WebUI and configure the root folder: radarr There’s still a few additional steps before you’re ready to download movies, you need to establish a connection between your Deluge instance that’s going to handle the downloads and Radarr: deluge-radarr

Sonarr

Sonarr is going to be the same old song and dance that you just went through with radarr

Jellyfin

Navigate to your Jellyfin WebUI, login and go to “Server>Libraries>Add Library” for the path to your Movies and TV-shows

And now you’re done configuring your *arr stack :>