This project sets up a complete Frigate NVR system with Google Coral PCIe accelerator on Ubuntu 20.04 LTS, including Docker, Portainer, and network storage integration.
- Automated installation of Frigate with Coral PCIe support
- Hardware-accelerated video decoding with AMD iGPU (radeonsi VAAPI driver)
- Network storage integration (SMB/CIFS)
- Docker and Portainer for container management
- Ansible-based deployment for repeatable setup
- x86_64 system with Ubuntu 20.04 LTS
- Google Coral PCIe accelerator
- AMD iGPU (for hardware-accelerated decoding)
- Minimum 2GB RAM (4GB+ recommended)
- At least 10GB free disk space
- Static IP assignment recommended for the server
- Access to SMB share (update in
ansible/templates/frigate/config.yml.j2) - MQTT broker (update host/port in
ansible/templates/frigate/config.yml.j2)
Before running the playbook, update these configuration files:
-
Ansible Inventory (
ansible/inventory):[all] your-hostname ansible_user=your-usernameReplace
your-hostnamewith your server's hostname or IP, andyour-usernamewith your SSH username. -
Frigate Config (
ansible/templates/frigate/config.yml.j2):- Update MQTT connection details
- Configure camera settings
- Update any IP addresses or credentials
-
Network Shares:
- Update SMB/CIFS share paths in the Frigate config
- Ensure proper permissions are set for the media directory
frigate_setup/
├── ansible/ # Ansible playbooks and templates
│ ├── templates/
│ │ └── frigate/ # Frigate configuration templates
│ │ ├── config.yml.j2 # Main Frigate config template
│ │ └── docker-compose.yml.j2 # Docker Compose template
│ ├── inventory # Ansible inventory file
│ ├── site.yml # Main playbook
│ └── README.md # Ansible-specific docs
└── README.md # This file
-
Prerequisites
- Ubuntu 20.04 LTS installed
- Python 3.8+ and pip installed
- SSH access with sudo privileges
-
Install Ansible
sudo apt update sudo apt install -y ansible
-
Configure Inventory Update
ansible/inventorywith your server's IP and SSH user:[all] 192.168.50.5 ansible_user=your_username -
Run the Playbook
ansible-playbook -i ansible/inventory ansible/site.yml --ask-become-pass
When prompted, enter your sudo password.
The main configuration is managed through Ansible templates in ansible/templates/frigate/. Key settings:
- Configuration File:
config.yml.j2(templated to/opt/frigate/config/config.yml) - MQTT: Configured for broker at 192.168.50.84:1883
- Recording: 7-day retention with motion-based storage
- Hardware Acceleration: Using AMD radeonsi VAAPI driver
- Coral TPU: Configured for PCIe accelerator (
coral_pcidetector)
- SMB share mounted at
/mnt/cameras - Frigate media directory:
/media/frigate(inside container) - Database stored in
/opt/frigate/db
-
Check Coral Device
docker exec -it frigate ls -la /dev/apex_0 -
Verify VAAPI
docker exec -it frigate vainfo --display drm --device /dev/dri/renderD128 -
Check Frigate Logs
docker logs -f frigate
- Frigate Web UI: http://your-server-ip:5000
- Portainer: https://your-server-ip:9443
- Update the image tag in
ansible/site.yml - Re-run the playbook:
ansible-playbook -i ansible/inventory ansible/site.yml --ask-become-pass
Back up these files:
ansible/templates/frigate/config.yml.j2(main configuration template)/opt/frigate/config/config.yml(generated config)/opt/frigate/db/frigate.db(database)
- Check if the device is visible on the host:
ls -la /dev/apex_0 lsmod | grep -i gasket - Reboot the system if the device isn't found
If hardware acceleration isn't working:
- Verify the driver:
docker exec -it frigate vainfo --display drm --device /dev/dri/renderD128 - Check the driver in use:
docker inspect frigate --format '{{json .Config.Env}}' | jq -r '.[]' | grep LIBVA_DRIVER_NAME
This project is open source and available under the MIT License.