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.
This commit is contained in:
okxlin
2026-07-19 17:32:55 +08:00
parent 9ac3e4fcfe
commit ddbc4449f7
15 changed files with 399 additions and 0 deletions
+7
View File
@@ -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=
+108
View File
@@ -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"
+31
View File
@@ -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
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -euo pipefail
exit 0
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
docker-compose down --volumes
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -euo pipefail
exit 0
+61
View File
@@ -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.
+30
View File
@@ -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
+7
View File
@@ -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=
+108
View File
@@ -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"
+31
View File
@@ -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
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -euo pipefail
exit 0
+2
View File
@@ -0,0 +1,2 @@
#!/bin/bash
docker-compose down --volumes
+3
View File
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
set -euo pipefail
exit 0
Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B