Category Archives: homelab

Installing OPNsense on an OVH VPS

Installing OPNsense on an OVH VPS

This guide walks you through installing OPNsense on an OVH VPS using a Nano image. It works for me, it might not work for you.

Prerequisites

  1. An OVH VPS with access to recovery mode.
  2. Sufficient permissions to modify /dev/sda.

Steps

Step 0: Reboot the VPS into Recovery Mode

Start by rebooting the VPS into recovery mode from the OVH control panel. This allows full access to the disk for the installation process.

Step 1: Create a Temporary Mount

Once in recovery mode, mount a temporary filesystem (tmpfs) to use as a working directory:

mount -t tmpfs -o mode=1777 tmpfs /mnt

Step 2: Download the OPNsense Nano Image

Next, download the latest OPNsense Nano image from an official mirror. This example uses LeaseWeb's mirror, but you can select one closer to your region from the OPNsense Download Page:

wget https://mirror.ams1.nl.leaseweb.net/opnsense/releases/.../your-image.img.bz2 -P /mnt

Step 3: Extract the Image

Decompress the image using bunzip2:

bunzip2 /mnt/OPNsense-23.7-nano-amd64.img.bz2

Step 4: Write the Image to Disk

Using dd, write the image directly to /dev/sda. This will overwrite any existing data, so double-check the target disk.

dd if=/mnt/OPNsense-23.7-nano-amd64.img of=/dev/sda bs=1M status=progress

Step 5: Reboot the VPS

Finally, reboot the VPS from the OVH control panel to exit recovery mode and boot into OPNsense.


This setup should get OPNsense up and running on your OVH VPS, ready for configuration. Remember to go to KVM console and assign interfaces properly. Also you might need to enable accsessing WebUI on WAN port.

Media ingestion snippets

rename GoPro clips according to creation dates:

for f in *.MP4; do mv -n "$f" "$(date -r "$f" +"%Y%m%d_%H%M%S").mp4"; done

change picture names according to exif data:

exiftool -r '-FileName<CreateDate' -d '%Y-%m-%d %H.%M.%S%%-c.%%le' .

make timelapse video from JPG snapshots using Intel Quick Sync:

ffmpeg -r 12 -pattern_type glob -y -i '*.jpg' -vcodec mjpeg_qsv -crf 0 "output.mp4"

make timelapse video from normal video with some motion blur using Intel QuickSync:

ffmpeg -i input.mkv -filter:v "tblend=average,framestep=2,setpts=0.1*PTS" -r 96 -b:v 30M -crf 10 -vcodec h264_qsv -an -y output.mkv

merge video files without transcoding them:

ffmpeg -safe 0 -f concat -i <(find . -type f -name '*MP4' -printf "file '$PWD/%p'\n" | sort) -c copy output.mkv

Sort pictures to camera directories:

exiftool -d '.' '-directory<${model;}/$datetimeoriginal' *.jpg

Sort pictures to Year/Month direcotires:


exiftool -d '%Y/%m' '-directory<$CreateDate' *.jpg

Homelab: Dewey

Specs:
- CPU: Intel Core i7-7700k
- Motherboard: Z270 GAMING M3 (MS-7A62)
- GPU: ASUS GeForce GTX960
- RAM: Kingston HyperX 3x8GB DDR4 2.4GHz
- Storage: 2x Corsair MP500 m.2 240G SSDs in mdadm RAID0, 1x WD Black 1TB for storage. 100GB LVM volume as writeback cache for HDD
- Fans: NOCTUA

Roles:
- Docker host
- gaming in virtual machine
- general workstation

Runs:
- ArchLinux

Homelab: TOOR

Specs:
- Intel J1900
- 8 GB of DDR3 non-ecc memory
- 2x WD Blue WD30EZRZ-00Z5HB0 3 TB
- chassis: Fractal Design Node804

Roles:
- Docker host
- backup replication
- backup sync

Runs:
- Debian testing

Docks:

- kanboard/kanboard:stable
- linuxserver/duplicati
- linuxserver/sickbeard
- linuxserver/couchpotato
- guacamole/guacamole
- jenkins
- diameter/rtorrent-rutorrent:latest
- gogs/gogs
- guacamole/guacd
- linuxserver/headphones
- homeassistant/home-assistant