Grupo supports LiveKit self-hosted, Agora, and LiveKit Cloud. If you have a server that supports WebRTC, you can deploy LiveKit on your own server—it’s free and open source. If your server doesn’t support WebRTC or you’re using shared hosting, you can opt for LiveKit Cloud or Agora instead.
How to Deploy LiveKit on Your Server ?
To begin, SSH into your server and execute the necessary commands directly from the terminal.
1) Install LiveKit Server
curl -sSL https://get.livekit.io | bash
2) Create a config file (e.g., livekit.yaml)
nano livekit.yaml
Paste the following content and save the file.
port: 7880
bind_address: 0.0.0.0
rtc:
udp_port: 7881
tcp_port: 7881
use_external_ip: true
# Define an API key and secret here—these keys can be used in Grupo's video chat settings
myapikey: myapisecret
3) Check Your Server’s Firewall (UFW)
sudo ufw allow 7880/tcp
sudo ufw allow 7881/tcp
sudo ufw allow 7881/udp
sudo ufw reload
4) Set up a reverse proxy using Nginx to handle the WebSocket URL.
Add the following configuration to enable access to your LiveKit URL at wss://grupo_domain/livekit/.
location /livekit/ {
proxy_pass http://127.0.0.1:7880;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
send_timeout 3600s;
keepalive_timeout 3600s;
}
5) Restart Nginx services
Your LiveKit URL is the server URL you configured – wss://grupo_domain/livekit/, and the API key and secret are the ones defined in your livekit.
yaml
file.
6) Start LiveKit Server
livekit-server --config livekit.yaml
You can use systemctl to run LiveKit in the background as a service.
For more information about LiveKit configuration and optimization, please refer to the following URL: https://docs.livekit.io/home/self-hosting/local/