Post

My First Rack And Nas Project

My First Rack And Nas Project

My First Rack And Nas Project

Introduction

Building a home lab infrastructure is a rite of passage for many DevOps engineers and system administrators. When I decided to create my first dedicated rack and NAS setup, I wanted something that would serve as both a learning platform and a functional home server ecosystem. This project represents the culmination of years of tinkering with various self-hosted services, finally consolidated into a professional-grade infrastructure that runs everything from media servers to game hosting platforms.

The challenge was clear: create a scalable, reliable, and efficient home lab that could handle multiple services while maintaining security and performance. With the rise of remote work and digital content consumption, having a centralized system for file storage, media streaming, and application hosting has become increasingly valuable. This project not only solved practical needs but also provided an excellent opportunity to implement enterprise-level practices in a home environment.

In this comprehensive guide, I’ll walk you through every aspect of building a rack-mounted NAS and server infrastructure, from hardware selection and software installation to configuration and optimization. Whether you’re setting up your first home lab or looking to upgrade an existing setup, this guide will provide you with the knowledge and practical steps needed to create a robust, self-hosted ecosystem.

Understanding the Hardware Components

The foundation of this build centers around the DeskPi RackMate TT, a 1U rack mount solution designed specifically for compact mini PCs. Paired with the Beelink Ryzen 5 mini PC, this combination provides an excellent balance of performance and space efficiency. The Ryzen 5 processor, with its multiple cores and threads, handles virtualization workloads exceptionally well, making it perfect for running Proxmox and multiple containerized services simultaneously.

The DeskPi RackMate TT offers several advantages: proper cooling for the mini PC, a clean rack-mounted form factor, and convenient access to ports and controls. The 1U height is ideal for home racks where space might be limited but professional organization is still desired. The aluminum construction provides good heat dissipation while maintaining a sleek appearance that fits well in any environment.

Storage Infrastructure

Storage forms the backbone of any NAS project, and this build incorporates multiple layers of storage solutions. The 16TB UGREEN 2-bay NAS serves as the primary storage array, configured in RAID 1 for data redundancy. This setup ensures that even if one drive fails, all data remains intact and accessible. The dual-bay configuration provides a good balance between capacity and reliability for a home environment.

For the Proxmox host itself, high-speed SSDs are used to ensure snappy performance for virtual machines and containers. The SSD rack mentioned in the build provides easy access for drive maintenance and upgrades. This tiered storage approach—fast SSDs for the host and VMs, with larger HDDs for bulk storage—optimizes both performance and cost-effectiveness.

Networking with NetGear Managed Switch

A managed switch is crucial for any serious homelab setup, and the NetGear managed switch provides the necessary features for creating a robust network infrastructure. VLAN support, QoS settings, and port mirroring capabilities allow for proper network segmentation and traffic management. This is particularly important when running multiple services that need to be isolated from each other for security reasons.

The switch enables the creation of separate networks for different purposes: one for management interfaces, another for user-facing services, and potentially isolated networks for testing or development environments. This network segmentation is a fundamental security practice that prevents lateral movement in case of a breach.

Edge Computing with NVIDIA Jetson Orin Nano

The inclusion of an NVIDIA Jetson Orin Nano at the bottom of the rack adds edge computing capabilities to the setup. This powerful AI development platform can handle machine learning inference, computer vision tasks, and other GPU-accelerated workloads. Its low power consumption and small form factor make it ideal for always-on AI applications that can complement the main server infrastructure.

Potential use cases for the Jetson Orin Nano in this setup include automated surveillance processing, intelligent home automation triggers, or even as a dedicated Plex media server for hardware transcoding. The flexibility of this platform opens up numerous possibilities for expanding the capabilities of the home lab.

Display and Monitoring Solutions

The 3D printed parts and attached screen serve as a monitoring dashboard, displaying real-time system metrics through btop. This visual feedback is invaluable for quick health checks and performance monitoring without needing to SSH into each device. The JetKVM attachment provides keyboard, video, and mouse access to the Proxmox host, making it easy to manage the system even when network access is unavailable.

