How to Install Frigate on Ubuntu Server Latest

Frigate is an open-source video surveillance software designed to run on low-cost hardware like Raspberry Pi. It is a highly configurable, easy-to-use software that supports live streaming and motion detection. In this tutorial, I will guide you on how to install Frigate on your Ubuntu Server.

Step 1: Update Server

Before installing Frigate, it is recommended to update your server.

sudo apt update
sudo apt upgrade

Step 2: Install Docker

Frigate requires Docker to run. Install the latest version of Docker using the below commands.

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

Verify that Docker is installed correctly.

sudo docker version

Step 3: Install Frigate

Create a new directory to store Frigate configuration files and data.

sudo mkdir -p /etc/frigate

Create a YAML configuration file '/etc/frigate/config.yml' with your configuration parameters.

sudo nano /etc/frigate/config.yml

Paste the following YAML configuration in the file.

mqtt:
  host: mqtt://localhost
rtmp:
  enabled: true
  stream_labels: true
  movie_url: http://localhost:8080/
cameras:
  - name: Camera1
    ffmpeg:
      inputs:
        - rtsp://user:password@192.168.1.15:554/1
      width: 640
      height: 480
      fps: 10
    detect:
      objects:
        person:
        car:
      mask:
        - /etc/frigate/mask.png

Save and exit the file.

Now create another YAML configuration file '/etc/frigate/docker-compose.yml' that will contain the Docker Compose configuration for setting up the Frigate container.

sudo nano /etc/frigate/docker-compose.yml

Paste the following Docker Compose configuration in the file.

version: '3'
services:
  frigate:
    image: blakeblackshear/frigate:stable-amd64
    restart: always
    environment:
      - FRIGATE_RTSP_PASSWORD=password
    devices:
      - /dev/video0
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /etc/frigate:/config
    ports:
      - "5000:5000"
      - "1935:1935"
    command: /start.sh

Save and exit the file.

Step 4: Start Frigate

Now we can start the Frigate container using Docker Compose.

sudo docker-compose -f /etc/frigate/docker-compose.yml up -d

Verify that the container has started using the below command.

sudo docker ps

Step 5: Access Frigate Web Interface

Open your web browser and navigate to http://[Your server IP address]:5000. Here you will see the Frigate web interface, where you can view the live streams of your configured cameras, view the motion detection events, and customize the settings according to your needs.

Conclusion

In this tutorial, we have installed Frigate on Ubuntu Server using Docker Compose. You can now configure Frigate to stream videos from cameras and detect motion events. You can also customize the settings as per your requirements.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!