From ddbc4449f77b75f7c5a36229bca730c0eb5acd72 Mon Sep 17 00:00:00 2001 From: okxlin <61420215+okxlin@users.noreply.github.com> Date: Sun, 19 Jul 2026 09:09:40 +0800 Subject: [PATCH] feat(apps): add LiveKit Package LiveKit v1.13.4 and latest for 1Panel v2. Validated both versions on isolated moelin/1panel:v2 targets with lifecycle cleanup and authenticated LiveKit API/WebRTC smoke checks. --- apps/livekit/1.13.4/.env.sample | 7 ++ apps/livekit/1.13.4/data.yml | 108 +++++++++++++++++++++++ apps/livekit/1.13.4/docker-compose.yml | 31 +++++++ apps/livekit/1.13.4/scripts/init.sh | 3 + apps/livekit/1.13.4/scripts/uninstall.sh | 2 + apps/livekit/1.13.4/scripts/upgrade.sh | 3 + apps/livekit/README.md | 61 +++++++++++++ apps/livekit/data.yml | 30 +++++++ apps/livekit/latest/.env.sample | 7 ++ apps/livekit/latest/data.yml | 108 +++++++++++++++++++++++ apps/livekit/latest/docker-compose.yml | 31 +++++++ apps/livekit/latest/scripts/init.sh | 3 + apps/livekit/latest/scripts/uninstall.sh | 2 + apps/livekit/latest/scripts/upgrade.sh | 3 + apps/livekit/logo.png | Bin 0 -> 242 bytes 15 files changed, 399 insertions(+) create mode 100644 apps/livekit/1.13.4/.env.sample create mode 100644 apps/livekit/1.13.4/data.yml create mode 100644 apps/livekit/1.13.4/docker-compose.yml create mode 100755 apps/livekit/1.13.4/scripts/init.sh create mode 100755 apps/livekit/1.13.4/scripts/uninstall.sh create mode 100755 apps/livekit/1.13.4/scripts/upgrade.sh create mode 100644 apps/livekit/README.md create mode 100644 apps/livekit/data.yml create mode 100644 apps/livekit/latest/.env.sample create mode 100644 apps/livekit/latest/data.yml create mode 100644 apps/livekit/latest/docker-compose.yml create mode 100755 apps/livekit/latest/scripts/init.sh create mode 100755 apps/livekit/latest/scripts/uninstall.sh create mode 100755 apps/livekit/latest/scripts/upgrade.sh create mode 100644 apps/livekit/logo.png diff --git a/apps/livekit/1.13.4/.env.sample b/apps/livekit/1.13.4/.env.sample new file mode 100644 index 000000000..863805f61 --- /dev/null +++ b/apps/livekit/1.13.4/.env.sample @@ -0,0 +1,7 @@ +PANEL_APP_PORT_HTTP=7880 +PANEL_APP_PORT_RTC_TCP=7881 +PANEL_APP_PORT_RTC_UDP=7882 +LIVEKIT_API_KEY=livekit_api_key +LIVEKIT_API_SECRET=replace-with-a-long-random-secret +LIVEKIT_USE_EXTERNAL_IP=true +CONTAINER_NAME= diff --git a/apps/livekit/1.13.4/data.yml b/apps/livekit/1.13.4/data.yml new file mode 100644 index 000000000..4b6e39b34 --- /dev/null +++ b/apps/livekit/1.13.4/data.yml @@ -0,0 +1,108 @@ +additionalProperties: + formFields: + - default: 7880 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Signaling Port + labelZh: 信令端口 + label: + en: Signaling Port + zh: 信令端口 + zh-Hant: 信令連接埠 + ja: シグナリングポート + ko: 시그널링 포트 + ru: Порт сигнализации + ms: Port isyarat + pt-br: Porta de sinalizacao + required: true + rule: paramPort + type: number + - default: 7881 + edit: true + envKey: PANEL_APP_PORT_RTC_TCP + labelEn: WebRTC TCP Port + labelZh: WebRTC TCP 端口 + label: + en: WebRTC TCP Port + zh: WebRTC TCP 端口 + zh-Hant: WebRTC TCP 連接埠 + ja: WebRTC TCP ポート + ko: WebRTC TCP 포트 + ru: TCP-порт WebRTC + ms: Port TCP WebRTC + pt-br: Porta TCP WebRTC + required: true + rule: paramPort + type: number + - default: 7882 + edit: true + envKey: PANEL_APP_PORT_RTC_UDP + labelEn: WebRTC UDP Port + labelZh: WebRTC UDP 端口 + label: + en: WebRTC UDP Port + zh: WebRTC UDP 端口 + zh-Hant: WebRTC UDP 連接埠 + ja: WebRTC UDP ポート + ko: WebRTC UDP 포트 + ru: UDP-порт WebRTC + ms: Port UDP WebRTC + pt-br: Porta UDP WebRTC + required: true + rule: paramPort + type: number + - default: livekit_api_key + edit: true + envKey: LIVEKIT_API_KEY + labelEn: API Key + labelZh: API 密钥 + label: + en: API Key + zh: API 密钥 + zh-Hant: API 金鑰 + ja: API キー + ko: API 키 + ru: Ключ API + ms: Kunci API + pt-br: Chave de API + required: true + type: text + - default: "" + edit: true + envKey: LIVEKIT_API_SECRET + labelEn: API Secret + labelZh: API 密钥密码 + label: + en: API Secret + zh: API 密钥密码 + zh-Hant: API 金鑰密碼 + ja: API シークレット + ko: API 비밀 값 + ru: Секрет API + ms: Rahsia API + pt-br: Segredo da API + random: true + required: true + rule: paramComplexity + type: password + - default: "true" + edit: true + envKey: LIVEKIT_USE_EXTERNAL_IP + labelEn: Discover Public IP + labelZh: 发现公网 IP + label: + en: Discover Public IP + zh: 发现公网 IP + zh-Hant: 探索公網 IP + ja: パブリック IP を検出 + ko: 공용 IP 검색 + ru: Определять публичный IP + ms: Kesan IP awam + pt-br: Detectar IP publico + required: true + type: select + values: + - label: "true" + value: "true" + - label: "false" + value: "false" diff --git a/apps/livekit/1.13.4/docker-compose.yml b/apps/livekit/1.13.4/docker-compose.yml new file mode 100644 index 000000000..33ff1687d --- /dev/null +++ b/apps/livekit/1.13.4/docker-compose.yml @@ -0,0 +1,31 @@ +services: + livekit: + image: "livekit/livekit-server:v1.13.4" + container_name: ${CONTAINER_NAME} + command: + - --config-body + - | + port: 7880 + rtc: + tcp_port: 7881 + udp_port: 7882 + use_external_ip: ${LIVEKIT_USE_EXTERNAL_IP} + - --keys + - "${LIVEKIT_API_KEY}: ${LIVEKIT_API_SECRET}" + ports: + - "${PANEL_APP_PORT_HTTP}:7880" + - "${PANEL_APP_PORT_RTC_TCP}:7881/tcp" + - "${PANEL_APP_PORT_RTC_UDP}:7882/udp" + environment: + - LIVEKIT_API_KEY=${LIVEKIT_API_KEY} + - LIVEKIT_API_SECRET=${LIVEKIT_API_SECRET} + - LIVEKIT_USE_EXTERNAL_IP=${LIVEKIT_USE_EXTERNAL_IP} + labels: + createdBy: "Apps" + restart: unless-stopped + networks: + - 1panel-network + +networks: + 1panel-network: + external: true diff --git a/apps/livekit/1.13.4/scripts/init.sh b/apps/livekit/1.13.4/scripts/init.sh new file mode 100755 index 000000000..9879df4c3 --- /dev/null +++ b/apps/livekit/1.13.4/scripts/init.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -euo pipefail +exit 0 diff --git a/apps/livekit/1.13.4/scripts/uninstall.sh b/apps/livekit/1.13.4/scripts/uninstall.sh new file mode 100755 index 000000000..ab8a8d674 --- /dev/null +++ b/apps/livekit/1.13.4/scripts/uninstall.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker-compose down --volumes diff --git a/apps/livekit/1.13.4/scripts/upgrade.sh b/apps/livekit/1.13.4/scripts/upgrade.sh new file mode 100755 index 000000000..9879df4c3 --- /dev/null +++ b/apps/livekit/1.13.4/scripts/upgrade.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -euo pipefail +exit 0 diff --git a/apps/livekit/README.md b/apps/livekit/README.md new file mode 100644 index 000000000..ab7ac3f73 --- /dev/null +++ b/apps/livekit/README.md @@ -0,0 +1,61 @@ +# LiveKit + +LiveKit 是面向开发者的实时 WebRTC SFU,用于将音频、视频和数据能力集成到自有应用。它不提供会议网页或用户管理界面;应用服务端必须用安装时设置的 API Key 与 API Secret 签发访问令牌。 + +## 产品介绍 + +LiveKit 提供实时音视频和数据转发能力,适合由现有网站、移动应用或服务端生成访问令牌后接入。 + +## 主要功能 + +- 支持 WebRTC 音频、视频和数据通道。 +- 提供单节点部署所需的信令、TCP 回退和 UDP mux 端口。 +- 使用 1Panel 表单保存 API Key、API Secret 和公网 IP 发现选项。 + +## 网络要求 + +- 信令端口用于 HTTP/WebSocket 连接,可由 1Panel 反向代理提供 TLS。 +- WebRTC TCP 和 UDP 端口必须直接从公网到达容器,不能放在 HTTP/TLS 负载均衡器后。 +- 默认使用一个 UDP mux 端口以适配 1Panel。高并发生产部署可按 LiveKit 官方文档改用更大的 UDP 端口范围或 host network。 +- 公网 NAT 环境默认启用公网 IP 发现;纯内网测试时可关闭该选项。 + +## 单节点与升级 + +本包使用官方单节点模式,不包含 Redis。Redis 是多节点部署的推荐依赖,不能仅通过新增服务就安全转换为分布式集群。升级前请备份应用侧的令牌签发配置,并确保 API Key 与 API Secret 保持不变。 + +## 访问说明 + +- 信令端口默认是 `7880`,安装后由应用服务端通过 WebSocket 或 1Panel 反向代理访问。 +- WebRTC TCP 和 UDP 端口需要在主机防火墙和公网入口中单独放行。 +- 使用前请在自有后端按 LiveKit 官方 SDK 签发访问令牌,不要把 API Secret 放进浏览器代码。 + +## LiveKit + +LiveKit is a developer-facing WebRTC SFU for integrating real-time audio, video, and data into an application. It does not include a meeting web UI or user administration; the application backend must issue access tokens with the API Key and API Secret configured at install time. + +## Introduction + +LiveKit provides real-time media and data forwarding for an existing website, mobile app, or backend that issues access tokens. + +## Features + +- WebRTC audio, video, and data channels. +- Signaling, TCP fallback, and a UDP mux port for single-node deployment. +- 1Panel form fields for API credentials and public-IP discovery. + +## Network requirements + +- The signaling port is for HTTP/WebSocket connections and can receive TLS through a 1Panel reverse proxy. +- The WebRTC TCP and UDP ports must be publicly reachable by the container and cannot sit behind an HTTP/TLS load balancer. +- This package uses one UDP mux port for 1Panel compatibility. High-concurrency deployments can use a larger UDP range or host networking as documented by LiveKit. +- Public-IP discovery is enabled by default for NAT environments and can be disabled for private-network testing. + +## Single-node operation and upgrades + +The package uses the official single-node mode without Redis. Redis is the recommended dependency for multi-node deployments and cannot be safely added as an untested sidecar. Back up application-side token issuing configuration before an upgrade and preserve the API Key and API Secret. + +## Access + +- The signaling port defaults to `7880` and is accessed by an application backend over WebSocket or through a 1Panel reverse proxy. +- WebRTC TCP and UDP ports must be opened separately in the host firewall and public ingress. +- Issue access tokens with an official LiveKit SDK in your own backend. Never ship the API Secret to browser code. diff --git a/apps/livekit/data.yml b/apps/livekit/data.yml new file mode 100644 index 000000000..441bc8f2b --- /dev/null +++ b/apps/livekit/data.yml @@ -0,0 +1,30 @@ +name: LiveKit +tags: +- Middleware +title: LiveKit 实时音视频服务器 +description: LiveKit 实时音视频服务器 +additionalProperties: + key: livekit + name: LiveKit + tags: + - Middleware + shortDescZh: LiveKit 实时音视频服务器 + shortDescEn: LiveKit real-time audio and video server + description: + en: LiveKit is a real-time WebRTC server for audio, video, and data. + zh: LiveKit 是用于音频、视频和数据的实时 WebRTC 服务器。 + zh-Hant: LiveKit 是用於音訊、視訊和資料的即時 WebRTC 伺服器。 + ja: LiveKit は音声、映像、データ向けのリアルタイム WebRTC サーバーです。 + ko: LiveKit은 오디오, 비디오 및 데이터를 위한 실시간 WebRTC 서버입니다. + ru: LiveKit - это сервер WebRTC реального времени для аудио, видео и данных. + ms: LiveKit ialah pelayan WebRTC masa nyata untuk audio, video dan data. + pt-br: LiveKit e um servidor WebRTC em tempo real para audio, video e dados. + type: middleware + crossVersionUpdate: true + limit: 0 + website: https://livekit.io + github: https://github.com/livekit/livekit + document: https://docs.livekit.io/home/self-hosting/deployment/ + architectures: + - amd64 + - arm64 diff --git a/apps/livekit/latest/.env.sample b/apps/livekit/latest/.env.sample new file mode 100644 index 000000000..863805f61 --- /dev/null +++ b/apps/livekit/latest/.env.sample @@ -0,0 +1,7 @@ +PANEL_APP_PORT_HTTP=7880 +PANEL_APP_PORT_RTC_TCP=7881 +PANEL_APP_PORT_RTC_UDP=7882 +LIVEKIT_API_KEY=livekit_api_key +LIVEKIT_API_SECRET=replace-with-a-long-random-secret +LIVEKIT_USE_EXTERNAL_IP=true +CONTAINER_NAME= diff --git a/apps/livekit/latest/data.yml b/apps/livekit/latest/data.yml new file mode 100644 index 000000000..4b6e39b34 --- /dev/null +++ b/apps/livekit/latest/data.yml @@ -0,0 +1,108 @@ +additionalProperties: + formFields: + - default: 7880 + edit: true + envKey: PANEL_APP_PORT_HTTP + labelEn: Signaling Port + labelZh: 信令端口 + label: + en: Signaling Port + zh: 信令端口 + zh-Hant: 信令連接埠 + ja: シグナリングポート + ko: 시그널링 포트 + ru: Порт сигнализации + ms: Port isyarat + pt-br: Porta de sinalizacao + required: true + rule: paramPort + type: number + - default: 7881 + edit: true + envKey: PANEL_APP_PORT_RTC_TCP + labelEn: WebRTC TCP Port + labelZh: WebRTC TCP 端口 + label: + en: WebRTC TCP Port + zh: WebRTC TCP 端口 + zh-Hant: WebRTC TCP 連接埠 + ja: WebRTC TCP ポート + ko: WebRTC TCP 포트 + ru: TCP-порт WebRTC + ms: Port TCP WebRTC + pt-br: Porta TCP WebRTC + required: true + rule: paramPort + type: number + - default: 7882 + edit: true + envKey: PANEL_APP_PORT_RTC_UDP + labelEn: WebRTC UDP Port + labelZh: WebRTC UDP 端口 + label: + en: WebRTC UDP Port + zh: WebRTC UDP 端口 + zh-Hant: WebRTC UDP 連接埠 + ja: WebRTC UDP ポート + ko: WebRTC UDP 포트 + ru: UDP-порт WebRTC + ms: Port UDP WebRTC + pt-br: Porta UDP WebRTC + required: true + rule: paramPort + type: number + - default: livekit_api_key + edit: true + envKey: LIVEKIT_API_KEY + labelEn: API Key + labelZh: API 密钥 + label: + en: API Key + zh: API 密钥 + zh-Hant: API 金鑰 + ja: API キー + ko: API 키 + ru: Ключ API + ms: Kunci API + pt-br: Chave de API + required: true + type: text + - default: "" + edit: true + envKey: LIVEKIT_API_SECRET + labelEn: API Secret + labelZh: API 密钥密码 + label: + en: API Secret + zh: API 密钥密码 + zh-Hant: API 金鑰密碼 + ja: API シークレット + ko: API 비밀 값 + ru: Секрет API + ms: Rahsia API + pt-br: Segredo da API + random: true + required: true + rule: paramComplexity + type: password + - default: "true" + edit: true + envKey: LIVEKIT_USE_EXTERNAL_IP + labelEn: Discover Public IP + labelZh: 发现公网 IP + label: + en: Discover Public IP + zh: 发现公网 IP + zh-Hant: 探索公網 IP + ja: パブリック IP を検出 + ko: 공용 IP 검색 + ru: Определять публичный IP + ms: Kesan IP awam + pt-br: Detectar IP publico + required: true + type: select + values: + - label: "true" + value: "true" + - label: "false" + value: "false" diff --git a/apps/livekit/latest/docker-compose.yml b/apps/livekit/latest/docker-compose.yml new file mode 100644 index 000000000..4fce45c1f --- /dev/null +++ b/apps/livekit/latest/docker-compose.yml @@ -0,0 +1,31 @@ +services: + livekit: + image: "livekit/livekit-server:latest" + container_name: ${CONTAINER_NAME} + command: + - --config-body + - | + port: 7880 + rtc: + tcp_port: 7881 + udp_port: 7882 + use_external_ip: ${LIVEKIT_USE_EXTERNAL_IP} + - --keys + - "${LIVEKIT_API_KEY}: ${LIVEKIT_API_SECRET}" + ports: + - "${PANEL_APP_PORT_HTTP}:7880" + - "${PANEL_APP_PORT_RTC_TCP}:7881/tcp" + - "${PANEL_APP_PORT_RTC_UDP}:7882/udp" + environment: + - LIVEKIT_API_KEY=${LIVEKIT_API_KEY} + - LIVEKIT_API_SECRET=${LIVEKIT_API_SECRET} + - LIVEKIT_USE_EXTERNAL_IP=${LIVEKIT_USE_EXTERNAL_IP} + labels: + createdBy: "Apps" + restart: unless-stopped + networks: + - 1panel-network + +networks: + 1panel-network: + external: true diff --git a/apps/livekit/latest/scripts/init.sh b/apps/livekit/latest/scripts/init.sh new file mode 100755 index 000000000..9879df4c3 --- /dev/null +++ b/apps/livekit/latest/scripts/init.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -euo pipefail +exit 0 diff --git a/apps/livekit/latest/scripts/uninstall.sh b/apps/livekit/latest/scripts/uninstall.sh new file mode 100755 index 000000000..ab8a8d674 --- /dev/null +++ b/apps/livekit/latest/scripts/uninstall.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker-compose down --volumes diff --git a/apps/livekit/latest/scripts/upgrade.sh b/apps/livekit/latest/scripts/upgrade.sh new file mode 100755 index 000000000..9879df4c3 --- /dev/null +++ b/apps/livekit/latest/scripts/upgrade.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -euo pipefail +exit 0 diff --git a/apps/livekit/logo.png b/apps/livekit/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..1d87d66c15d2b0e3a3ef8b8cf3b2942f8a11b658 GIT binary patch literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^TR@nF8AzUgEX@d{Bm#UwT!D1-{wM$c|F8P>&}-i7 zyho38Gd{=ceNS&Cy2BLvU=vuQBdLL z@Dm7l!;GoVz7?ylL+ zr^S9PJu8kPZn8`4uZ2_ftv|~q2lXSV2Ws2rx&Hr!mz_S7PL(qnZjsw|k;QHa&`k`U Lu6{1-oD!M<+4N!h literal 0 HcmV?d00001