bolt Valebyte VPS from $4/mo — NVMe, 60s deploy.

Get a VPS arrow_forward

Frigate on VPS: installation, configuration, and maintenance

calendar_month June 15, 2026 schedule 20 min read visibility 25 views
person
Valebyte Team
Frigate on VPS: installation, configuration, and maintenance

Installing Frigate on a VPS provides a powerful and private video surveillance system with object detection, utilizing the computing resources of a cloud server for efficient video stream processing.

What is Frigate and why is `Frigate VPS` the optimal choice?

Frigate is a high-performance, open-source video surveillance system designed specifically for local video stream processing and real-time object detection. Unlike many cloud solutions, Frigate prioritizes privacy and speed, processing all data on your hardware rather than sending it to third-party servers. It uses a modern approach to computer vision, including machine learning (ML) for accurate recognition of people, cars, animals, and other objects, minimizing false positives.

Frigate's main feature is its ability to work with hardware acceleration, which significantly increases video processing efficiency. This can be a regular processor (CPU) or specialized accelerators such as Google Coral Edge TPU or NVIDIA GPU. Thanks to this, Frigate can process multiple high-resolution video streams simultaneously without overloading the system.

Choosing Frigate VPS for deploying this video surveillance system is a strategically advantageous decision for several reasons. Firstly, you gain full control over your infrastructure, which is critical for video surveillance security and privacy. Secondly, Valebyte.com's VPS servers provide a stable and scalable environment that allows you to flexibly adjust resources to meet the growing needs of your Frigate system. You are not limited by the power of home equipment and can easily increase the number of CPU cores, RAM, or disk space as needed. Furthermore, hosting on a VPS ensures constant access to your system from anywhere in the world via the internet, without the need for port forwarding on your home network.

Advantages of a `Frigate self-hosted` solution

Deploying Frigate self-hosted on your own server (be it a local mini-PC or a cloud VPS) offers a number of undeniable advantages over commercial cloud services:

  • Data Privacy: All video streams and recordings are stored and processed exclusively on your server. No data is sent to third parties, eliminating the risk of leaks and unauthorized access to your personal information.
  • No Subscription Fees: After purchasing a VPS and setting up Frigate, you only pay for the server. There are no hidden fees for cloud storage or additional features, as is often the case with proprietary systems.
  • Full Control and Customization: You can configure Frigate to your unique needs, integrate it with other smart home systems (e.g., Home Assistant), use any number of cameras, and flexibly manage detection rules.
  • High Performance: Thanks to local processing and the ability to use hardware acceleration, Frigate provides minimal latency for event detection and instant access to the video archive.
  • Reliability: The system's operation does not depend on the stability of the internet connection to external cloud servers. With a backup internet channel on the VPS or an uninterruptible power supply, your surveillance system will work even if there are provider issues.

System requirements for effective `Frigate installation` on a VPS

For successful Frigate installation and stable operation on a VPS, it is crucial to choose the correct server configuration. Frigate is a fairly resource-intensive application, especially when processing multiple high-resolution video streams. The main components that determine performance are the processor (CPU), random access memory (RAM), disk space, and, ideally, a hardware accelerator.

Looking for a reliable server for your projects?

VPS from $10/month and dedicated servers from $9/month with NVMe, DDoS protection, and 24/7 support.

View offers →

