Skip to content

Commit

Permalink
add docker storage script
Browse files Browse the repository at this point in the history
  • Loading branch information
koush committed Jan 23, 2024
1 parent 7cf9218 commit e611ef7
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 8 deletions.
4 changes: 4 additions & 0 deletions buyers-guide/servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
51 changes: 50 additions & 1 deletion scrypted-nvr/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 7 additions & 7 deletions server-hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.

0 comments on commit e611ef7

Please sign in to comment.