If you already he an environment with Linux and Docker installed, you can continue to Installing Frigate below.
If you already he Frigate installed through Docker or through a Home Assistant Add-on, you can continue to Configuring Frigate below.
Setting up hardwareThis section guides you through setting up a server with Debian Bookworm and Docker.
Install Debian 12 (Bookworm)There are many guides on how to install Debian Server, so this will be an abbreviated guide. Connect a temporary monitor and keyboard to your device so you can install a minimal server without a desktop environment.
Prepare installation media Download the small installation image from the Debian website Flash the ISO to a USB device (popular tool is balena Etcher) Boot your device from USB Install and setup Debian for remote access Ensure your device is connected to the network so updates and software options can be installed Choose the non-graphical install option if you don't he a mouse connected, but either install method works fine You will be prompted to set the root user password and create a user with a password Install the minimum software. Fewer dependencies result in less maintenance. Uncheck "Debian desktop environment" and "GNOME" Check "SSH server" Keep "standard system utilities" checked After reboot, login as root at the command prompt to add user to sudoers Install sudo apt update && apt install -y sudo Add the user you created to the sudo group (change blake to your own user) usermod -aG sudo blake Shutdown by running poweroffAt this point, you can install the device in a permanent location. The remaining steps can be performed via SSH from another device. If you don't he an SSH client, you can install one of the options listed in the Visual Studio Code documentation.
Finish setup via SSHConnect via SSH and login with your non-root user created during install
Setup passwordless sudo so you don't he to type your password for each sudo command (change blake in the command below to your user)
echo 'blake ALL=(ALL) NOPASSWD:ALL' | sudo tee /etc/sudoers.d/userLogout and login again to activate passwordless sudo
Setup automatic security updates for the OS (optional)
Ensure everything is up to date by running sudo apt update && sudo apt upgrade -y Install unattended upgrades sudo apt install -y unattended-upgradesecho unattended-upgrades unattended-upgrades/enable_auto_updates boolean true | sudo debconf-set-selectionssudo dpkg-reconfigure -f noninteractive unattended-upgradesNow you he a minimal Debian server that requires very little maintenance.
Install Docker Install Docker Engine (not Docker Desktop) using the official docs Specifically, follow the steps in the Install using the apt repository section Add your user to the docker group as described in the Linux postinstall steps Installing FrigateThis section shows how to create a minimal directory structure for a Docker installation on Debian. If you he installed Frigate as a Home Assistant Add-on or another way, you can continue to Configuring Frigate.
Setup directoriesFrigate will create a config file if one does not exist on the initial startup. The following directory structure is the bare minimum to get started. Once Frigate is running, you can use the built-in config editor which supports config validation.
.├── docker-compose.yml├── config/└── storage/This will create the above structure:
mkdir storage config && touch docker-compose.ymlIf you are setting up Frigate on a Linux device via SSH, you can use nano to edit the following files. If you prefer to edit remote files with a full editor instead of a terminal, I recommend using Visual Studio Code with the Remote SSH extension.
noteThis docker-compose.yml file is just a starter for amd64 devices. You will need to customize it for your setup as detailed in the Installation docs.
docker-compose.yml
services: frigate: container_name: frigate restart: unless-stopped stop_grace_period: 30s image: ghcr.io/blakeblackshear/frigate:stable volumes: - ./config:/config - ./storage:/media/frigate - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear target: /tmp/cache tmpfs: size: 1000000000 ports: - "8971:8971" - "8554:8554" # RTSP feedsNow you should be able to start Frigate by running docker compose up -d from within the folder containing docker-compose.yml. On startup, an admin user and password will be created and outputted in the logs. You can see this by running docker logs frigate. Frigate should now be accessible at https://server_ip:8971 where you can login with the admin user and finish the configuration using the built-in configuration editor.
Configuring FrigateThis section assumes that you already he an environment setup as described in Installation. You should also configure your cameras according to the camera setup guide. Pay particular attention to the section on choosing a detect resolution.
Step 1: Add a detect streamFirst we will add the detect stream for the camera:
mqtt: enabled: Falsecameras: name_of_your_camera: #