feat: add docker-compose with LiveKit for server Docker deployment

- docker-compose.yml: owncord + livekit/livekit-server on shared network
- Secrets (API key/secret) injected via .env → OWNCORD_VOICE_* env vars
- livekit.yaml.example: template config with port ranges and node_ip guidance
- .env.example: secret template with min-length reminder for API secret
- .gitignore: add .env / Server/.env to prevent accidental secret commits

Users: cp .env.example .env && cp livekit.yaml.example livekit.yaml,
fill in values, then docker compose up -d
This commit is contained in:
J3vb
2026-04-03 14:32:20 +02:00
parent 03969575e0
commit d5cbd41bcb
4 changed files with 89 additions and 0 deletions
+4
View File
@@ -1,3 +1,7 @@
# Docker secrets
.env
Server/.env
# Claude Code local config
.claude/
Client/.claude/
+7
View File
@@ -0,0 +1,7 @@
# Copy this file to .env and fill in your values.
# .env is gitignored — never commit real secrets.
# LiveKit credentials — generate strong random values (min 32 chars for secret)
# These must match the keys: section in livekit.yaml
LIVEKIT_API_KEY=change-me-api-key
LIVEKIT_API_SECRET=change-me-api-secret-must-be-at-least-32-characters
+54
View File
@@ -0,0 +1,54 @@
# OwnCord server stack — chat server + LiveKit voice/video
#
# Quick start:
# 1. cp .env.example .env && edit .env (set secrets + public IP)
# 2. cp livekit.yaml.example livekit.yaml && edit livekit.yaml (same keys)
# 3. docker compose up -d
#
# LiveKit runs as a separate container on the same internal network.
# The OwnCord server reaches it at ws://livekit:7880 (Docker DNS).
# Browser clients reach LiveKit directly via the ports published below,
# so your firewall must allow TCP 7880-7881 and UDP 50000-60000.
services:
owncord:
image: ghcr.io/j3vb/owncord-server:latest
restart: unless-stopped
ports:
- "8443:8443"
environment:
# Secrets injected from .env — never hardcode these
OWNCORD_VOICE_LIVEKIT_API_KEY: ${LIVEKIT_API_KEY}
OWNCORD_VOICE_LIVEKIT_API_SECRET: ${LIVEKIT_API_SECRET}
volumes:
# Mount your config.yaml for non-secret settings (server name, TLS, etc.)
# See the example config at: https://github.com/J3vb/OwnCord#configuration
- ./config.yaml:/app/config.yaml:ro
# Persistent data (SQLite DB + uploaded files)
- owncord-data:/app/data
depends_on:
- livekit
networks:
- owncord-net
livekit:
image: livekit/livekit-server:v1
restart: unless-stopped
# LiveKit config file — copy livekit.yaml.example → livekit.yaml and fill in
command: --config /etc/livekit/livekit.yaml
ports:
- "7880:7880" # WebSocket API (OwnCord server + browser signalling)
- "7881:7881" # TCP fallback for WebRTC (clients behind strict NAT)
- "50000-60000:50000-60000/udp" # WebRTC UDP media streams
volumes:
- ./livekit.yaml:/etc/livekit/livekit.yaml:ro
networks:
- owncord-net
networks:
owncord-net:
driver: bridge
volumes:
owncord-data:
+24
View File
@@ -0,0 +1,24 @@
# LiveKit server configuration for OwnCord
# Copy this file to livekit.yaml and fill in your values.
# The api_key and api_secret here MUST match the values in your .env file.
port: 7880
rtc:
tcp_port: 7881
port_range_start: 50000
port_range_end: 60000
# Your server's public IP address — required so browser WebRTC clients can
# reach LiveKit directly for media. Leave blank only if running entirely on
# localhost (development). On cloud VMs with a metadata service (AWS, GCP,
# DigitalOcean) you can set use_external_ip: true instead.
node_ip: "YOUR_SERVER_PUBLIC_IP"
# use_external_ip: true # uncomment on cloud VMs instead of node_ip
keys:
# Must match LIVEKIT_API_KEY / LIVEKIT_API_SECRET in your .env file
YOUR_API_KEY: YOUR_API_SECRET
logging:
level: info