• 2 Posts
  • 12 Comments
Joined 3 years ago
cake
Cake day: October 16th, 2023

help-circle







  • Sure thing

    Also I thought that frigate is only usable through home assistant, but that only means android app I guess.

    Nope, Home Assistant is just a nice integration with it

    The web UI is fast and responsive - even on mobile in Chrome

    You can easily view object detections and recordings by day and hour through the web UI too

    It’s extremely well done

    Anyway, I am actually in process of picking few cameras, likely going with tplink vigi, like C340 and see if it will play nicely.

    Frigate have docs on recommended cameras

    https://docs.frigate.video/frigate/hardware

    Regardless of what cameras you choose, please ensure you VLAN and firewall them off - these cameras effectively run a Linux distro and should not be trusted or accessible

    For example, my Reolink cameras can access NTP and DNS just so their clocks are correct

    They can’t access anything else on the network

    The CCTV VM sits on the same network as the cameras and has host firewall rules to deny access from the cameras

    Frigate just connects to each camera’s stream and does its magic from there


    version: "3.9"
    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: "512mb" # update for your cameras based on calculation above
        volumes:
          - /etc/localtime:/etc/localtime:ro
          - /opt/dockervolumes/frigate/config/config.yml:/config/config.yml
          - /mnt/cctv/frigate:/media/frigate
          - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
            target: /tmp/cache
            tmpfs:
              size: 1000000000
        ports:
          - "8554:8554"     # RTSP feeds
          - "8555:8555/tcp" # WebRTC over tcp
          - "8555:8555/udp" # WebRTC over udp
        environment:
          FRIGATE_C1_PASS: ${FRIGATE_C1_PASS}
          FRIGATE_C2_PASS: ${FRIGATE_C2_PASS}
          FRIGATE_C3_PASS: ${FRIGATE_C3_PASS}
          FRIGATE_C4_PASS: ${FRIGATE_C4_PASS}
        labels:
          - traefik.enable=true
          - traefik.http.routers.cctv.rule=Host(`cctv.${DOMAIN}`)
          - traefik.http.routers.cctv.entrypoints=websecure
          - traefik.http.routers.cctv.tls.certresolver=cloudflare
          - traefik.http.services.cctv.loadbalancer.server.port=5000
        networks:
          - proxy
    networks:
      proxy:
        external: true