-
Generic Hardware Acceleration
+
Generic Hardware Devices
{deviceId !== "stable" && (
Some options have been auto-configured based on your device type.
From 39f94919719ad2b264538cfb248f8edca821e865 Mon Sep 17 00:00:00 2001
From: GuoQing Liu <842607283@qq.com>
Date: Wed, 29 Apr 2026 04:23:56 +0800
Subject: [PATCH 07/10] Remove port 5000 configuration for security reasons
Removed unauthenticated Web UI port 5000 from configuration due to security risks.
---
.../DockerComposeGenerator/config/config.yaml | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/docs/src/components/DockerComposeGenerator/config/config.yaml b/docs/src/components/DockerComposeGenerator/config/config.yaml
index 5711f66ec..09b538281 100644
--- a/docs/src/components/DockerComposeGenerator/config/config.yaml
+++ b/docs/src/components/DockerComposeGenerator/config/config.yaml
@@ -267,18 +267,6 @@ ports:
defaultEnabled: true
locked: true
- - id: "5000"
- host: 5000
- container: 5000
- protocol: "tcp"
- description: "Unauthenticated Web UI port (not recommended)"
- defaultEnabled: false
- requiresConfirmation: true
- warningType: "danger"
- warningContent: "Exposing port 5000 allows **unauthenticated access** to your Frigate instance. Anyone on your network (or the internet if you have a public IP) could access it without any credentials. This may lead to **unauthorized access**, **privacy leaks**, or further attacks. Ensure you have proper firewall rules or VPN in place before enabling this."
- confirmationLabel: "I understand the risk and confirm enabling port 5000"
- cooldownSeconds: 10
-
- id: "8554"
host: 8554
container: 8554
@@ -305,4 +293,4 @@ ports:
container: 1984
protocol: "tcp"
description: "Go2RTC Web UIport"
- defaultEnabled: false
\ No newline at end of file
+ defaultEnabled: false
From 6cc4db1103f03634ddf13fba4e82b4a458673fea Mon Sep 17 00:00:00 2001
From: ZhaiSoul <842607283@qq.com>
Date: Wed, 29 Apr 2026 14:13:32 +0800
Subject: [PATCH 08/10] docs: remove 5000 port tips
---
.../DockerComposeGenerator.tsx | 6 +-
.../components/PortConfig.tsx | 122 +++++-------------
.../DockerComposeGenerator/config/config.yaml | 3 +-
.../DockerComposeGenerator/config/types.ts | 8 +-
.../hooks/useConfigGenerator.ts | 16 +--
.../hooks/useCooldown.ts | 42 ------
6 files changed, 44 insertions(+), 153 deletions(-)
delete mode 100644 docs/src/components/DockerComposeGenerator/hooks/useCooldown.ts
diff --git a/docs/src/components/DockerComposeGenerator/DockerComposeGenerator.tsx b/docs/src/components/DockerComposeGenerator/DockerComposeGenerator.tsx
index 0779f4249..b8a8a8fc8 100644
--- a/docs/src/components/DockerComposeGenerator/DockerComposeGenerator.tsx
+++ b/docs/src/components/DockerComposeGenerator/DockerComposeGenerator.tsx
@@ -32,12 +32,12 @@ function renderHelpText(text: string): React.ReactNode {
export default function DockerComposeGenerator() {
const {
deviceId, device, hardwareEnabled,
- portEnabled, port5000Confirmed,
+ portEnabled,
nvidiaGpuCount, nvidiaGpuDeviceId,
configPath, mediaPath, rtspPassword, timezone, shmSize,
shmSizeError, gpuDeviceIdError, configPathError, mediaPathError,
hasAnyHardware, generatedYaml,
- selectDevice, toggleHardware, togglePort, setPort5000Confirmed,
+ selectDevice, toggleHardware, togglePort,
handleShmSizeChange, handleConfigPathChange, handleMediaPathChange,
handleNvidiaGpuCountChange, handleNvidiaGpuDeviceIdChange,
setRtspPassword, setTimezone, isHardwareDisabled,
@@ -82,9 +82,7 @@ export default function DockerComposeGenerator() {
;
- port5000Confirmed: boolean;
onTogglePort: (portId: string) => void;
- onConfirm5000: (confirmed: boolean) => void;
}
-function Port5000Confirmation({
- portEnabled,
- confirmed,
+function PortItem({
+ port,
+ enabled,
onToggle,
- onConfirm,
}: {
- portEnabled: boolean;
- confirmed: boolean;
+ port: typeof ports[number];
+ enabled: boolean;
onToggle: () => void;
- onConfirm: (confirmed: boolean) => void;
}) {
- const { remaining, start, stop } = useCooldown(10);
-
- React.useEffect(() => {
- if (portEnabled) {
- start();
- } else {
- stop();
- onConfirm(false);
- }
- return stop;
- }, [portEnabled]);
+ const showWarning = port.warningContent && (
+ port.warningWhen === "checked" ? enabled :
+ port.warningWhen === "unchecked" ? !enabled : enabled
+ );
return (
-
- {portEnabled && (
-
-
- Exposing port 5000 allows unauthenticated access to
- your Frigate instance. Anyone on your network (or the internet if you
- have a public IP) could access it without credentials.
-
-
- This may lead to unauthorized access ,{" "}
- privacy leaks , or further attacks. Ensure you have
- proper firewall rules or VPN in place.
-
- 0 ? styles.checkboxDisabled : ""}`}
- >
- onConfirm(e.target.checked)}
- disabled={remaining > 0}
- />
-
- I understand the risk and confirm enabling port 5000
- {remaining > 0 && ` (${remaining}s)`}
-
-
-
- )}
-
+
+
- Port 5000 (unauthenticated access)
- ⚠️ Expose carefully
+
+ {port.locked && "🔒 "}
+ Port {port.host}
+ {port.protocol !== "tcp" && `/${port.protocol}`}
+
+ {port.description && (
+
{port.description}
+ )}
+ {showWarning && (
+
+ {port.warningContent}
+
+ )}
);
}
export default function PortConfigSection({
portEnabled,
- port5000Confirmed,
onTogglePort,
- onConfirm5000,
}: Props) {
return (
Port Configuration
-
- {/* All ports except 5000 */}
- {ports
- .filter((p) => p.id !== "5000")
- .map((port) => (
-
-
- onTogglePort(port.id)}
- disabled={port.locked}
- />
-
- {port.locked && "🔒 "}
- Port {port.host}
- {port.protocol !== "tcp" && `/${port.protocol}`}
-
-
- {port.description && (
-
{port.description}
- )}
-
- ))}
+ {ports.map((port) => (
+
onTogglePort(port.id)}
+ />
+ ))}
-
- {/* Port 5000 with special warning — placed last */}
-
onTogglePort("5000")}
- onConfirm={onConfirm5000}
- />
);
}
diff --git a/docs/src/components/DockerComposeGenerator/config/config.yaml b/docs/src/components/DockerComposeGenerator/config/config.yaml
index 09b538281..22734a1bf 100644
--- a/docs/src/components/DockerComposeGenerator/config/config.yaml
+++ b/docs/src/components/DockerComposeGenerator/config/config.yaml
@@ -265,7 +265,8 @@ ports:
protocol: "tcp"
description: "Authenticated UI and API access (default HTTPS)"
defaultEnabled: true
- locked: true
+ warningContent: "This is the access port for Frigate. Closing it means you will no longer be able to access the instance."
+ warningWhen: "unchecked"
- id: "8554"
host: 8554
diff --git a/docs/src/components/DockerComposeGenerator/config/types.ts b/docs/src/components/DockerComposeGenerator/config/types.ts
index 6d9b048f0..87bcb608d 100644
--- a/docs/src/components/DockerComposeGenerator/config/types.ts
+++ b/docs/src/components/DockerComposeGenerator/config/types.ts
@@ -145,14 +145,10 @@ export interface PortConfig {
defaultEnabled: boolean;
/** Whether this port is locked (always enabled, cannot be toggled off) */
locked?: boolean;
- /** Whether this port requires a confirmation step before enabling */
- requiresConfirmation?: boolean;
/** Admonition type for the warning */
warningType?: "warning" | "danger";
/** Warning content (markdown) */
warningContent?: string;
- /** Confirmation checkbox label */
- confirmationLabel?: string;
- /** Cooldown in seconds before the confirmation checkbox becomes available */
- cooldownSeconds?: number;
+ /** When to show the warning: when the port is checked or unchecked */
+ warningWhen?: "checked" | "unchecked";
}
diff --git a/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts b/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts
index 994ac631a..72821be26 100644
--- a/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts
+++ b/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts
@@ -29,7 +29,6 @@ export function useConfigGenerator() {
return initial;
});
- const [port5000Confirmed, setPort5000Confirmed] = useState(false);
const [nvidiaGpuCount, setNvidiaGpuCount] = useState("all");
const [nvidiaGpuDeviceId, setNvidiaGpuDeviceId] = useState("");
const [configPath, setConfigPath] = useState("");
@@ -69,13 +68,7 @@ export function useConfigGenerator() {
const togglePort = useCallback((portId: string) => {
const port = portMap.get(portId);
if (port?.locked) return;
- setPortEnabled((prev) => {
- const next = { ...prev, [portId]: !prev[portId] };
- if (portId === "5000" && !next[portId]) {
- setPort5000Confirmed(false);
- }
- return next;
- });
+ setPortEnabled((prev) => ({ ...prev, [portId]: !prev[portId] }));
}, []);
const isHardwareDisabled = useCallback(
@@ -149,7 +142,6 @@ export function useConfigGenerator() {
const lines: string[] = [];
for (const [id, enabled] of Object.entries(portEnabled)) {
if (!enabled) continue;
- if (id === "5000" && !port5000Confirmed) continue;
const p = portMap.get(id);
if (!p) continue;
const proto = p.protocol && p.protocol !== "tcp" ? `/${p.protocol}` : "";
@@ -157,7 +149,7 @@ export function useConfigGenerator() {
lines.push(` - "${p.host}:${p.container}${proto}"${comment}`);
}
return lines;
- }, [portEnabled, port5000Confirmed]);
+ }, [portEnabled]);
const selectedHardwareIds = useMemo(() => {
return Object.entries(hardwareEnabled)
@@ -195,11 +187,11 @@ export function useConfigGenerator() {
return {
deviceId, device, hardwareEnabled, portEnabled,
- port5000Confirmed, nvidiaGpuCount, nvidiaGpuDeviceId,
+ nvidiaGpuCount, nvidiaGpuDeviceId,
configPath, mediaPath, rtspPassword, timezone, shmSize,
shmSizeError, gpuDeviceIdError, configPathError, mediaPathError,
hasAnyHardware, generatedYaml,
- selectDevice, toggleHardware, togglePort, setPort5000Confirmed,
+ selectDevice, toggleHardware, togglePort,
handleShmSizeChange, handleConfigPathChange, handleMediaPathChange,
handleNvidiaGpuCountChange, handleNvidiaGpuDeviceIdChange,
setRtspPassword, setTimezone, isHardwareDisabled,
diff --git a/docs/src/components/DockerComposeGenerator/hooks/useCooldown.ts b/docs/src/components/DockerComposeGenerator/hooks/useCooldown.ts
deleted file mode 100644
index 253edca87..000000000
--- a/docs/src/components/DockerComposeGenerator/hooks/useCooldown.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import { useState, useEffect, useCallback, useRef } from "react";
-
-/**
- * Hook for a countdown timer (e.g. cooldown before confirming port 5000).
- */
-export function useCooldown(initialSeconds: number) {
- const [remaining, setRemaining] = useState(0);
- const timerRef = useRef | null>(null);
-
- const start = useCallback(() => {
- // Clear any existing timer
- if (timerRef.current) clearInterval(timerRef.current);
- setRemaining(initialSeconds);
- timerRef.current = setInterval(() => {
- setRemaining((prev) => {
- if (prev <= 1) {
- if (timerRef.current) clearInterval(timerRef.current);
- timerRef.current = null;
- return 0;
- }
- return prev - 1;
- });
- }, 1000);
- }, [initialSeconds]);
-
- const stop = useCallback(() => {
- if (timerRef.current) {
- clearInterval(timerRef.current);
- timerRef.current = null;
- }
- setRemaining(0);
- }, []);
-
- // Cleanup on unmount
- useEffect(() => {
- return () => {
- if (timerRef.current) clearInterval(timerRef.current);
- };
- }, []);
-
- return { remaining, start, stop };
-}
From 4b421c66a5a145320c601e20ad4957a515a4dc7f Mon Sep 17 00:00:00 2001
From: ZhaiSoul <842607283@qq.com>
Date: Wed, 29 Apr 2026 14:42:29 +0800
Subject: [PATCH 09/10] docs: improve NVIDIA GPU count input
---
.../components/NvidiaGpuConfig.tsx | 13 ++++++------
.../DockerComposeGenerator/generator/index.ts | 2 +-
.../hooks/useConfigGenerator.ts | 20 +++++++++----------
3 files changed, 17 insertions(+), 18 deletions(-)
diff --git a/docs/src/components/DockerComposeGenerator/components/NvidiaGpuConfig.tsx b/docs/src/components/DockerComposeGenerator/components/NvidiaGpuConfig.tsx
index 5863ac386..9c9be5e6a 100644
--- a/docs/src/components/DockerComposeGenerator/components/NvidiaGpuConfig.tsx
+++ b/docs/src/components/DockerComposeGenerator/components/NvidiaGpuConfig.tsx
@@ -16,6 +16,8 @@ export default function NvidiaGpuConfig({
onGpuCountChange,
onGpuDeviceIdChange,
}: Props) {
+ const showDeviceId = gpuCount !== "";
+
return (
@@ -25,16 +27,15 @@ export default function NvidiaGpuConfig({
onGpuCountChange(e.target.value)}
+ placeholder="all"
+ onChange={(e) => onGpuCountChange(e.target.value.replace(/\D/g, ""))}
/>
-
- Enter a number (e.g. 1, 2, 3) or "all" to use all GPUs
-
- {gpuCount !== "all" && (
+ {showDeviceId && (
GPU device IDs (required, comma-separated):
diff --git a/docs/src/components/DockerComposeGenerator/generator/index.ts b/docs/src/components/DockerComposeGenerator/generator/index.ts
index 24b8ab263..589d9b0b6 100644
--- a/docs/src/components/DockerComposeGenerator/generator/index.ts
+++ b/docs/src/components/DockerComposeGenerator/generator/index.ts
@@ -123,7 +123,7 @@ function buildEnvironment(
function buildDeploy(device: DeviceConfig, input: GeneratorInput): string[] {
if (device.id === "stable-tensorrt") {
const count = input.nvidiaGpuCount || "all";
- const isAll = count.toLowerCase() === "all";
+ const isAll = count === "all";
const deviceId = input.nvidiaGpuDeviceId?.trim();
if (isAll) {
diff --git a/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts b/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts
index 72821be26..394790b27 100644
--- a/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts
+++ b/docs/src/components/DockerComposeGenerator/hooks/useConfigGenerator.ts
@@ -29,7 +29,7 @@ export function useConfigGenerator() {
return initial;
});
- const [nvidiaGpuCount, setNvidiaGpuCount] = useState("all");
+ const [nvidiaGpuCount, setNvidiaGpuCount] = useState("");
const [nvidiaGpuDeviceId, setNvidiaGpuDeviceId] = useState("");
const [configPath, setConfigPath] = useState("");
const [mediaPath, setMediaPath] = useState("");
@@ -56,7 +56,7 @@ export function useConfigGenerator() {
}
return next;
});
- setNvidiaGpuCount("all");
+ setNvidiaGpuCount("");
setNvidiaGpuDeviceId("");
setGpuDeviceIdError(false);
}, []);
@@ -121,15 +121,13 @@ export function useConfigGenerator() {
);
const handleNvidiaGpuCountChange = useCallback((value: string) => {
- const lower = value.trim().toLowerCase();
- if (lower === "all" || lower === "" || /^[0-9]+$/.test(lower)) {
- setNvidiaGpuCount(lower || "all");
- if (lower === "all") {
- setNvidiaGpuDeviceId("");
- setGpuDeviceIdError(false);
- } else if (/^[0-9]+$/.test(lower)) {
- setGpuDeviceIdError(false);
- }
+ // Only allow digits
+ setNvidiaGpuCount(value);
+ if (value === "") {
+ setNvidiaGpuDeviceId("");
+ setGpuDeviceIdError(false);
+ } else {
+ setGpuDeviceIdError(false);
}
}, []);
From 46a5eb4647e37e78fc4a3487d7af4c3baf9f58e9 Mon Sep 17 00:00:00 2001
From: ZhaiSoul <842607283@qq.com>
Date: Wed, 29 Apr 2026 14:42:48 +0800
Subject: [PATCH 10/10] docs: add docker compose tabs
---
docs/docs/frigate/installation.md | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/docs/docs/frigate/installation.md b/docs/docs/frigate/installation.md
index 1fc604c31..72e53e3bc 100644
--- a/docs/docs/frigate/installation.md
+++ b/docs/docs/frigate/installation.md
@@ -5,7 +5,8 @@ title: Installation
import ShmCalculator from '@site/src/components/ShmCalculator'
import DockerComposeGenerator from '@site/src/components/DockerComposeGenerator'
-
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
Frigate is a Docker container that can be run on any Docker host including as a [Home Assistant App](https://www.home-assistant.io/apps/). Note that the Home Assistant App is **not** the same thing as the integration. The [integration](/integrations/home-assistant) is required to integrate Frigate into Home Assistant, whether you are running Frigate as a standalone Docker container or as a Home Assistant App.
@@ -73,13 +74,6 @@ Users of the Snapcraft build of Docker cannot use storage locations outside your
:::
-### Docker Compose Generator
-
-Generate a Frigate Docker Compose configuration based on your hardware and requirements.
-
-
-
-
### Calculating required shm-size
Frigate utilizes shared memory to store frames during processing. The default `shm-size` provided by Docker is **64MB**.
@@ -477,6 +471,16 @@ Finally, configure [hardware object detection](/configuration/object_detectors#a
Running through Docker with Docker Compose is the recommended install method.
+
+
+
+Generate a Frigate Docker Compose configuration based on your hardware and requirements.
+
+
+
+
+
+
```yaml
services:
frigate:
@@ -510,6 +514,10 @@ services:
environment:
FRIGATE_RTSP_PASSWORD: "password"
```
+
+
+
+**Docker CLI**
If you can't use Docker Compose, you can run the container with something similar to this: