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
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
* Install CIFS/SMB utilities
* Configure an SMB credentials file
* Automatically mount an SMB share
* Create a Frigate Docker Compose deployment
* Create a starter Frigate configuration
* Configure persistent recording storage on the SMB share
* Start Frigate automatically
* Arch Linux
* Docker / Docker Compose
* Frigate 0.17+
* Amcrest IP cameras
* SMB network storage
* go2rtc stream restreaming
* ONVIF camera discovery
---
## Features
* Arch Linux compatible
* Docker-based deployment
* SMB/NAS recording storage
* Automatic startup after reboot
* Recording retention policies
* Storage usage limits
* Easy camera configuration
* Ready for Home Assistant integration
* Continuous camera recording
* Motion detection
* Snapshot capture
* Multi-camera support
* SMB/NAS storage
* ONVIF camera integration
* RTSP restreaming through go2rtc
* Home Assistant integration ready
---
## Requirements
### Server
* Arch Linux
* Internet connection
* Root or sudo access
* Docker-compatible hardware
### Network Storage
* SMB/CIFS share
* Read/Write permissions
* Stable network connection
## Hardware
### Cameras
* RTSP-compatible cameras
* ONVIF-compatible cameras (recommended)
Examples:
* Amcrest
* Reolink
* Dahua
* Hikvision
* Axis
| Name | IP Address |
| ----- | ------------ |
| Front | 10.28.24.141 |
| PTZ 1 | 10.28.24.142 |
---
## 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
chmod +x install-frigate-smb-arch.sh
./install-frigate-smb-arch.sh
---
## Storage
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
* SMB Share Name
* SMB Username
* SMB Password
* Local Mount Path
```bash
mount | grep frigate
```
---
## Default Paths
## Frigate Configuration
### Frigate Configuration
Configuration file:
```text
/opt/frigate/config/config.yml
```
### Docker Compose
---
## Camera Streams
### Front Camera
Main Stream:
```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
/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
/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
Edit:
```bash
sudo nano /opt/frigate/config/config.yml
```
Example:
## Example Configuration
```yaml
cameras:
driveway:
enabled: true
mqtt:
enabled: false
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:
inputs:
- path: rtsp://USERNAME:PASSWORD@192.168.1.100:554/stream1
- path: rtsp://127.0.0.1:8554/front_sub
roles:
- detect
- path: rtsp://127.0.0.1:8554/front
roles:
- record
- audio
detect:
width: 1920
height: 1080
width: 640
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
```
Restart Frigate:
---
## Docker Management
Restart:
```bash
cd /opt/frigate
sudo docker compose restart
```
---
## Viewing Logs
View Logs:
```bash
sudo docker logs -f frigate
```
---
## 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:
Container Status:
```bash
sudo docker ps
@ -258,42 +196,39 @@ sudo docker ps
---
### Camera Not Connecting
## Troubleshooting
Verify RTSP stream:
### Verify RTSP Stream
```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.
```
```