Hardware selection: CPU, RAM, NVMe, and GPU acceleration

  • Processor (CPU): Frigate actively uses the CPU for decoding video streams and performing some detection tasks if no hardware accelerator is present.
    • For 1-2 1080p cameras (without TPU/GPU): Minimum 2 vCPU with a clock speed of 2.5 GHz or higher.
    • For 3-5 1080p cameras (without TPU/GPU): 4 vCPU at 3.0 GHz or higher is recommended.
    • When using Coral Edge TPU or NVIDIA GPU: The main detection load is shifted to the accelerator, so CPU requirements are reduced. However, the CPU is still needed for video decoding. In this case, 2 vCPU at 2.5 GHz will be sufficient even for 5-8 cameras.
    • Important: Frigate benefits from high-frequency cores, not just their quantity.
  • Random Access Memory (RAM): The amount of RAM depends on the number of cameras, their resolution, and the duration of buffered frames storage.
    • Minimum: 4 GB RAM. This is enough for 1-2 cameras with a small buffer.
    • Recommended: 8 GB RAM. Optimal for 3-5 cameras, ensures stability and headroom for other services.
    • For 5+ cameras or a long buffer: 16 GB RAM.
  • Disk Space (NVMe): Frigate constantly writes video streams (buffered frames, event recordings) to disk. Disk speed is critically important to prevent delays and frame loss.
    • Disk type: NVMe SSD is strongly recommended. Its high read/write speed significantly outperforms SATA SSDs and HDDs, which directly impacts Frigate's performance.
    • Volume: Depends on the number of cameras, resolution, and archive depth.
      • For 1-2 cameras (several days of archive): 50-100 GB NVMe.
      • For 3-5 cameras (one week of archive): 100-200 GB NVMe.
      • For 5+ cameras or a long archive: 200+ GB NVMe. Remember that one 1080p camera can generate 10-20 GB of video per day with continuous recording or buffer storage.
  • GPU Acceleration (Google Coral Edge TPU / NVIDIA GPU): This is the most important component for scaling Frigate. Without it, the CPU will perform all detection work, which severely limits the number of streams that can be processed.
    • Google Coral Edge TPU: Ideal for Frigate. One USB Coral (or PCIe) can process 200-400+ FPS (frames per second) for detection, which is sufficient for 10-20+ 1080p cameras (assuming each camera sends 5-10 FPS for detection). Unfortunately, Coral TPUs are rarely available in cloud VPS environments.
    • NVIDIA GPU: Some providers offer VPS with NVIDIA GPUs (e.g., Tesla T4, V100). This is an excellent alternative to Coral TPU, capable of processing even more FPS. NVIDIA GPU support in Frigate is implemented via Docker with GPU passthrough.
    • Attention: If the VPS does not offer a hardware accelerator, Frigate will use the CPU for detection. This will significantly increase CPU requirements and limit the number of cameras.

Step-by-step `Frigate Docker installation` on your server

The most convenient and recommended way to install Frigate Docker on a VPS is by using Docker and Docker Compose. This approach provides application isolation, simplifies dependency management, and facilitates updates.

Environment preparation and Docker Compose installation

Before proceeding with Frigate deployment, you need to prepare your VPS:

  1. Update the system: Always start by updating the package manager and installed packages.
  2. sudo apt update && sudo apt upgrade -y
  3. Install Docker: Follow the official instructions for your operating system. For Ubuntu/Debian, this usually looks like this:
  4. sudo apt install ca-certificates curl gnupg lsb-release -y
    sudo mkdir -p /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    echo \
      "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
      $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    sudo apt update
    sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y

    Add your user to the docker group to execute Docker commands without sudo (requires restarting the SSH session or system):

    sudo usermod -aG docker $USER
  5. Install Docker Compose (if not installed as a plugin): In newer Docker versions, Docker Compose usually comes as a docker-compose-plugin, which is installed along with Docker. If you are using an older version or prefer a separate binary, install it like this:
  6. sudo apt install docker-compose -y
  7. Create a directory for Frigate:
  8. mkdir -p ~/frigate
    cd ~/frigate

Deploying Frigate: creating configuration and launching containers

