livekit & coturn
Table of Contents
Some information is at 2025-05-02 and 2025-05-01
Guide: https://docs.livekit.io/home/self-hosting/vm/
Test functionality: https://livekit.io/connection-test
Quick-start
docker pull livekit/generatedocker run --rm -it -v./livekit_generated:/output livekit/generateFor LiveKit:
echo "* soft nofile 2048" > /etc/security/limits.d/10-livekit.confecho "vm.overcommit_memory = 1" > /etc/sysctl.d/90-redis.confservice procps force-reloadGet token
python3 -m venv envsource env/bin/activatepip install livekit-apiexport LIVEKIT_API_KEY=<your-api-key>export LIVEKIT_API_SECRET=<your-api-secret>python livekit_token.pyimport osfrom livekit import api
token = api.AccessToken(os.getenv('LIVEKIT_API_KEY'), os.getenv('LIVEKIT_API_SECRET')) \ .with_identity("identity") \ .with_name("my name") \ .with_grants(api.VideoGrants( room_join=True, room="test", ))
print(token.to_jwt())CLI
curl -sSL https://get.livekit.io/cli | bashexport LIVEKIT_URL="https://livekit.example.com"export LIVEKIT_API_KEY=<your-api-key>export LIVEKIT_API_SECRET=<your-api-secret>Check configuration
https://livekit.io/connection-test -> takes wss:// with domain name and room token (the one - comes from generate script)
coturn
there is a turnadmin tool to create users; sqlite (userdb=/var/db/turndb in config)
/> 128 symbols password advised