The display setup typically shows CPU usage, memory consumption, network traffic, disk I/O, and temperature readings for all critical components. This immediate visibility helps in identifying performance bottlenecks and potential hardware issues before they become critical problems.

Prerequisites and Planning

Hardware Requirements

Before beginning the installation process, it’s essential to ensure all hardware components are properly assembled and configured:

Rack Infrastructure:

  • DeskPi RackMate TT 1U mount
  • Standard 19-inch rack or wall-mount bracket
  • Adequate ventilation and cooling solutions
  • Power distribution unit (PDU) with sufficient outlets

Compute Node:

  • Beelink Ryzen 5 mini PC
  • Minimum 16GB DDR4 RAM (32GB or 64GB recommended for VM workloads)
  • M.2 NVMe SSD for Proxmox installation (256GB minimum)
  • Additional SATA SSDs for VM storage

Storage Array:

  • UGREEN 2-bay NAS enclosure
  • Two 8TB+ NAS-grade HDDs (Seagate IronWolf or WD Red recommended)
  • SATA to USB or direct connection cables
  • External power supply for the NAS

Networking:

  • NetGear managed switch with VLAN support
  • CAT6 Ethernet cables
  • Router with DHCP and DNS capabilities
  • Static IP addresses for critical services

Edge Device:

  • NVIDIA Jetson Orin Nano developer kit
  • 32GB or larger microSD card for OS
  • 5V/4A USB-C power supply
  • Heatsink and fan for cooling

Monitoring:

  • Small HDMI display (5-7 inches recommended)
  • 3D printed mounting brackets
  • JetKVM adapter
  • HDMI and USB cables

Software Requirements

Base Operating Systems:

  • Proxmox VE 7.x or 8.x for the main host
  • Ubuntu Server LTS for the Jetson Orin Nano
  • NAS firmware (typically embedded Linux)

Virtualization and Containerization:

  • Proxmox VE with all updates
  • Docker and Docker Compose
  • Podman as alternative container runtime

Network Services:

  • Tailnet for secure networking
  • DNS server (CoreDNS or Pi-hole)
  • DHCP server if not using router

Applications to Install:

  • Home Assistant for home automation
  • Jellyfin for media streaming
  • Radarr, Sonarr, Lidarr for media management
  • RomM for emulation library
  • AMP for game server hosting
  • SSH bastion for secure access

Network Planning

Proper network planning is crucial for a homelab of this complexity. Consider the following network architecture:

Network Segments:

  • Management VLAN (192.168.1.0/24) - for administrative access
  • Services VLAN (192.168.2.0/24) - for user-facing applications
  • IoT VLAN (192.168.3.0/24) - for smart home devices
  • Guest VLAN (192.168.4.0/24) - for visitors

IP Addressing Scheme:

1
2
3
4
5
6
7
8
9
10
# Management Network
Router: 192.168.1.1
Proxmox Host: 192.168.1.10
Jetson Nano: 192.168.1.20
Switch Management: 192.168.1.100

# Services Network
Jellyfin: 192.168.2.50
Home Assistant: 192.168.2.51
AMP Server: 192.168.2.52

Security Considerations:

  • Enable firewall on all devices
  • Use SSH keys instead of passwords
  • Implement fail2ban for intrusion prevention
  • Regular security updates and patching
  • Backup encryption for sensitive data

Installation and Setup

Proxmox Installation

The Beelink Ryzen 5 mini PC will serve as the Proxmox host, providing virtualization capabilities for all services.

1
2
3
4
5
6
7
8
9
10
# Download Proxmox ISO from official website
wget https://www.proxmox.com/en/downloads/category/iso-images-pve

# Create bootable USB
sudo dd if=proxmox-ve_*.iso of=/dev/sdX bs=1M status=progress

# Boot from USB and follow installation wizard
# Select target disk (M.2 NVMe SSD)
# Configure timezone, password, and network settings
# Reboot and access web interface at https://192.168.1.10:8006

Post-Installation Configuration:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Update Proxmox and install necessary packages
apt update && apt upgrade -y
apt install -y vim net-tools htop

# Configure network interfaces
nano /etc/network/interfaces
# Example configuration:
# auto enp1s0
# iface enp1s0 inet static
#     address 192.168.1.10/24
#     gateway 192.168.1.1
#     dns-nameservers 192.168.1.1 8.8.8.8

