Update README.md

This commit is contained in:
RomanNum3ral 2026-06-20 19:50:50 +00:00
parent 30a95d6327
commit dec1e8cc0b
1 changed files with 148 additions and 213 deletions

361
README.md
View File

@ -1,256 +1,194 @@
# Frigate NVR with SMB Storage on Arch Linux # Frigate NVR on Arch Linux with SMB Storage
## Overview ## Overview
This project provides an automated installation script for deploying Frigate NVR on Arch Linux with video recordings stored on a remote SMB/CIFS network share. Self-hosted Frigate NVR running on Arch Linux using Docker and SMB-backed storage for recordings.
The installer will: Current deployment includes:
* Install Docker and Docker Compose * Arch Linux
* Install CIFS/SMB utilities * Docker / Docker Compose
* Configure an SMB credentials file * Frigate 0.17+
* Automatically mount an SMB share * Amcrest IP cameras
* Create a Frigate Docker Compose deployment * SMB network storage
* Create a starter Frigate configuration * go2rtc stream restreaming
* Configure persistent recording storage on the SMB share * ONVIF camera discovery
* Start Frigate automatically
--- ---
## Features ## Features
* Arch Linux compatible * Continuous camera recording
* Docker-based deployment * Motion detection
* SMB/NAS recording storage * Snapshot capture
* Automatic startup after reboot * Multi-camera support
* Recording retention policies * SMB/NAS storage
* Storage usage limits * ONVIF camera integration
* Easy camera configuration * RTSP restreaming through go2rtc
* Ready for Home Assistant integration * Home Assistant integration ready
--- ---
## Requirements ## Hardware
### Server
* Arch Linux
* Internet connection
* Root or sudo access
* Docker-compatible hardware
### Network Storage
* SMB/CIFS share
* Read/Write permissions
* Stable network connection
### Cameras ### Cameras
* RTSP-compatible cameras | Name | IP Address |
* ONVIF-compatible cameras (recommended) | ----- | ------------ |
| Front | 10.28.24.141 |
Examples: | PTZ 1 | 10.28.24.142 |
* Amcrest
* Reolink
* Dahua
* Hikvision
* Axis
--- ---
## Installation ## Network Ports
Download the installer: | Port | Service |
| ---- | -------------- |
| 8971 | Frigate Web UI |
| 8554 | RTSP Restream |
| 8555 | WebRTC |
| 1984 | go2rtc API |
```bash ---
git clone https://github.com/YOUR_USERNAME/frigate-smb-arch.git
cd frigate-smb-arch ## Storage
chmod +x install-frigate-smb-arch.sh
./install-frigate-smb-arch.sh Recordings are stored on an SMB-mounted network share.
Example mount:
```fstab
//NAS-IP/recordings /mnt/frigate-recordings cifs credentials=/etc/samba/frigate-smb.cred,uid=1000,gid=1000,_netdev,x-systemd.automount 0 0
``` ```
The installer will prompt for: Verify mount:
* SMB Server IP ```bash
* SMB Share Name mount | grep frigate
* SMB Username ```
* SMB Password
* Local Mount Path
--- ---
## Default Paths ## Frigate Configuration
### Frigate Configuration Configuration file:
```text ```text
/opt/frigate/config/config.yml /opt/frigate/config/config.yml
``` ```
### Docker Compose ---
## Camera Streams
### Front Camera
Main Stream:
```text ```text
/opt/frigate/docker-compose.yml rtsp://admin:PASSWORD@10.28.24.141:554/cam/realmonitor?channel=1&subtype=0
``` ```
### SMB Credentials Sub Stream:
```text ```text
/etc/samba/frigate-smb.cred rtsp://admin:PASSWORD@10.28.24.141:554/cam/realmonitor?channel=1&subtype=1
``` ```
### Recordings ### PTZ Camera
Main Stream:
```text ```text
/mnt/frigate-recordings/frigate rtsp://admin:PASSWORD@10.28.24.142:554/cam/realmonitor?channel=1&subtype=0
```
Sub Stream:
```text
rtsp://admin:PASSWORD@10.28.24.142:554/cam/realmonitor?channel=1&subtype=1
``` ```
--- ---
## Adding Cameras ## Example Configuration
Edit:
```bash
sudo nano /opt/frigate/config/config.yml
```
Example:
```yaml ```yaml
cameras: mqtt:
driveway: enabled: false
enabled: true
version: 0.17-0
record:
enabled: true
snapshots:
enabled: true
go2rtc:
streams:
front:
- rtsp://admin:PASSWORD@10.28.24.141:554/cam/realmonitor?channel=1&subtype=0
front_sub:
- rtsp://admin:PASSWORD@10.28.24.141:554/cam/realmonitor?channel=1&subtype=1
ptz_1:
- rtsp://admin:PASSWORD@10.28.24.142:554/cam/realmonitor?channel=1&subtype=0
ptz_1_sub:
- rtsp://admin:PASSWORD@10.28.24.142:554/cam/realmonitor?channel=1&subtype=1
cameras:
front:
enabled: true
ffmpeg: ffmpeg:
inputs: inputs:
- path: rtsp://USERNAME:PASSWORD@192.168.1.100:554/stream1 - path: rtsp://127.0.0.1:8554/front_sub
roles: roles:
- detect - detect
- path: rtsp://127.0.0.1:8554/front
roles:
- record - record
- audio
detect: detect:
width: 1920 width: 640
height: 1080 height: 480
fps: 5
ptz_1:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/ptz_1_sub
roles:
- detect
- path: rtsp://127.0.0.1:8554/ptz_1
roles:
- record
- audio
detect:
width: 640
height: 480
fps: 5 fps: 5
``` ```
Restart Frigate: ---
## Docker Management
Restart:
```bash ```bash
cd /opt/frigate cd /opt/frigate
sudo docker compose restart sudo docker compose restart
``` ```
--- View Logs:
## Viewing Logs
```bash ```bash
sudo docker logs -f frigate sudo docker logs -f frigate
``` ```
--- Container Status:
## Accessing Frigate
Open:
```text
http://SERVER_IP:8971
```
Example:
```text
http://192.168.1.50:8971
```
---
## Retention Configuration
Example:
```yaml
record:
enabled: true
retain:
days: 7
mode: all
```
Keep event recordings longer:
```yaml
record:
events:
retain:
default: 30
```
---
## Storage Limits
Example:
```yaml
storage:
max_usage_percent: 90
```
Frigate will automatically delete the oldest recordings when the storage threshold is reached.
---
## Updating Frigate
```bash
cd /opt/frigate
sudo docker compose pull
sudo docker compose up -d
```
---
## Troubleshooting
### SMB Share Not Mounting
Check:
```bash
mount | grep frigate
```
Test connectivity:
```bash
ping NAS_IP
```
Manually mount:
```bash
sudo mount -a
```
---
### Frigate Not Starting
View logs:
```bash
sudo docker logs frigate
```
Check container status:
```bash ```bash
sudo docker ps sudo docker ps
@ -258,42 +196,39 @@ sudo docker ps
--- ---
### Camera Not Connecting ## Troubleshooting
Verify RTSP stream: ### Verify RTSP Stream
```bash ```bash
ffplay rtsp://USERNAME:PASSWORD@CAMERA_IP/stream ffprobe "rtsp://admin:PASSWORD@CAMERA_IP:554/cam/realmonitor?channel=1&subtype=0"
```
### Verify SMB Mount
```bash
df -h
mount | grep cifs
```
### Verify Frigate Configuration
```bash
sudo docker logs frigate --tail 100
``` ```
--- ---
## Home Assistant Integration ## Future Improvements
Frigate integrates directly with Home Assistant using: * NVIDIA hardware decoding
* Home Assistant integration
* Object detection acceleration
* Cloudflare Tunnel remote access
* Mobile notifications
* Recording retention policies
* Automatic backups
* GPU-based inference
* Frigate Integration ```
* MQTT ```
* Frigate Proxy Add-on
This allows:
* Person detection
* Vehicle detection
* Motion events
* Notifications
* Automations
---
## License
MIT License
Use at your own risk.
---
## Author
Created for self-hosted Linux NVR deployments using Frigate, Docker, SMB storage, and Home Assistant.