# Home Lab

# Resources

## VMs

* [proxmox](https://www.proxmox.com/en/)

## Containers

* [Nomad](https://www.nomadproject.io/)
* [Kubernetes](https://kubernetes.io/)
* [Docker](https://www.docker.com/)
	* [portainer.io](https://www.portainer.io/) (web UI for docker)

## NAS

* [TrueNAS Core](https://www.truenas.com/truenas-core/)

## Task Scheduling

* [Airflow](https://airflow.apache.org/)

# PiKVM

## Gotchas

- Make sure to double check your CIDR rule when establishing a static IP. Does `/24` really mean what you think it means?
- If you are planning on using WiFi make sure to buy the external antenna
- In order for keyboard capture to work correctly you need to run Chrome in app mode

## PiKVM v4 Mini

# Services

### RSS Aggregator / Reader

[Miniflux - Minimalist and Opinionated Feed Reader](https://miniflux.app/) + [Reeder 5 (reederapp.com)](https://reederapp.com/)

# Handling Power Loss

## UPSes

- [OLS3000ERT2UA - Smart App UPS Systems | CyberPower](https://www.cyberpower.com/global/en/product/sku/ols3000ert2ua)

## Articles

- [Network UPS Tools (NUT) Ultimate Guide | Techno Tim](https://technotim.live/posts/NUT-server-guide/)

## Strategies

### Turn Off Devices too Stupid to Turn Themselves Off

#### UniFi Devices

From NUT Server sshpass to server `ubnt-systool poweroff`

# NextDNS

- How to install NextDNS on Unifi Dream Machine Pro: [https://github.com/nextdns/nextdns/wiki/UnifiOS](https://github.com/nextdns/nextdns/wiki/UnifiOS)

# eGPUs

### Discussions

- Powering 4 OCuLink to PCIe x16 Adapters without 4 PSUs - [https://egpu.io/forums/custom-egpu-chassis/powering-4-oculink-to-pcie-x16-adapters-without-4-psus/#post-1116472](https://egpu.io/forums/custom-egpu-chassis/powering-4-oculink-to-pcie-x16-adapters-without-4-psus/#post-1116472)
    - [https://www.reddit.com/r/eGPU/comments/1dir8p0/multiple\_oculink\_adapters\_one\_psu/](https://www.reddit.com/r/eGPU/comments/1dir8p0/multiple_oculink_adapters_one_psu/)
- 

### Oculink

#### Parts

- PCIe 4.0 F9G 64Gbps OcuLink Laptop External Graphics Card GPU Docking Station for M.2 NVMe to SFF-8612 OcuLink eGPU Adapter Card: [https://www.aliexpress.us/item/3256807955790836.html](https://www.aliexpress.us/item/3256807955790836.html)
- Oculink 64Gbps Transfer External Graphics Dock EG01 G38 GPU Dock Straight Elbow Cable 8Pin Connector ATX 800w Power Supply - [https://www.aliexpress.us/item/3256807326757194.html](https://www.aliexpress.us/item/3256807326757194.html)
- 

### Thunderbolt 4/USB-C 4

#### Parts

- ADT UT3G V1.6 External GPU Adapter - USB4 to PCIe 4.0 x16 eGPU for Thunderbolt 4/3 Perfect for NUC, ITX, STX Laptops Gaming PCs - [https://www.aliexpress.us/item/3256807420487972.html](https://www.aliexpress.us/item/3256807420487972.html)
- 

# Exterior PoE

- Enclosure Outdoor Network POE, Telco: 2 Ports. Dimensions Inside: 5 x 4 x 2-inch - [https://www.data-alliance.net/enclosure-outdoor-network-poe-telco-2-ports.-dimensions-inside-5-x-4-x-2-inch/](https://www.data-alliance.net/enclosure-outdoor-network-poe-telco-2-ports.-dimensions-inside-5-x-4-x-2-inch/)
- Sealing Putty (Dum Dum) - [https://www.hobartparts.com/sealing-putty-dum-dum-0p--571878](https://www.hobartparts.com/sealing-putty-dum-dum-0p--571878)
- 

# AI Rig

### Hardware

- **Power Supplies:**
    - 2 x Corsair HX1500i Fully Modular Ultra-Low Noise ATX Power Supply
    - BQZYX+ ADD2PSU 4 in 1 Power Supply Connector (power adapter PSU connector to turn on and off the two power supplies at the same time)
- **Motherboard:** Minisforum BD790i
- **CPU:** AMD Ryzen 9 7945HX 5.4 GHz - 16 Cores 32 Threads (built into motherboard)
- **RAM:** Crucial 5600 96GB Kit
- **Case:** Veddha 6 GPU Miner Case Aluminum
- **Storage:** Crucial T705 2TB Gen 5 NVME
- **GPUs:**
    - 2 x ZOTAC GAMING GeForce RTX 3090 Trinity OC
    - 2 x EVGA GeForce RTX 3090 FTW3 ULTRA
- **PCIe Adapter:** ADT-Link F3312A-Q4S (PCIe 4.0 x16 FFC graphics card extension supports one-to-four split)
- **Network Adapter:** 2.5Gbps Realtek NIC (built into motherboard)
- **Cooling:**
    - 5 x Noctua NF-A12x25
    - 1 x Noctua NF-A12x15
    - 1 x CORSAIR iCUE COMMANDER CORE XT Smart RGB Lighting and Fan Speed Controller
- **Remote Management:** JetKVM with ATX Module

### Limit TDP on RTX 3090s

#### 1. Check Current Power Limits:  


- Use the command `nvidia-smi -q -d POWER` to see the current power limit settings.
- This will show you the current power limit, maximum power limit, and other power-related information.

#### 2. Set a New Power Limit:

- Use the command `sudo nvidia-smi -i <GPU_ID> -pl <POWER_LIMIT_IN_WATTS>` to set a new power limit.
- Replace `<GPU_ID>` with the ID of the GPU you want to modify (e.g., 0 for the first GPU).
- Replace `<POWER_LIMIT_IN_WATTS>` with the desired power limit in watts (e.g., 250 for 250W).
- Example: `sudo nvidia-smi -i 0 -pl 250`

Persistence: To make the power limit persistent across reboots, you'll need to create a custom `systemd `service or script that runs this command on startup.

#### 3. Verify the Settings:

- After setting the power limit, use the command `nvidia-smi -q -d POWER` again to verify that the new power limit has been applied.
- Check the output to ensure that the "Current Power Limit" reflects the value you set.

#### 4. Persist the Power Limit on Boot  


Create a `systemd `service:

```
sudo nano /etc/systemd/system/nvidia-power-limit.service
```

Paste this:

```
[Unit]
Description=Set NVIDIA GPU Power Limit
After=multi-user.target

[Service]
Type=oneshot
ExecStart=/usr/bin/nvidia-smi -i 0 -pl 300
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
```

Enable it:

```
sudo systemctl enable nvidia-power-limit.service
sudo systemctl start nvidia-power-limit.service
```

# Mobile Home Lab

### Resources

- [https://github.com/mozanunal/llm-tools-kiwix](https://github.com/mozanunal/llm-tools-kiwix) - Expose offline Kiwix ZIM archives (like Wikipedia, Stack Exchange, DevDocs) to Large Language Models (LLMs) via the LLM CLI tool and Python library. This plugin allows LLMs to search and read content from your local ZIM files.
- [https://github.com/jojo2357/kiwix-zim-updater](https://github.com/jojo2357/kiwix-zim-updater) - A script to check `download.kiwix.org` for updates to your local ZIM library.
-