Create a new Frigate installation directory
mkdir /opt/frigate
Create a new Docker compose file - modify as needed to fit your environment.
For instance, I have a separate storage device for all recordings mounted at /mnt/frigate/
- you may not want this
bash -c "cat > /opt/frigate/docker-compose.yml" << 'EOF'
services:
frigate:
container_name: frigate
privileged: true # this may not be necessary for all setups
restart: unless-stopped
image: ghcr.io/blakeblackshear/frigate:stable
shm_size: "64mb" # update for your cameras based on calculation above
devices:
# - /dev/bus/usb:/dev/bus/usb # Passes the USB Coral, needs to be modified for other versions
- /dev/dri/renderD128:/dev/dri/renderD128 # For intel hwaccel, needs to be updated for your hardware
volumes:
- /etc/localtime:/etc/localtime:ro
- /opt/frigate/config:/config
- /mnt/frigate/storage:/media/frigate
- type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
target: /tmp/cache
tmpfs:
size: 1000000000
ports:
- "8971:8971"
- "5000:5000" # Internal unauthenticated access. Expose carefully.
- "8554:8554" # RTSP feeds
- "8555:8555/tcp" # WebRTC over tcp
- "8555:8555/udp" # WebRTC over udp
environment:
FRIGATE_RTSP_USERNAME: "admin"
FRIGATE_RTSP_PASSWORD: "<cameras-local-password>"
EOF
Start Frigate (not in daemon mode). Watch Frigate's output - it will display the default credentials needed to login to the web interface.
cd /opt/frigate && \
docker compose up
Once you have the admin credentials, stop the container and restart it in daemon mode.
docker compose up -d
Navigate to the Frigate web interface, located at https://<server-ip>:8971
, use the credentials obtained in the last steps.