diff --git a/k-tv-frontend/app/(main)/docs/page.tsx b/k-tv-frontend/app/(main)/docs/page.tsx
index 0dccd45..30071b5 100644
--- a/k-tv-frontend/app/(main)/docs/page.tsx
+++ b/k-tv-frontend/app/(main)/docs/page.tsx
@@ -121,13 +121,17 @@ const TOC = [
{ id: "requirements", label: "Requirements" },
{ id: "backend-setup", label: "Backend setup" },
{ id: "frontend-setup", label: "Frontend setup" },
+ { id: "docker", label: "Docker deployment" },
{ id: "jellyfin", label: "Connecting Jellyfin" },
+ { id: "local-files", label: "Local files" },
{ id: "first-channel", label: "Your first channel" },
{ id: "blocks", label: "Programming blocks" },
{ id: "filters", label: "Filters reference" },
{ id: "strategies", label: "Fill strategies" },
{ id: "recycle-policy", label: "Recycle policy" },
{ id: "import-export", label: "Import & export" },
+ { id: "iptv", label: "IPTV export" },
+ { id: "channel-password", label: "Channel passwords" },
{ id: "tv-page", label: "Watching TV" },
{ id: "troubleshooting", label: "Troubleshooting" },
];
@@ -359,6 +363,77 @@ npm run dev`}
+ {/* ---------------------------------------------------------------- */}
+
+ The recommended way to run K-TV in production is with Docker Compose.
+ The repository ships a
+
+ If you use the provided
+
+ Merge Docker deployment
+ compose.yml that runs the backend
+ and frontend as separate containers, and an optional{" "}
+ compose.traefik.yml overlay for HTTPS via Traefik.
+ Minimal compose.yml
+ {`services:
+ backend:
+ image: registry.example.com/k-tv-backend:latest
+ environment:
+ HOST: 0.0.0.0
+ DATABASE_URL: sqlite:/app/data/k-tv.db?mode=rwc
+ CORS_ALLOWED_ORIGINS: https://tv.example.com
+ JWT_SECRET:
+
+ Build-time vs runtime env vars
+ NEXT_PUBLIC_API_URL is embedded into the frontend bundle
+ at build time. It must be passed as a{" "}
+ --build-arg when building the image:
+ {`docker build \\
+ --build-arg NEXT_PUBLIC_API_URL=https://tv-api.example.com/api/v1 \\
+ -t registry.example.com/k-tv-frontend:latest .`}
+ compose.yml, set{" "}
+ NEXT_PUBLIC_API_URL under build.args so it
+ is picked up automatically on every build.
+ API_URL (server-side only — used by Next.js API routes)
+ is set at runtime via the container environment and can reference the
+ backend by its internal Docker hostname:{" "}
+ http://backend:3000/api/v1. It is never baked into the
+ image.
+ HTTPS with Traefik
+ compose.traefik.yml over the base file to add
+ Traefik labels for automatic TLS certificates and routing:
+ {`docker compose -f compose.yml -f compose.traefik.yml up -d`}
+ SECURE_COOKIE=true and{" "}
+ PRODUCTION=true whenever the backend is behind HTTPS.
+ The default cookie secret is publicly known — always replace it
+ before going live.
+ Connecting Jellyfin
@@ -419,6 +494,66 @@ npm run dev`}
+ In addition to Jellyfin, K-TV can serve content directly from a + local directory. This is useful when you want to schedule video files + without running a separate media server. +
+ +
+ Build the backend with the local-files Cargo feature
+ and set the LOCAL_FILES_DIR environment variable to the
+ root of your video library:
+
{`cargo run --features local-files
+
+# .env
+LOCAL_FILES_DIR=/media/videos`}
+
+ On startup the backend indexes all video files under{" "}
+ LOCAL_FILES_DIR. Duration is detected via{" "}
+ ffprobe (must be
+ installed and on PATH). Tags are derived from ancestor
+ directory names; the top-level subdirectory acts as the collection
+ ID.
+
+ When you add or remove files, trigger a rescan from the Dashboard + (the Rescan library{" "} + button appears when the local files provider is active) or call the + API directly: +
+{`POST /api/v1/files/rescan
+Authorization: Bearer
+
+# Response
+{ "items_found": 142 }`}
+
+
+ Local file streams are served by{" "}
+ GET /api/v1/files/stream/:id. This endpoint is{" "}
+ public (no auth required)
+ and supports Range headers for seeking. The frontend
+ player uses the native <video> element for local
+ files instead of hls.js.
+
+ K-TV can export your channels as a standard IPTV playlist so you can + watch in any IPTV client — TiviMate, VLC, Infuse, Jellyfin, and + others. +
+ ++ Open the Dashboard and click the antenna icon on any channel card to + open the IPTV Export dialog. It shows two URLs: +
+