# Enable nested virtualization for VMs
echo "user.max_user_namespaces=15076" >> /etc/sysctl.conf
sysctl -p

# Install ZFS for storage pools (optional but recommended)
apt install -y zfsutils-linux

NAS Configuration

The UGREEN 2-bay NAS requires proper setup for optimal performance and data protection.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Access NAS web interface (typically 192.168.1.100)
# Default credentials: admin/admin

# Initialize drives and create RAID 1 array
# Set up network settings to match your VLAN scheme
# Configure SMB/CIFS shares for Windows compatibility
# Enable NFS for Linux clients
# Set up AFP for macOS compatibility

# Create shared folders:
# - Media (for Jellyfin content)
# - Downloads (for torrent clients)
# - Backups (for system backups)
# - Emulation (for RomM)

Network Share Configuration:

1
2
3
4
5
6
7
8
9
10
11
# Create mount points on Proxmox host
mkdir -p /mnt/nas/{media,downloads,backups,emulation}

# Add to /etc/fstab for auto-mount
# Example for SMB share:
//192.168.1.100/Media /mnt/nas/media cifs \
# username=your_username,password=your_password,iocharset=utf8,sec=ntlmv2 0 0

# Test mount
mount -a
df -h

Container and VM Setup

With Proxmox installed, the next step is setting up the necessary containers and virtual machines.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Access Proxmox web interface
# Create VM for Home Assistant
qm create 100 --name home-assistant --memory 2048 --net0 virtio,bridge=vmbr0

# Import Home Assistant LXC template
pveam update
pveam available | grep homeassistant
pveam download local homeassistant:latest

# Create Home Assistant container
pct create 100 local:vztmpl/homeassistant:latest --hostname home-assistant \
--cores 2 --memory 2048 --net0 virtio,bridge=vmbr0

# Start container and access console
pct start 100
pct console 100

Docker Compose Setup:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Install Docker on Proxmox host
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
systemctl enable docker
systemctl start docker

# Create docker-compose.yml for AMP
mkdir -p /opt/amp
cd /opt/amp

# Basic AMP docker-compose.yml
cat > docker-compose.yml << EOF
version: '3.8'
services:
  amp:
    image: cubecoders/amp
    container_name: amp
    ports:
      - "8080:8080"
      - "8443:8443"
    volumes:
      - ./data:/config
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=America/New_York
    restart: unless-stopped
EOF

# Deploy AMP
docker-compose up -d

Network Configuration

Proper network configuration ensures all services can communicate securely and efficiently.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Configure VLANs on NetGear switch
# VLAN 10 - Management (192.168.1.0/24)
# VLAN 20 - Services (192.168.2.0/24)
# VLAN 30 - IoT (192.168.3.0/24)

# Configure bridge interfaces on Proxmox
nano /etc/network/interfaces
# Example bridge configuration:
# auto vmbr0
# iface vmbr0 inet static
#     address 192.168.1.10/24
#     gateway 192.168.1.1
#     bridge_ports enp1s0
#     bridge_stp off
#     bridge_fd 0

# Create additional bridges for VLANs
# auto vmbr20
# iface vmbr20 inet static
#     address 192.168.2.10/24
#     bridge_ports enp1s0.20
#     bridge_stp off
#     bridge_fd 0

# Configure VLAN interface
# auto enp1s0.20
# iface enp1s0.20 inet manual
#     vlan_raw_device enp1s0

Tailnet Integration

Tailnet provides secure networking across all devices in the homelab.

1
2
3
4
5
6
7
8
9
10
11
12
13
# Install Tailscale on Proxmox host
curl -fsSL https://tailscale.com/install.sh | sh

# Authenticate and join network
tailscale up --advertise-routes=192.168.1.0/24

# Install on Jetson Orin Nano
# Follow same installation process
# Join same Tailnet for seamless connectivity

# Verify connectivity
tailscale status
ping $(tailscale ip -4 home-assistant)

Configuration and Optimization

Proxmox Optimization

Optimizing Proxmox ensures maximum performance and stability for all hosted services.

