Skip to content

Commit 65902a8

Browse files
committed
Ptero Fix?
1 parent e46f9be commit 65902a8

2 files changed

Lines changed: 31 additions & 3 deletions

File tree

ptero/Livekit/egg-livekit.json

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
"startup": "./livekit-server --config {{LIVEKIT_YAML_PATH}}",
1717
"config": {
1818
"files": "{}",
19-
"startup": "{\r\n \"done\": \"Welcome to DCTS\"\r\n}",
19+
"startup": "{\r\n \"done\": \"starting LiveKit server\"\r\n}",
2020
"logs": "{}",
2121
"stop": "^C"
2222
},
2323
"scripts": {
2424
"installation": {
25-
"script": "#!/bin/bash\nexport HOME=/mnt/server\nmkdir -p /mnt/server\ncd /mnt/server\n\necho \"Fetching latest LiveKit release...\"\nLATEST_VERSION=$(curl -s https://api.github.com/repos/livekit/livekit/releases/latest | grep '\"tag_name\":' | head -n 1 | sed -E 's/.*\"v([^\"]+)\".*/\\1/')\necho \"Installing LiveKit v${LATEST_VERSION}...\"\nwget \"https://github.com/livekit/livekit/releases/latest/download/livekit-server_${LATEST_VERSION}_linux_amd64.tar.gz\"\ntar -xzf livekit-server_${LATEST_VERSION}_linux_amd64.tar.gz livekit-server\nrm livekit-server_${LATEST_VERSION}_linux_amd64.tar.gz\nchmod +x livekit-server\necho \"LiveKit installation complete.\"\n",
25+
"script": "#!/bin/bash\nexport HOME=/mnt/server\nmkdir -p /mnt/server\ncd /mnt/server\n\necho \"Fetching latest LiveKit release...\"\nLATEST_VERSION=$(curl -s https://api.github.com/repos/livekit/livekit/releases/latest | grep '\"tag_name\":' | head -n 1 | sed -E 's/.*\"v([^\"]+)\".*/\\1/')\necho \"Installing LiveKit v${LATEST_VERSION}...\"\nwget \"https://github.com/livekit/livekit/releases/latest/download/livekit_${LATEST_VERSION}_linux_amd64.tar.gz\"\ntar -xzf livekit_${LATEST_VERSION}_linux_amd64.tar.gz livekit-server\nrm livekit_${LATEST_VERSION}_linux_amd64.tar.gz\nchmod +x livekit-server\necho \"LiveKit installation complete.\"\n",
2626
"container": "ghcr.io/pterodactyl/installers:debian",
2727
"entrypoint": "bash"
2828
}
@@ -31,7 +31,7 @@
3131
{
3232
"name": "Server Port",
3333
"description": "Main HTTP port for the LiveKit API (Default 7880).",
34-
"env_variable": "SERVER_PORT",
34+
"env_variable": "PORT",
3535
"default_value": "7880",
3636
"user_viewable": true,
3737
"user_editable": false,
@@ -47,6 +47,26 @@
4747
"user_editable": true,
4848
"rules": "required|string",
4949
"field_type": "text"
50+
},
51+
{
52+
"name": "RTC TCP Port",
53+
"description": "Secondary port used for LiveKit TCP WebRTC signaling.",
54+
"env_variable": "RTC_TCP_PORT",
55+
"default_value": "7881",
56+
"user_viewable": true,
57+
"user_editable": true,
58+
"rules": "required|integer",
59+
"field_type": "text"
60+
},
61+
{
62+
"name": "RTC UDP Port",
63+
"description": "Port used for direct LiveKit UDP WebRTC media streaming.",
64+
"env_variable": "RTC_UDP_PORT",
65+
"default_value": "7882",
66+
"user_viewable": true,
67+
"user_editable": true,
68+
"rules": "required|integer",
69+
"field_type": "text"
5070
}
5171
]
5272
}

ptero/Livekit/entrypoint.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,13 @@ if [ -n "$SERVER_PORT" ]; then
4040
/usr/local/bin/yq -i '.port = '"$SERVER_PORT" "${LIVEKIT_YAML_PATH}"
4141
fi
4242

43+
if [ -n "$RTC_TCP_PORT" ]; then
44+
/usr/local/bin/yq -i '.rtc.tcp_port = '"$RTC_TCP_PORT" "${LIVEKIT_YAML_PATH}"
45+
fi
46+
47+
if [ -n "$RTC_UDP_PORT" ]; then
48+
/usr/local/bin/yq -i '.rtc.udp_port = '"$RTC_UDP_PORT" "${LIVEKIT_YAML_PATH}"
49+
fi
50+
4351
# Start livekit
4452
exec ./livekit-server --config "${LIVEKIT_YAML_PATH}"

0 commit comments

Comments
 (0)