# **Homelab setup**

10 March 2025 -  
**3 mins read time**

Tags:  
[linux](/content/blog/tags#linux/index.html) [server](/content/blog/tags#server/index.html)

# Step-by-step guide to setting up homelab for media storage and streaming.

## Step 1: Choosing the Right Setup Approach

**Option 1: Continue with Debian (Recommended for Simplicity)**  
Since you already have Debian installed with SSH, you can manually set up a file-sharing and media server using tools like:  
- Samba or NFS (for file sharing)  
- Plex or Jellyfin (for movie and music streaming)  
- Calibre Web (for book/magazine management)

**Option 2: Use CasaOS (User-Friendly, NAS-Like)**  
CasaOS provides an easy-to-use web UI to manage your files and install apps like Plex, Jellyfin, and Nextcloud with Docker containers. It’s simpler than Proxmox but still requires some Linux/Docker knowledge.

**Option 3: Use Proxmox (For Virtualization & Expansion)**  
Proxmox is a hypervisor that lets you run multiple virtual machines (VMs) and containers. If you want separate environments (e.g., one VM for media, another for hacking labs), Proxmox is a great choice, but it has a learning curve.

## Step 2: Setting Up File Sharing

To access your files from different devices (Windows, Mac, Linux):

**Option A: Use Samba (For Windows/macOS/Linux)**  
Install Samba:

```
sudo apt update
sudo apt install samba
```

Edit Samba config:

```
sudo nano /etc/samba/smb.conf
```

Add at the bottom:

```
[Media]
path = /home/yourusername/Media
read only = no
browsable = yes
guest ok = yes
```

Restart Samba:

```
sudo systemctl restart smbd
```

Access the share:  
Windows: \\Media  
Linux: smb:///Media  
macOS: smb:///Media

**Option B: Use NFS (For Linux-based Devices)**  
Install NFS:

```
sudo apt install nfs-kernel-server
```

Configure NFS:

```
sudo nano /etc/exports
```

Add:

```
/home/yourusername/Media *(rw,sync,no_subtree_check)
```

Restart NFS:

```
sudo systemctl restart nfs-kernel-server
```

## Step 3: Setting Up Media Streaming

**Option A: Jellyfin (Free & Open-Source)**  
Install:

```
sudo apt install curl
curl -fsSL https://repo.jellyfin.org/debian/jellyfin_team.gpg.key | sudo tee /etc/apt/trusted.gpg.d/jellyfin.asc
echo "deb [arch=$( dpkg --print-architecture )] https://repo.jellyfin.org/debian bookworm main" | sudo tee /etc/apt/sources.list.d/jellyfin.list
sudo apt update
sudo apt install jellyfin
```

Start the service:

```
sudo systemctl enable --now jellyfin
```

Access it in a browser:  
http://:8096

**Option B: Plex (Easier but Requires Account)**  
Install:

```
sudo apt install apt-transport-https curl
curl https://downloads.plex.tv/plex-keys/PlexSign.key | sudo apt-key add -
echo "deb https://downloads.plex.tv/repo/deb public main" | sudo tee /etc/apt/sources.list.d/plexmediaserver.list
sudo apt update
sudo apt install plexmediaserver
```

Start Plex:

```
sudo systemctl enable --now plexmediaserver
```

Open http://:32400/web in a browser.

## Step 4: Setting Up Book & Magazine Management

**Option: Calibre-Web (For eBooks & PDFs)**

Install dependencies:

```
sudo apt install python3-pip
```

Install Calibre-Web:

```
sudo pip3 install calibreweb
```

Run it:

```
calibre-web
```

Access in a browser:  
http://:8083

## Next Steps
- Automate Downloads: Use Sonarr, Radarr, or Lidarr for automatic media downloads.  
- Secure Access: Set up a VPN (WireGuard) or use a reverse proxy (Nginx).  
- Consider Cloud Syncing: Nextcloud for cloud-style storage.
