# Home Lab Applications and Services

This book documents the services, configurations, and infrastructure deployed in my home lab. Built on Proxmox VE, this environment allows me to test, deploy, and manage enterprise-like systems, including identity platforms, monitoring tools, collaboration apps, and file services.

Each section covers installation, configuration, and use case documentation to centralize my learning and provide technical transparency for future reference.

# Audiobookshelf Installation via Proxmox VE Helper Scripts

Audiobookshelf is a self-hosted audiobook and podcast server with a web UI and apps. This guide shows how to deploy it in an **LXC container** using the [**Proxmox VE Helper-Scripts**](https://community-scripts.github.io/ProxmoxVE/scripts?id=audiobookshelf).

#### 🧰 Step-by-Step Instructions

To create a new Proxmox VE Audiobookshelf LXC, run the command below in the Proxmox VE Shell.

```
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/audiobookshelf.sh)"
```

<p class="callout info">Location of config file: /usr/share/audiobookshelf/config</p>

This launches an interactive installation wizard for **Audiobookshelf**.

#### Fill in the Prompts

You'll be asked to confirm settings for:

<div class="mt-4 flex" id="bkmrk-prompt-recommendatio"><div class="rounded-lg border text-card-foreground shadow-sm flex items-center overflow-x-auto bg-primary-foreground pl-4 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20"><div class="overflow-x-auto whitespace-pre-wrap text-nowrap break-all pr-4 text-sm [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20"><div class="_tableContainer_80l1q_1"><div class="_tableWrapper_80l1q_14 group flex w-fit flex-col-reverse" tabindex="-1"><table class="w-fit min-w-(--thread-content-width)" data-end="2011" data-start="1231" style="width: 76.3095%; height: 270.047px;"><thead data-end="1309" data-start="1231"><tr data-end="1309" data-start="1231" style="height: 29.7969px;"><th data-col-size="sm" data-end="1261" data-start="1231" style="width: 39.6896%; height: 29.7969px;">Prompt</th><th data-col-size="sm" data-end="1309" data-start="1261" style="width: 60.3104%; height: 29.7969px;">Recommendation / Example</th></tr></thead><tbody data-end="2011" data-start="1388"><tr data-end="1465" data-start="1388" style="height: 30.1094px;"><td data-col-size="sm" data-end="1417" data-start="1388" style="width: 39.6896%; height: 30.1094px;">Container ID</td><td data-col-size="sm" data-end="1465" data-start="1417" style="width: 60.3104%; height: 30.1094px;">`905` (or any available ID)</td></tr><tr data-end="1543" data-start="1466" style="height: 30.1094px;"><td data-col-size="sm" data-end="1495" data-start="1466" style="width: 39.6896%; height: 30.1094px;">Hostname</td><td data-col-size="sm" data-end="1543" data-start="1495" style="width: 60.3104%; height: 30.1094px;">`e.g. audiobookshelf`</td></tr><tr data-end="1621" data-start="1544" style="height: 30.1094px;"><td data-col-size="sm" data-end="1573" data-start="1544" style="width: 39.6896%; height: 30.1094px;">Network Bridge</td><td data-col-size="sm" data-end="1621" data-start="1573" style="width: 60.3104%; height: 30.1094px;">`vmbr0` (default for most setups)</td></tr><tr data-end="1699" data-start="1622" style="height: 30.1094px;"><td data-col-size="sm" data-end="1651" data-start="1622" style="width: 39.6896%; height: 30.1094px;">Static IP Address</td><td data-col-size="sm" data-end="1699" data-start="1651" style="width: 60.3104%; height: 30.1094px;">e.g. `172.30.0.x`</td></tr><tr data-end="1777" data-start="1700" style="height: 30.1094px;"><td data-col-size="sm" data-end="1729" data-start="1700" style="width: 39.6896%; height: 30.1094px;">Gateway IP</td><td data-col-size="sm" data-end="1777" data-start="1729" style="width: 60.3104%; height: 30.1094px;">e.g. `172.30.0.x`</td></tr><tr data-end="1855" data-start="1778" style="height: 30.1094px;"><td data-col-size="sm" data-end="1807" data-start="1778" style="width: 39.6896%; height: 30.1094px;">Storage Location</td><td data-col-size="sm" data-end="1855" data-start="1807" style="width: 60.3104%; height: 30.1094px;">e.g. `local-lvm`</td></tr><tr data-end="1933" data-start="1856" style="height: 29.7969px;"><td data-col-size="sm" data-end="1885" data-start="1856" style="width: 39.6896%; height: 29.7969px;">Enable Root SSH Access</td><td data-col-size="sm" data-end="1933" data-start="1885" style="width: 60.3104%; height: 29.7969px;">Optional (yes for remote CLI access)</td></tr><tr data-end="2011" data-start="1934" style="height: 29.7969px;"><td data-col-size="sm" data-end="1963" data-start="1934" style="width: 39.6896%; height: 29.7969px;">Media Folder Mount Point</td><td data-col-size="sm" data-end="2011" data-start="1963" style="width: 60.3104%; height: 29.7969px;">Mount your media library or keep the default</td></tr></tbody></table>

- Access Audiobookshelf Web UI

</div><div class="_tableWrapper_80l1q_14 group flex w-fit flex-col-reverse" tabindex="-1">  
</div></div></div></div></div>```
http://<your-static-ip>:13378
```

<div class="mt-4 flex" id="bkmrk-transfer-file-to-the"><div class="rounded-lg border text-card-foreground shadow-sm flex items-center overflow-x-auto bg-primary-foreground pl-4 [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20"><div class="overflow-x-auto whitespace-pre-wrap text-nowrap break-all pr-4 text-sm [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20"><div class="_tableContainer_80l1q_1"><div class="_tableWrapper_80l1q_14 group flex w-fit flex-col-reverse" tabindex="-1">  
</div></div>Transfer File to the Audiobookshelf server:</div><div class="overflow-x-auto whitespace-pre-wrap text-nowrap break-all pr-4 text-sm [&::-webkit-scrollbar]:h-1.5 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-muted-foreground/20">  
</div></div></div>```
scp "File path" user@<IP of the server>:/<Media Folder/
```

# BookStack Installation on Ubuntu 24.04

### 📄 Description:

This page documents the complete process for installing **BookStack**, a self-hosted wiki and knowledge base, on a fresh Ubuntu 24.04 server using PHP, Nginx, and MariaDB. This service is used as my primary knowledge repository.

<p class="callout info">ref. [https://www.bookstackapp.com/docs/admin/installation/](https://www.bookstackapp.com/docs/admin/installation/)</p>

### ✅ Prerequisites

- Fresh Ubuntu 24.04 LTS server (minimal install) LXC
- Root or sudo access
- Static IP address

### Ubuntu 24.04 Installation Script

A script to install BookStack on a fresh instance of Ubuntu 24.04 is available. This script is ONLY FOR A FRESH OS it will install Apache, MySQL 8.0 &amp; PHP 8.3 and could OVERWRITE any existing web setup on the machine. It also does not set up mail settings or configure system security, so you will have to do those separately. You can use the script as a reference if you’re installing on a non-fresh machine.

#### Running the Script

```
# Ensure you have read the above information about what this script does before executing these commands.

# Download the script
wget https://codeberg.org/bookstack/devops/raw/branch/main/scripts/installation-ubuntu-24.04.sh

# Make it executable
chmod a+x installation-ubuntu-24.04.sh

# Run the script with admin permissions
sudo ./installation-ubuntu-24.04.sh
```

The script will output a log file for debugging within your current working directory when running the script. Permissions for the BookStack installation files &amp; folders will be set based on the user used to run the script.

#### **✅ Change your BookStack instance URL**

#### 1. **Set up a domain name (DNS)**

Make sure that `wiki.example.com` points to your server's **public IP address** (private/internal). In my case, I used Cloudflare tunnel.

##### 2. **Configure BookStack's `.env`**

Edit the BookStack environment file to reflect the new domain:

```
sudo nano /var/www/bookstack/.env
```

Update this line:

```
APP_URL=https://wiki.example.com
```

Then restart the web server:

```
sudo systemctl restart apache2
```

#### ✅ **Set up HTTPS with Let's Encrypt (Optional but Recommended)**

Install Certbot:

```
sudo apt install certbot python3-certbot-apache
sudo certbot --apache -d wiki.example.com
```

It will automatically get and install the SSL certificate.

#### **✅ Step-by-Step Mail Setup**

##### **1. Edit the `.env` File**

Open the BookStack environment config:

```
sudo nano /var/www/bookstack/.env
```

Look for or add the following section:

```
MAIL_DRIVER=smtp
MAIL_HOST=smtp.example.com
MAIL_PORT=587
MAIL_USERNAME=your@email.com
MAIL_PASSWORD=your_password
MAIL_ENCRYPTION=tls
MAIL_FROM_ADDRESS=your@email.com
MAIL_FROM_NAME="BookStack"
```

🔁 Replace the values depending on your email provider.

##### **2. Clear the config Cache (optional but recommended)**

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-"><div class="sticky top-9"><div class="absolute end-0 bottom-0 flex h-9 items-center pe-2">  
</div></div><div class="overflow-y-auto p-4" dir="ltr">  
</div></div>```
cd /var/www/bookstack
php artisan config:clear
```

# PairDrop Installation via Proxmox VE Helper-Scripts

This guide covers installing **PairDrop** in an LXC container using the community-built [Proxmox VE Helper-Scripts](https://community-scripts.github.io/ProxmoxVE/scripts?id=pairdrop). These scripts make deploying apps like PairDrop fast, standardized, and repeatable.

#### **🧰 Step-by-Step Instructions**

- To create a new Proxmox VE PairDrop LXC, run the command below in the Proxmox VE Shell.

```
bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/ct/pairdrop.sh)"
```

This command runs a script that launches an interactive menu for installing **PairDrop** in a container.

#### Follow the Installation Prompts

The script will guide you through a series of options. Typical options include:

- Set **container ID** (e.g. `904`)
- Choose **hostname** (e.g. `pairdrop`)
- Select a **static IP address** (e.g. `172.30.0.x`)
- Confirm **bridge interface** (e.g. `vmbr0`)
- Choose container **storage** (e.g. `local-lvm`)
- Set **root password**
- Enable optional features (SSH, nesting, etc.)

#### Wait for the Script to Finish

Once confirmed, the script will:

- Download the latest **Debian 12** template
- Create the LXC container
- Install **Docker** inside the container
- Deploy the **PairDrop** Docker container

#### Access the PairDrop Web Interface

Once complete, open your browser and go to:

```
http://<your-static-ip>:3000
```

# Paperless-ngx Installation on Debian 12 (Using Official Script)

**Paperless-ngx** is a document management system for indexing, OCRing, and organizing scanned documents and PDFs. This guide walks you through setting it up on **Debian 12** using the official installation script via Docker Compose.

Paperless provides an interactive installation script to set up a Docker Compose installation. The script asks for a couple of configuration options and will then create the necessary configuration files, pull the Docker image, start Paperless-ngx, and create your superuser account.

#### 🐳 1. Install Docker &amp; Compose (Debian12)

```
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  
sudo apt-get update

# Install Docker $ Compose plugin
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

#Enable and Start Docker
sudo systemctl enable --now docker
sudo service docker start
```

#### 📦 2. Run the Official Paperless-ngx Installation Script

Download and run the setup script:

```
bash -c "$(curl --location --silent --show-error https://raw.githubusercontent.com/paperless-ngx/paperless-ngx/main/install-paperless-ngx.sh)"
```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-follow-the-prompts."><div class="overflow-y-auto p-4" dir="ltr">Follow the prompts.</div></div>#### 🌐 4. Access the Interface

Once complete, go to:

```
http://<your-server-ip>:8000
```

#### 📚 Reference

- 📄 Official GitHub Repository:  
    [https://github.com/paperless-ngx/paperless-ngx](https://github.com/paperless-ngx/paperless-ngx)
- 📘 Docker Installation Guide:  
    [https://docs.docker.com/engine/install/debian/](https://docs.docker.com/engine/install/debian/)
- 📖 Paperless-ngx Documentation:  
    [https://docs.paperless-ngx.com/](https://docs.paperless-ngx.com/)

# Snipe-IT Installation on Ubuntu 24.04

This guide explains how to install **Snipe-IT**, a self-hosted IT asset management system, on **Ubuntu 24.04** using **Nginx**, **MariaDB**, and **PHP 8.3**.

<p class="callout info">Ref. [https://snipe-it.readme.io/docs/installation](https://snipe-it.readme.io/docs/installation)</p>

#### 📦 1. Update the System

```
sudo apt update && sudo apt upgrade -y
```

#### 🌐 2. Install Required Packages

Install Nginx, PHP, MariaDB, and all required PHP extensions:

```
sudo apt install nginx mariadb-server php-bcmath php-common php-ctype php-curl php-fileinfo php-fpm php-gd php-iconv php-intl php-mbstring php-mysql php-soap php-xml php-xsl php-zip git -y
```

#### ⚙️ 3. Install Composer

```
sudo apt install composer -y
```

#### 🛢️ 4. Create the Snipe-IT Database

```
sudo mysql
```

Inside the MySQL shell:

```
CREATE DATABASE snipeit;
GRANT ALL ON snipeit.* TO 'snipeit'@'localhost' IDENTIFIED BY 'yourStrongPassword';
FLUSH PRIVILEGES; 
EXIT;
```

#### 📁 5. Download Snipe-IT

```
cd /var/www/html 
sudo git clone https://github.com/snipe/snipe-it 
cd snipe-it
```

#### ⚙️ 6. Create and Configure `.env` File

```
sudo cp .env.example .env 
sudo nano .env
```

Edit the following variables:

```
APP_URL=http://your-server-ip 
DB_DATABASE=snipeit 
DB_USERNAME=snipeit 
DB_PASSWORD=yourStrongPassword
```

#### 🔒 7. Set Permissions

```
sudo chown -R www-data: /var/www/html/snipe-it 
sudo chmod -R 755 /var/www/html/snipe-it
```

#### 🧱 8. Install Dependencies with Composer

```
sudo composer update --no-plugins --no-scripts 
sudo composer install --no-dev --prefer-source --no-plugins --no-scripts
```

#### 🔑 9. Generate App Key

```
sudo php artisan key:generate
```

<p class="callout warning">Make sure you keep a copy of your APP\_KEY in a safe place, for example, a secure password manager. This key is required to decrypt any encrypted fields in the database.</p>

#### 🧠 10. Check PHP FPM Version

```
sudo systemctl list-units --type=service | grep php
```

Ensure PHP 8.3 (or the current version) is installed and running.

#### ▶️ 11. Enable PHP-FPM

```
sudo systemctl start php8.3-fpm 
sudo systemctl enable php8.3-fpm
```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-bash-copyedit-sudo-s"><div class="overflow-y-auto p-4" dir="ltr">  
</div></div>#### 🌐 12. Create Nginx Configuration for Snipe-IT

```
sudo nano /etc/nginx/conf.d/snipeit.conf
```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-paste-the-following-"><div class="flex items-center text-token-text-secondary px-4 py-2 text-xs font-sans justify-between h-9 bg-token-sidebar-surface-primary select-none rounded-t-2xl">Paste the following (adjust IP and PHP version if needed):</div></div>```
server {
        listen 80;
        server_name 10.0.0.7;
        root /var/www/html/snipe-it/public;
        
        index index.php;
                
        location / {
                try_files $uri $uri/ /index.php?$query_string;

        }
        
        location ~ \.php$ {
include fastcgi.conf;
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php8.3-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
        }

}
```

#### 🔗 13. Enable the Site

```
sudo ln -s /etc/nginx/conf.d/snipeit.conf /etc/nginx/sites-enabled/snipeit.conf
```

#### ⚙️ 14. Update Nginx Config

Edit main config:

```
sudo nano /etc/nginx/nginx.conf
```

Add the following line **inside the `http` block**:

```
server_names_hash_bucket_size 64;
```

<div class="contain-inline-size rounded-2xl relative bg-token-sidebar-surface-primary" id="bkmrk-nginx-copyedit-serve"><div class="overflow-y-auto p-4" dir="ltr">  
</div></div>#### 🔄 15. Restart Nginx

```
sudo systemctl restart nginx
```

#### 🌐 16. Access Snipe-IT Web Interface

Open your browser and go to:

```
http://your-server-ip
```

Complete the web-based setup to finish the installation.