Now let's create the docker-compose.yml file and a basic Frigate configuration file.

  1. Create the docker-compose.yml file:
  2. nano docker-compose.yml

    Insert the following content. This example includes Frigate, Mosquitto (for MQTT, used by Frigate for events and Home Assistant), and Double-Take (optional, for advanced face/person detection).

    version: "3.9"
    services:
      frigate:
        container_name: frigate
        image: ghcr.io/blakeblackshear/frigate:stable
        privileged: true # May be required for access to hardware accelerators
        restart: unless-stopped
        shm_size: "256mb" # Increase if you see FFmpeg buffer issues
        ports:
          - "5000:5000" # Frigate web interface
          - "1935:1935" # RTMP for viewing
        volumes:
          - /etc/localtime:/etc/localtime:ro
          - ~/frigate/config:/config # Directory for Frigate configuration
          - ~/frigate/media:/media # Directory for recordings and snapshots
          - type: tmpfs # Use tmpfs for Frigate cache if there are disk write issues
            target: /tmp/cache
            tmpfs:
              size: 1000000000 # 1GB
        environment:
          - FRIGATE_RTSP_PASSWORD=YOUR_RTSP_PASSWORD # Replace with a strong password
        # If using Coral TPU (rare on VPS):
        # devices:
        #   - /dev/bus/usb:/dev/bus/usb
        # If using NVIDIA GPU (ensure nvidia-container-toolkit is installed):
        # runtime: nvidia
        # environment:
        #   - NVIDIA_VISIBLE_DEVICES=all
        #   - NVIDIA_DRIVER_CAPABILITIES=all
    
      mosquitto:
        container_name: mosquitto
        image: eclipse-mosquitto:latest
        restart: unless-stopped
        ports:
          - "1883:1883" # MQTT port
          - "9001:9001" # Websockets port (for MQTT)
        volumes:
          - ~/frigate/mosquitto/config:/mosquitto/config
          - ~/frigate/mosquitto/data:/mosquitto/data
          - ~/frigate/mosquitto/log:/mosquitto/log
    
      # Example optional service for integration with Frigate
      # double-take:
      #   container_name: double-take
      #   image: blakeblackshear/double-take:latest
      #   restart: unless-stopped
      #   ports:
      #     - "3000:3000" # Double-Take web interface
      #   volumes:
      #     - ~/frigate/double-take/config:/config
      #     - ~/frigate/media/frigate:/frigate/media # Access to Frigate media
      #   environment:
      #     - FRIGATE_MQTT_HOST=mosquitto
      #     - FRIGATE_MQTT_PORT=1883
      #     - FRIGATE_MQTT_USERNAME=YOUR_MQTT_USERNAME # If Mosquitto requires authentication
      #     - FRIGATE_MQTT_PASSWORD=YOUR_MQTT_PASSWORD # If Mosquitto requires authentication
      #     - TZ=Europe/Moscow # Your timezone
      #   depends_on:
      #     - frigate
      #     - mosquitto
    

    Save and close the file (Ctrl+O, Enter, Ctrl+X).

    Note on hardware accelerators: If your VPS supports NVIDIA GPU, you will need to install nvidia-container-toolkit on the VPS host system and uncomment the corresponding lines in docker-compose.yml. Coral TPU is extremely rare for cloud VPS.

  3. Create a basic Frigate configuration file (config.yml):
  4. mkdir ~/frigate/config
    nano ~/frigate/config/config.yml

    Insert the following minimal example. Replace rtsp://user:pass@ip:port/stream with the actual URLs of your cameras. For each camera, there is usually a main stream (high resolution for recording) and a sub-stream (low resolution for detection to reduce load).

    mqtt:
      host: mosquitto # Mosquitto service name in docker-compose
      topic_prefix: frigate # Prefix for all Frigate MQTT messages
      user: YOUR_MQTT_USERNAME # Optional, if Mosquitto requires authentication
      password: YOUR_MQTT_PASSWORD # Optional
    
    ffmpeg:
      hwaccel_args: # Hardware acceleration for video decoding (for CPU)
        - -hwaccel
        - vaapi # Or qsv, nvdec, v4l2m2m depending on your CPU/GPU
        - -hwaccel_device
        - /dev/dri/renderD128 # Or /dev/dri/renderD129, /dev/video0, etc.
      output_args:
        detect: -f rawvideo -pix_fmt yuv420p # Arguments for detection stream
        record: -f segment -segment_times 10 -segment_format mp4 -reset_timestamps 1 -strftime 1 -c copy # Arguments for recording
    
    detectors:
      cpu1: # Detector name
        type: cpu
    
    # If using Coral TPU (rare on VPS):
    # detectors:
    #   coral:
    #     type: edgetpu
    #     device: usb # Or pci
    
    cameras:
      front_door: # Your camera name
        ffmpeg:
          inputs:
            - path: rtsp://user:[email protected]:554/stream1 # Main stream (high resolution for recording)
              roles:
                - record
                - rtmp
            - path: rtsp://user:[email protected]:554/stream2 # Sub-stream (low resolution for detection)
              roles:
                - detect
        detect:
          enabled: True
          detector: cpu1 # Which detector to use
          width: 640 # Width of detection stream
          height: 480 # Height of detection stream
          fps: 5 # Frames per second for detection
        record:
          enabled: True
          retain:
            days: 7 # Keep recordings for 7 days
          events:
            pre_capture: 5 # Record 5 seconds before event
            post_capture: 5 # Record 5 seconds after event
        rtmp:
          enabled: True # Enable RTMP stream for viewing
        zones: # Optional detection zones
          porch:
            coordinates: 200,100,400,100,400,300,200,300
            objects:
              - person
        objects:
          track:
            - person
            - car
            - dog
          mask: # Optional mask to exclude areas from detection
            - 0,0,100,0,100,100,0,100 # Example mask
        snapshots:
          enabled: True
          timestamp: True
          bounding_box: True
          crop: True
          required_zones: []
          retain:
            default: 1
            objects:
              person: 7
        motion:
          mask: # Mask to exclude areas from motion detection
            - 0,0,100,0,100,100,0,100 # Example mask
    

    Save and close config.yml.

  5. Start Docker Compose containers:
  6. docker compose up -d

    The -d command starts the containers in the background. To view logs, use docker compose logs -f.

    After startup, Frigate will be available at http://YOUR_VPS_IP:5000. Make sure port 5000 is open in your VPS firewall.

    rocket_launch Quick pick

    Need a dedicated server?

    Compare prices from top providers. Configure and order in minutes.

    Browse dedicated servers arrow_forward

    Detailed Frigate configuration: from cameras to notifications

    The config.yml file is the heart of your Frigate system. Its correct configuration is critical for stable operation, detection accuracy, and efficient use of VPS resources.

    Fundamentals of the `config.yml` file and its optimization

    We've already covered the basic structure, but let's delve into important parameters:

    • mqtt: MQTT broker configuration. Frigate uses MQTT to publish all events (detection, snapshots, camera status), making it ideal for integration with other smart home systems like Home Assistant. Ensure that host points to your Mosquitto service (in our example, it's mosquitto).
    • ffmpeg: This is where FFmpeg, which Frigate uses for decoding video streams, is configured.
      • hwaccel_args: If your VPS provides hardware decoding acceleration (e.g., Intel Quick Sync Video - qsv, VA-API - vaapi, NVIDIA NVDEC - nvdec), be sure to use it! This will significantly reduce CPU load. Check your cloud provider's documentation or the processor type on your VPS to determine the supported accelerator. For example, for most Intel processors on a VPS, this will be vaapi.
      • output_args: Define how FFmpeg processes streams for detection and recording. It is important that the detection stream is low resolution (camera sub-stream) to minimize load.
    • detectors: Defines the detectors used. If you don't have a Coral TPU or NVIDIA GPU on your VPS, use type: cpu. If you have a hardware accelerator, configure it here.
    • cameras: The most extensive section, where each camera is configured.
      • ffmpeg.inputs: This is where the RTSP stream URLs of your camera are specified. It is highly recommended to use two streams: one main stream (record, rtmp) with high resolution for recording and viewing, and one sub-stream (detect) with low resolution (e.g., 640x480) for detection. This significantly reduces the load on the detector.
      • detect: Enable/disable detection, specify the detector, resolution, and FPS for detection.
      • record: Video recording settings. retain.days determines how many days to keep recordings. events.pre_capture and post_capture allow recording video before and after a detected event.
      • rtmp: Enabling the RTMP stream for viewing via Frigate.
      • zones and objects.mask: These parameters allow you to define specific areas in the video where detection should or should not occur. This is very useful for excluding false positives (e.g., from moving trees or roads).
      • snapshots: Configuration for saving snapshots when objects are detected.

    Integration with external systems: Home Assistant and MQTT

    One of Frigate's key advantages is its deep integration with Home Assistant via MQTT. Once Frigate and Mosquitto are running on your VPS, and Home Assistant is installed (perhaps on another VPS, see the article Home Assistant on VPS: installation, configuration, and maintenance), you can configure their interaction:

    1. Configure MQTT in Home Assistant: In Home Assistant, add the "MQTT" integration and specify the IP address of your Frigate VPS (or domain name if using a reverse proxy) and port 1883.
    2. Automatic discovery: Frigate automatically publishes its devices and sensors to Home Assistant via MQTT Discovery. After configuring MQTT in HA, you will see new entities for each camera (status, motion detection, snapshots, video streams).
    3. Automations: Use Frigate events (e.g., "person detected in front_door") to trigger automations in Home Assistant: turning on lights, sending notifications with an image, recording video, etc.

    Example YAML for Home Assistant (configuration.yaml) to display a Frigate stream (make sure the Frigate web interface is accessible):

    # Example for Home Assistant
    camera:
      - platform: frigate
        host: YOUR_FRIGATE_VPS_IP # Or domain name
        port: 5000 # Frigate port
        rtmp_port: 1935 # Frigate RTMP port
        # ssl: true # If Frigate is accessible via HTTPS
        # verify_ssl: true
        # client_id: home-assistant
        # topic_prefix: frigate # Must match frigate/config.yml
    
    # If you want to use MQTT directly (without discovery)
    # camera:
    #   - platform: mqtt
    #     name: "Front Door Frigate"
    #     topic: "frigate/front_door/snapshot" # Topic for snapshots
    #     encoding: "b64"
    #     qos: 0
    #     unique_id: frigate_front_door_snapshot
    

    Frigate can also send notifications directly via various integrations (Telegram, Discord, Gotify) using additional scripts or services, such as Netdata on VPS: installation, configuration, and maintenance.

    Securing access: Reverse Proxy (Nginx/Caddy) and HTTPS for `Frigate on server`

    Accessing the Frigate web interface via a direct IP address and port 5000 is insecure and inconvenient. To ensure secure access to Frigate on the server, especially if you want to use a domain name and HTTPS, you need to configure a Reverse Proxy using Nginx or Caddy.

    Configuring Nginx as a reverse proxy

    Nginx is a powerful and widely used web server that is excellent for the role of a reverse proxy. It allows you to direct requests from your domain name to the internal Frigate port and easily integrate Let's Encrypt for HTTPS.

    1. Install Nginx:
    2. sudo apt update
      sudo apt install nginx -y
    3. Obtain an SSL certificate from Let's Encrypt: It is recommended to use Certbot.
    4. sudo apt install certbot python3-certbot-nginx -y
      sudo certbot --nginx -d your_domain.com -d www.your_domain.com

      Follow the Certbot instructions. It will automatically configure Nginx for HTTPS.

    5. Create or edit the Nginx configuration file for Frigate:
    6. sudo nano /etc/nginx/sites-available/frigate.conf

      Insert the following content, replacing your_domain.com with your actual domain:

      server {
          listen 80;
          listen [::]:80;
          server_name your_domain.com www.your_domain.com;
          return 301 https://$host$request_uri;
      }
      
      server {
          listen 443 ssl http2;
          listen [::]:443 ssl http2;
          server_name your_domain.com www.your_domain.com;
      
          ssl_certificate /etc/letsencrypt/live/your_domain.com/fullchain.pem; # Path to your certificate
          ssl_certificate_key /etc/letsencrypt/live/your_domain.com/privkey.pem; # Path to your private key
          ssl_trusted_certificate /etc/letsencrypt/live/your_domain.com/chain.pem;
      
          include /etc/letsencrypt/options-ssl-nginx.conf;
          ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # Created by Certbot
      
          client_max_body_size 0; # For uploading large files, if necessary
      
          location / {
              proxy_pass http://127.0.0.1:5000; # Frigate listens on port 5000
              proxy_set_header Host $host;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Proto $scheme;
              proxy_read_timeout 900s; # Increase timeout for long connections (video streams)
              proxy_send_timeout 900s;
              proxy_connect_timeout 900s;
              proxy_buffering off; # Disable buffering for streaming video
          }
      
          location /ws { # For Frigate WebSocket connections
              proxy_pass http://127.0.0.1:5000;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection "upgrade";
              proxy_set_header Host $host;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Proto $scheme;
          }
      
          location /api/ws { # If Frigate uses /api/ws for WebSocket
              proxy_pass http://127.0.0.1:5000;
              proxy_http_version 1.1;
              proxy_set_header Upgrade $http_upgrade;
              proxy_set_header Connection "upgrade";
              proxy_set_header Host $host;
              proxy_set_header X-Real-IP $remote_addr;
              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
              proxy_set_header X-Forwarded-Proto $scheme;
          }
      
          # For RTMP streams (if you want to proxy them through Nginx)
          # This would require the Nginx RTMP module, which complicates installation.
          # It's simpler to use direct access to RTMP port 1935 or the Frigate web interface.
      }
    7. Activate the configuration and reload Nginx:
    8. sudo ln -s /etc/nginx/sites-available/frigate.conf /etc/nginx/sites-enabled/
      sudo nginx -t # Check syntax
      sudo systemctl reload nginx

    Now Frigate will be accessible at https://your_domain.com.

    Using Caddy for simplified configuration

    Caddy is a modern web server with automatic HTTPS support (via Let's Encrypt) out of the box. It is significantly simpler to configure than Nginx for many scenarios.

    1. Install Caddy: Follow the official instructions for your OS. For Debian/Ubuntu:
    2. sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
      curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
      curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
      sudo apt update
      sudo apt install caddy -y
    3. Create or edit the Caddyfile:
    4. sudo nano /etc/caddy/Caddyfile

      Insert the following content, replacing your_domain.com with your actual domain:

      your_domain.com {
          reverse_proxy 127.0.0.1:5000 {
              header_up Host {host}
              header_up X-Real-IP {remote_ip}
              header_up X-Forwarded-For {remote_ip}
              header_up X-Forwarded-Proto {scheme}
              # Increase timeouts for streaming video
              transport http {
                  read_timeout 15m
                  write_timeout 15m
                  idle_timeout 15m
              }
              # Disable buffering for WebSocket
              websocket
          }
      }
    5. Reload Caddy:
    6. sudo systemctl reload caddy

    Caddy will automatically obtain and renew SSL certificates. Frigate will be accessible at https://your_domain.com.

    Maintaining `Frigate VPS`: backups, updates, and monitoring

    Regular maintenance of your Frigate VPS is key to its long-term stability and security. This includes data backup, timely updates, and performance monitoring.

    Frigate data backup strategies

    Your video recordings, snapshots, and, most importantly, Frigate configuration are valuable data that need to be backed up regularly. Use the following strategy:

    1. Configuration backup: The ~/frigate/config/config.yml file and all related files (e.g., motion_masks.json) should be backed up. This can be done manually or automated.
    2. Database backup: Frigate uses an SQLite database (frigate.db) to store metadata about events and recordings. It is located in the ~/frigate/media directory. It is recommended to back it up along with the config.
    3. Media file backup: The ~/frigate/media directory contains all your video recordings and snapshots. This can be a very large amount of data, so full daily backups may not be practical.
      • Strategy: Back up only important events (e.g., object snapshots) and configuration daily. A full backup of the video archive can be done less frequently or using incremental backups.
      • Tools: Use tools like Restic on VPS for efficient, deduplicated, and encrypted backups to remote storage (S3, Backblaze B2).

    Example script for backing up configuration and database (can be added to cron):

    #!/bin/bash
    BACKUP_DIR="/root/frigate_backups"
    FRIGATE_CONFIG_PATH="/root/frigate/config"
    FRIGATE_MEDIA_PATH="/root/frigate/media" # For the frigate.db database
    
    mkdir -p $BACKUP_DIR
    TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
    BACKUP_FILE="$BACKUP_DIR/frigate_config_db_$TIMESTAMP.tar.gz"
    
    # Stop Frigate during database backup to avoid corruption
    # docker compose stop frigate
    
    # Create an archive of the configuration and database
    tar -czf $BACKUP_FILE -C $FRIGATE_CONFIG_PATH . -C $FRIGATE_MEDIA_PATH frigate.db
    
    # docker compose start frigate
    
    # Delete old backups (e.g., older than 7 days)
    find $BACKUP_DIR -name "frigate_config_db_*.tar.gz" -type f -mtime +7 -delete
    
    echo "Frigate config and DB backup created: $BACKUP_FILE"

    Frigate Docker container update procedure

    Keeping Frigate up to date is important for new features, bug fixes, and security updates. Thanks to Docker Compose, the update process is very simple:

    1. Navigate to the Frigate directory:
    2. cd ~/frigate
    3. Stop current containers:
    4. docker compose down
    5. Download new images:
    6. docker compose pull
    7. Start updated containers:
    8. docker compose up -d

    It is always recommended to check the official Frigate release notes before updating, as changes to config.yml may sometimes be required.

    rocket_launch Quick pick

    Need a dedicated server?

    Compare prices from top providers. Configure and order in minutes.

    Browse dedicated servers arrow_forward

    Which `VPS config` for real load: Valebyte.com recommendations

    Choosing the right VPS config for Frigate is a balance between cost and performance. At Valebyte.com, we offer flexible plans that can be adapted to your needs. Below is a table with recommendations based on the number of cameras and the availability of hardware acceleration.

    Table: Optimal VPS configurations for various Frigate scenarios

    In this table, we assume the use of an NVMe disk and a stable internet connection on the VPS.

    Usage Scenario Number of Cameras (1080p) vCPU (GHz) RAM (GB) NVMe Disk (GB) Hardware Acceleration Estimated VPS Cost (USD/month)
    Basic home/office monitoring 1-2 2 @ 2.5+ 4 100 CPU (FFmpeg hwaccel) $5 - $10
    Extended monitoring 3-5 4 @ 3.0+ 8 200 CPU (FFmpeg hwaccel) $10 - $20
    Professional monitoring (CPU-intensive) 6-8 6-8 @ 3.0+ 16 300+ CPU (FFmpeg hwaccel) $20 - $40
    High-performance (with GPU acceleration) 5-10+ 4 @ 2.5+ 8-16 200+ NVIDIA GPU (Tesla T4) From $50 (depends on GPU)
    Archival storage (optional) Any +0 +0 500+ (HDD/SSD) N/A +$5 - +$15 (depends on volume)

    Valebyte.com Recommendations:

    1. Start small: If you are new, start with a plan with 2 vCPU, 4 GB RAM, and 100 GB NVMe. This is sufficient for testing and 1-2 cameras.
    2. Prioritize NVMe: Always choose plans with NVMe disks. This is one of the most critical requirements for Frigate.
    3. High-frequency processor: For CPU-based detection, Frigate responds better to high-frequency cores, even if there are fewer of them, than to a large number of low-frequency cores.
    4. Hardware acceleration: If your provider offers VPS with Intel processors, VA-API or QSV for FFmpeg hardware decoding is likely available. Be sure to use it. If NVIDIA GPUs are available, this is the ideal choice for scaling detection.
    5. Scalability: Choose a provider that allows you to easily scale VPS resources (CPU, RAM, Disk) without reinstalling the system. Valebyte.com offers such flexibility.
    6. Monitoring: Install monitoring tools such as Netdata to track CPU, RAM, and disk usage, identify bottlenecks, and respond promptly.

    Remember that requirements may vary depending on specific camera models, video stream bitrates, and scene complexity. Always test and optimize the configuration for your needs.

    Conclusion

    Installing Frigate on a VPS from Valebyte.com provides a reliable, private, and high-performance platform for video surveillance with object detection. Choose plans with NVMe disks and a sufficient number of high-frequency CPU cores, and if possible, with GPU hardware acceleration, to ensure maximum efficiency and scalability of your system.

    Ready to choose a server?

    VPS and dedicated servers in 72+ countries with instant activation and full root access.

    Start now →
support_agent
Valebyte Support
Usually replies within minutes
Hi there!
Send us a message and we'll reply as soon as possible.