From e611ef7f4d986340e005e1473e18f3ce2ca9a6a8 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Tue, 23 Jan 2024 12:20:44 -0800 Subject: [PATCH] add docker storage script --- buyers-guide/servers.md | 4 +++ scrypted-nvr/installation.md | 51 +++++++++++++++++++++++++++++++++++- server-hardware.md | 14 +++++----- 3 files changed, 61 insertions(+), 8 deletions(-) diff --git a/buyers-guide/servers.md b/buyers-guide/servers.md index 9816650..d984bcf 100644 --- a/buyers-guide/servers.md +++ b/buyers-guide/servers.md @@ -51,6 +51,10 @@ While a TPU can improve performance, a capable GPU can also fill the gap. All servers are recommended to have at least 8GB of RAM, 16GB preferred. +::: tip +[Docker](/installation.md#docker) is the recommended installation type for dedicated Mini PCs. +::: + ## Apple Mac Mini M1/M2 This system contains a CPU, GPU, and a TPU (neural cores). An Apple Silicon Mac Mini is the most capable Scrypted NVR system available. diff --git a/scrypted-nvr/installation.md b/scrypted-nvr/installation.md index 97dbe6f..222060a 100644 --- a/scrypted-nvr/installation.md +++ b/scrypted-nvr/installation.md @@ -60,9 +60,58 @@ Cloud access must be enabled for remote access via [browser, iOS, Android, and D ![](/img/scrypted-nvr/cameras-and-recordings.png) +## Docker Volume + +Use the [Quick Setup](#quick-setup) script to format a drive or use an existing directory in Scrypted NVR. [Manual Docker Setup](#manual-docker-setup) steps are also available. + +### Quick Setup + +Run the following to download the script: + +```sh +mkdir -p ~/.scrypted +curl -s https://raw.githubusercontent.com/koush/scrypted/main/install/docker/setup-scrypted-nvr-volume.sh > ~/.scrypted/setup-scrypted-nvr-volume.sh +``` + +To use an existing recording storage directory, run: + +```sh +sudo SERVICE_USER=$USER bash ~/.scrypted/setup-scrypted-nvr-volume.sh /path/to/existing/directory +``` + +To format and use an existing `disk` device, run: + +```sh +lsblk +``` + +Running the script will output your available disks: + +``` +NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS +loop0 7:0 0 63.4M 1 loop /snap/core20/1974 +loop1 7:1 0 63.9M 1 loop /snap/core20/2105 +loop2 7:2 0 111.9M 1 loop /snap/lxd/24322 +loop3 7:3 0 53.3M 1 loop /snap/snapd/19457 +loop4 7:4 0 40.4M 1 loop /snap/snapd/20671 +sda 8:0 0 128G 0 disk +├─sda1 8:1 0 1M 0 part +└─sda2 8:2 0 128G 0 part / +sdx 8:16 0 4096G 0 disk +sr0 11:0 1 1024M 0 rom +``` + +In the example above the 4TB storage disk is listed as `sdx`. To format and use `sdx`, run: + +```sh +sudo SERVICE_USER=$USER bash ~/.scrypted/setup-scrypted-nvr-volume.sh sdx +``` + +The docker container will be updated and restarted with the new disk or directory. + ## Advanced Storage Options -### Docker Volumes +### Manual Docker Setup 1. Edit `~/.scrypted/docker-compose.yaml`. 2. Make the highlighted changes in the yaml block below, adjust the storage directory as appropriate. diff --git a/server-hardware.md b/server-hardware.md index b1fce21..47e7610 100644 --- a/server-hardware.md +++ b/server-hardware.md @@ -2,10 +2,14 @@ ## Scrypted Host Operating System -Scrypted can run on Mac, Windows, and Linux (and Docker). +Scrypted can run on Mac, Windows, and Linux (via Docker or Proxmox). Linux + Docker installations should use `Ubuntu 64bit 22.04 LTS Jammy` as the host, including Raspberry Pi. +::: tip +[Docker](/installation.md#docker) is the recommended installation type for dedicated Mini PCs. +::: + ## Scrypted System Requirements Scrypted can run on low power devices such as a Raspberry Pi 4 or more powerful devices like an Intel NUC or Mac Mini. Most users will be just fine with a low powered device. However, if running software [Motion Sensors](/detection/motion-detection) or [Scrypted NVR](/scrypted-nvr/), the performance requirements will increase per camera. @@ -26,14 +30,10 @@ The Raspberry Pi 4 and low performance NAS are not recommended for use with Scry |Hardware|Operating System|Number of Cameras|Notes| |-|-|-|-| -|Dell Wyse 5070|Ubuntu|5|Available cheap on eBay.| -|Intel N100|Ubuntu|12|New Intel NUC that has a fantastic iGPU for accelerated transcode and detection.| +|Dell Wyse 5070|Ubuntu + Docker|5|Available cheap on eBay.| +|Intel N100|Ubuntu + Docker|12|New Intel NUC that has a fantastic iGPU for accelerated transcode and detection.| |Mac Mini 16GB|macOS|20+|Scrypted NVR can leverage Apple Silicon's [Neural Engine](https://www.makeuseof.com/what-is-a-neural-engine-how-does-it-work/).| -::: tip -Low performance hardware like the Raspberry Pi 4 or a NAS can be used with Scrypted NVR, and handle up to 10 cameras with no issues, if [Scrypted NVR Smart Detections](/scrypted-nvr/features#smart-detections) is disabled. -::: - ### Storage Any hard drive will work, surveillance hard drives are recommended. Flash drives and SD cards should not be used, as they will corrupt quickly due to the high write volume.