1
2
3
4
5
6
7
8
9
10
11
12
13
# Enable ZFS compression for storage pools
zfs set compression=lz4 rpool/data

# Configure memory ballooning for VMs
# In VM settings -> Hardware -> Memory -> Enable ballooning

# Optimize VM performance
qm set 100 --scsihw virtio-scsi-pci --tablet 0
qm set 100 --bootdisk scsi0

# Configure backup schedule
# Datacenter -> Backup -> Add schedule
# Daily incremental backups to NAS

ZFS Storage Pool Configuration:

1
2
3
4
5
6
7
8
9
10
11
# Create optimized ZFS pool for VM storage
zpool create -o ashift=12 -O atime=off -O compression=lz4 \
-O normalization=formD -O dedup=off tank /dev/sdX

# Create datasets with appropriate settings
zfs create -o mountpoint=/var/lib/vz tank/vm-storage
zfs create -o mountpoint=/var/lib/vz/template tank/template-storage

# Set compression and other optimizations
zfs set compression=lz4 tank/vm-storage
zfs set recordsize=128k tank/vm-storage

Container Optimization

Optimizing containers improves performance and resource utilization.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Create system user for container management
useradd -m -s /bin/bash container-user
usermod -aG docker container-user

# Configure Docker daemon for better performance
cat > /etc/docker/daemon.json << EOF
{
  "log-driver": "json-file",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
  },
  "storage-driver": "overlay2",
  "storage-opts": [
    "overlay2.override_kernel_check=true"
  ],
  "default-ulimits": {
    "nofile": {
      "Name": "nofile",
      "Hard": 64000,
      "Soft": 64000
    }
  }
}
EOF

# Restart Docker
systemctl restart docker

Security Hardening

Implementing security best practices protects your homelab from potential threats.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Configure UFW firewall
apt install -y ufw
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow from 192.168.1.0/24 to any port 8006
ufw enable

# Configure fail2ban
apt install -y fail2ban
cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local

# Edit jail.local to protect Proxmox web interface
# [proxmox-web]
# enabled = true
# port = 8006
# filter = proxmox-web
# logpath = /var/log/daemon.log
# maxretry = 3

# Create fail2ban filter
cat > /etc/fail2ban/filter.d/proxmox-web.conf << EOF
[Definition]
failregex = pvedaemon: authentication failure; rhost=<HOST> user=.* msg=.*
ignoreregex =
EOF

# Restart fail2ban
systemctl restart fail2ban

SSH Key Authentication:

1
2
3
4
5
6
7
8
9
10
# Generate SSH key pair
ssh-keygen -t ed25519 -C "homelab-admin"

# Copy public key to all devices
ssh-copy-id -i ~/.ssh/id_ed25519.pub 192.168.1.10
ssh-copy-id -i ~/.ssh/id_ed25519.pub 192.168.1.20

# Disable password authentication
sudo sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo systemctl restart sshd

Performance Monitoring

Setting up comprehensive monitoring helps identify and resolve performance issues quickly.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Install and configure btop for system monitoring
apt install -y btop
# Add to startup scripts or display configuration

# Configure Proxmox metrics
# Datacenter -> Metrics -> Enable Prometheus
# Set scrape interval to 15 seconds

# Create monitoring dashboard
# Install Grafana in a container
docker run -d --name=grafana -p 3000:3000 grafana/grafana

# Configure Prometheus for metrics collection
docker run -d --name=prometheus \
-p 9090:9090 \
-v /opt/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml \
prom/prometheus

# Example prometheus.yml
global:
  scrape_interval: 15s
scrape_configs:
  - job_name: 'proxmox'
    static_configs:
      - targets: ['192.168.1.10:9090']

Usage and Operations

Daily Management Tasks

Regular maintenance ensures the homelab runs smoothly and efficiently.

1
2
3
4
5
6
7
8
9
# Daily health check script
cat > /opt/scripts/daily-check.sh << 'EOF'
#!/bin/bash
echo "=== Daily Health Check ==="
echo "Date: $(date)"
echo "Proxmox Status:"
systemctl status pveproxy pvedaemon
echo "Docker Status:"
docker
This post is licensed under CC BY 4.0 by the author.