How to Use Google Coral USB Accelerator with Frigate NVR on Synology NAS (Docker)

Running Frigate NVR for local AI object detection across multiple security cameras is one of the most rewarding home automation projects. However, running object detection purely on an Intel CPU quickly leads to bottlenecks—inference speeds hover between 80ms to 140ms per frame, and CPU utilization can easily pin at 80%–100%.

The Google Coral USB Accelerator (featuring the Edge TPU coprocessor) completely transforms performance. It offloads real-time machine learning inference, dropping inference latencies down to 8ms–12ms while reducing CPU usage to a fraction of its former load.

In this guide, we break down how to pass through the Google Coral USB device to a Frigate container on Synology NAS (DSM 7.0, 7.1, and 7.2 Container Manager), dispel common driver myths, and provide the exact configuration files needed.

Google Coral USB Accelerator


1. Synology DSM 7+ Compatibility & The Driver Myth

A frequent question across homelab forums is: "Does the Google Coral USB work on Synology DSM 7, or did Synology break USB support?"

When Synology released DSM 7.0, they officially dropped kernel support for USB serial dongles (such as certain Zigbee/Z-Wave adapters or USB Wi-Fi cards). Many users assumed this applied to the Google Coral TPU as well.

Here is the technical reality:

  • The Google Coral USB is not a serial device; it is a raw USB device communicating directly over the USB bus.
  • The Frigate Docker container already bundles the official libedgetpu runtime and drivers internally.
  • You do not need to install custom kernel drivers or community SPK packages on the Synology host OS.
  • As long as you mount the host's USB bus (/dev/bus/usb:/dev/bus/usb) with privileged: true in Docker, the container communicates directly with the Coral Edge TPU without friction.

2. Verifying the Coral USB via SSH

Before launching Docker, plug your Coral USB into one of the rear USB 3.0 ports on your Synology NAS. SSH into your Synology box and run:

1lsusb

Depending on whether Frigate has initialized the TPU, you will observe one of two device signatures:

  1. Uninitialized state (Before Frigate starts):
    1Bus 001 Device 003: ID 1a6e:089a Global Unichip Corp.
    
  2. Initialized state (After Frigate loads the TPU model):
    1Bus 001 Device 004: ID 18d1:9302 Google Inc.
    

Why /dev/bus/usb:/dev/bus/usb Mapping is Critical: When Frigate loads its first model onto the Coral TPU, the device dynamically reboots its internal firmware, resetting its USB Vendor/Product ID from Global Unichip to Google Inc. If you try to map a single static device node like /dev/bus/usb/001/003, Docker will lose the handle upon re-enumeration. Mapping the entire /dev/bus/usb directory allows the container to seamlessly track the device across resets.


3. Synology Docker Compose Configuration

Whether you use Synology's Container Manager (DSM 7.2+) "Projects" tab or classic docker-compose via CLI, here is the production-tested compose configuration:

 1version: "3.8"
 2
 3services:
 4  frigate:
 5    container_name: frigate
 6    privileged: true # Required for raw USB bus access on DSM 7+
 7    restart: unless-stopped
 8    image: ghcr.io/blakeblackshear/frigate:stable
 9    shm_size: "128mb" # Adjust based on camera resolution (e.g., 256mb for 4K streams)
10    devices:
11      - /dev/bus/usb:/dev/bus/usb # Maps Coral USB accelerator
12      # - /dev/dri/renderD128:/dev/dri/renderD128 # Uncomment for Intel QuickSync hardware decoding
13    volumes:
14      - /etc/localtime:/etc/localtime:ro
15      - /volume1/docker/frigate/config.yml:/config/config.yml:ro
16      - /volume1/docker/frigate/db:/database
17      - /volume1/surveillance/frigate/media:/media/frigate
18      - type: tmpfs # 1GB RAM disk for camera caching to prevent drive wear
19        target: /tmp/cache
20        tmpfs:
21          size: 1000000000
22    ports:
23      - "5000:5000" # Web UI
24      - "8554:8554" # RTSP feeds
25      - "8555:8555/tcp" # WebRTC
26      - "8555:8555/udp" # WebRTC
27    environment:
28      FRIGATE_RTSP_PASSWORD: "your_secure_password"

4. Frigate config.yml Detector Setup

In your Frigate config.yml file, configure the detector section to explicitly use the Edge TPU over USB:

 1mqtt:
 2  enabled: true
 3  host: 192.168.1.50 # Your MQTT Broker (Home Assistant Mosquitto)
 4  user: mqtt_user
 5  password: mqtt_password
 6
 7# Enable the Google Coral USB Edge TPU detector
 8detectors:
 9  coral:
10    type: edgetpu
11    device: usb
12
13cameras:
14  front_door:
15    ffmpeg:
16      inputs:
17        - path: rtsp://user:[email protected]:554/h264Preview_01_main
18          roles:
19            - record
20        - path: rtsp://user:[email protected]:554/h264Preview_01_sub
21          roles:
22            - detect
23    detect:
24      width: 1280
25      height: 720
26      fps: 5

5. Verification & Performance Results

Once you deploy the container, open the Frigate Web UI (http://<your-nas-ip>:5000) and navigate to the System tab.

Under the Detectors card, verify that:

  • coral: Status is Running
  • Inference Speed: Consistently reports between 8.0ms and 11.5ms

Synology Docker Container List

Key Best Practices & Troubleshooting

  1. USB 3.0 RF Interference: The USB 3.0 bus emits radio frequency interference around 2.4 GHz, which can degrade Zigbee or Z-Wave dongles nearby. Always connect the Coral USB using a 1-meter USB extension cable rather than plugging it directly against the chassis.
  2. Adequate Power Supply: The Coral TPU draws significant peak current when handling multi-stream inferencing. If your Coral randomly drops off or disappears from lsusb, plug it into an external powered USB 3.0 hub with dedicated 5V power.
  3. Intel QuickSync (VA-API): If your Synology NAS features an Intel Celeron/Pentium CPU with integrated graphics (e.g., DS920+, DS423+, DS1520+), pair the Coral TPU with /dev/dri/renderD128 hardware acceleration for near-zero CPU video decoding.
comments powered by Disqus

Translations: