I have a homelab, or more simply a personal server I run at home. It’s a small square black box that sits in my office, humming away. This server runs Proxmox VE1, a hypervisor. This controls pretty much everything that goes on, on this server. It has the ability to spin up containers, which it calls LXC’s. These are somewhat akin to Docker containers. Anyway, the process of spinning one of these up is super simple. Click a few buttons, allocate some space and there’s your ‘container’.
While this is a super simple process, there’s an even simpler process. Enter Proxmox VE Scripts2. This is a repository filled with installation scripts which offer a one-liner that can be run in Proxmox’s terminal, which pulls in a Bash script and executes it. This script will then proceed to not just create an LXC container, but also installs the program you wanted to run on this LXC. Most scripts can be run either automatically, or will offer you choices on how to set up the container and program. It’s like magic.
Anyway, one3 of these scripts will install Frigate4, which is a bit of software to monitor security cameras—a so-called NVR. When I bought my house it came with security cameras and a very clunky dedicated physical NVR, which was plonked into a wall-mounted server rack in the garage. The software to view the cameras with and check recordings was god-aweful, so I decided on swapping it out in favor of Frigate on my server.
Using the script, installation was a breeze, until I hit a snag. I install LXC containers on a dedicated SSD for fast load times. It is meant for running programs and not storing data, like the data a security camera might generate—video, they call it. By default, Frigate will store all camera feeds (and other data, like snapshots of detections and short clips) on the same drive as it is installed on. “No problem”, I thought, “I’ll just go into the Frigate UI and switch the storage location to a dedicated drive I have already installed on my server.”
Nope. No can do. It is not possible to add another drive to Frigate, which is outside of the LXC from within the UI. Shit.
This meant having to frantically search online for a solution, which I’ve found. The following are the steps required to set it up.
- Note the ID of your container on the Proxmox dashboard.
- Open your console on the Proxmox web interface on the host.
- Stop the Frigate LXC.
|
|
Again, the container ID can be found on the Proxmox dashboard.
- Edit the config file.
|
|
- Add the following.
|
|
- Set the permissions for the drive.
|
|
- Restart the container.
|
|
And that’s it. Without needing to adjust anything else in the UI, Frigate will now store all content on the dedicated external drive.