💬 Setup LiveKit — Open-Source WebRTC Server for Realtime Audio/Video
Deploy LiveKit on Ubuntu with Docker — a scalable, open-source WebRTC SFU that powers realtime audio, video, and data for the apps you build, on port 7880.
📦 Resources & Setup Scripts
Grab the automated bash script from GitHub to follow along with the video.
Quick Install:
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/communication/livekit/livekit-ubuntu.sh
chmod +x livekit-ubuntu.sh
sudo bash livekit-ubuntu.sh
Tutorial Steps
1 Download the Script
wget https://raw.githubusercontent.com/mhmdali94/Docker/main/communication/livekit/livekit-ubuntu.sh
2 Make it Executable
chmod +x livekit-ubuntu.sh
3 Run the Installer
The script installs Docker if needed and starts the LiveKit server with the WebSocket/API on TCP 7880, media on TCP 7881, and WebRTC traffic on UDP 7882. It ships with development credentials (API key devkey, secret secret) that you must replace for real use.
sudo bash livekit-ubuntu.sh
4 Connect a Client
LiveKit has no end-user page — you build against it. Point a LiveKit client or the CLI at the WebSocket URL using the dev API key and secret:
ws://<your-server-ip>:7880 (API key devkey / secret secret)
Ports Used
| Port | Purpose |
|---|---|
| 7880 | WebSocket + API (TCP) — the endpoint clients connect to |
| 7881 | Media (TCP) |
| 7882/udp | WebRTC media — must be open or calls have no audio/video |
| devkey / secret | Dev credentials — replace before any real deployment |