Nix
If you are already using NixOS, it is as simple as setting the following Options.
Note
The example contains no reverse proxy
let
c10yPort = 6167;
lk-jwtPort = 8080;
keyFile = "/path/to/my/keyfile";
livekitPort = 7880;
livekitTCPPort = 4030;
livekitUDPStartPort = 50000;
livekitUDPEndPort = 51000;
in
services = {
matrix-continuwuity = {
enable = true;
settings.global = {
allow_encryption = true;
well_known.support_mxid = "@admin:example.com";
new_user_displayname_suffix = "";
forbidden_usernames = [
"administrator"
];
allow_federation = true;
trusted_servers = [
"matrix.org"
];
address = ["127.0.0.1"];
port = c10yPort;
allow_registration = true;
registration_token = "my token" # prefer using <registration_token_file> instead.
};
};
lk-jwt-service = {
enable = true;
port = lk-jwtPort;
livekitUrl = "wss://example.com";
inherit keyFile;
};
livekit = {
enable = true;
openFirewall = true;
settings = {
port = livekitPort;
rtc = {
tcp_port = livekitTCPPort;
port_range_start = livekitUDPStartPort;
port_range_end = livekitUDPEndPort;
};
room = {
auto_create = false;
enabled_codecs = [
{mime = "audio/opus";}
{mime = "video/av1";}
];
};
};
inherit keyFile;
};
}
networking.firewall.allowedTCPPorts = [livekitTCPPort];