diff --git a/ct/alpine-teamspeak-server.sh b/ct/alpine-teamspeak-server.sh new file mode 100644 index 000000000..0e60aac74 --- /dev/null +++ b/ct/alpine-teamspeak-server.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 (Slaviša Arežina) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://teamspeak.com/en/ + +APP="Alpine-TeamSpeak-Server" +var_tags="${var_tags:-alpine;communication}" +var_cpu="${var_cpu:-1}" +var_ram="${var_ram:-256}" +var_disk="${var_disk:-2}" +var_os="${var_os:-alpine}" +var_version="${var_version:-3.22}" +var_unprivileged="${var_unprivileged:-1}" + +header_info "$APP" +variables +color +catch_errors + +function update_script() { + header_info + + if [[ ! -d /opt/teamspeak-server ]]; then + msg_error "No ${APP} Installation Found!" + exit 1 + fi + + RELEASE=$(curl -fsSL https://teamspeak.com/en/downloads/#server | sed -n '/teamspeak3-server_linux_amd64-/ { s/.*teamspeak3-server_linux_amd64-\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p; q }') + + if [ "${RELEASE}" != "$(cat ~/.teamspeak-server)" ] || [ ! -f ~/.teamspeak-server ]; then + msg_info "Updating ${APP} LXC" + $STD apk -U upgrade + $STD service teamspeak stop + curl -fsSL "https://files.teamspeak-services.com/releases/server/${RELEASE}/teamspeak3-server_linux_amd64-${RELEASE}.tar.bz2" -o ts3server.tar.bz2 + tar -xf ./ts3server.tar.bz2 + cp -ru teamspeak3-server_linux_amd64/* /opt/teamspeak-server/ + rm -f ~/ts3server.tar.bz* + rm -rf teamspeak3-server_linux_amd64 + echo "${RELEASE}" >~/.teamspeak-server + $STD service teamspeak start + msg_ok "Updated Successfully" + else + msg_ok "No update required. ${APP} is already at ${RELEASE}" + fi + + exit 0 +} + +start +build_container +description + +msg_ok "Completed Successfully!\n" +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" +echo -e "${INFO}${YW} Access it using the following IP:${CL}" +echo -e "${TAB}${GATEWAY}${BGN}${IP}:9987${CL}" diff --git a/frontend/public/json/teamspeak-server.json b/frontend/public/json/teamspeak-server.json index 30e891389..8944f2ff3 100644 --- a/frontend/public/json/teamspeak-server.json +++ b/frontend/public/json/teamspeak-server.json @@ -1,40 +1,55 @@ { - "name": "Teamspeak-Server", - "slug": "teamspeak-server", - "categories": [ - 24 - ], - "date_created": "2025-07-21", - "type": "ct", - "updateable": true, - "privileged": false, - "interface_port": 9987, - "documentation": "https://support.teamspeak.com/hc/en-us/categories/360000302017-TeamSpeak-3", - "website": "https://teamspeak.com/", - "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/teamspeak-light.webp", - "config_path": "", - "description": "TeamSpeak is a voice over IP (VoIP) application, primarily used by gamers and teams to chat in real time on dedicated servers. It delivers crystal‑clear, low‑latency voice communication.", - "install_methods": [ - { - "type": "default", - "script": "ct/teamspeak-server.sh", - "resources": { - "cpu": 1, - "ram": 512, - "hdd": 2, - "os": "debian", - "version": "12" - } - } - ], - "default_credentials": { - "username": null, - "password": null + "name": "Teamspeak-Server", + "slug": "teamspeak-server", + "categories": [ + 24 + ], + "date_created": "2025-07-21", + "type": "ct", + "updateable": true, + "privileged": false, + "interface_port": 9987, + "documentation": "https://support.teamspeak.com/hc/en-us/categories/360000302017-TeamSpeak-3", + "website": "https://teamspeak.com/", + "logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/teamspeak-light.webp", + "config_path": "", + "description": "TeamSpeak is a voice over IP (VoIP) application, primarily used by gamers and teams to chat in real time on dedicated servers. It delivers crystal‑clear, low‑latency voice communication.", + "install_methods": [ + { + "type": "default", + "script": "ct/teamspeak-server.sh", + "resources": { + "cpu": 1, + "ram": 512, + "hdd": 2, + "os": "debian", + "version": "12" + } }, - "notes": [ - { - "text": "Use `journalctl -u teamspeak-server.service` inside LXC console to check for admin credentials!", - "type": "info" - } - ] + { + "type": "alpine", + "script": "ct/alpine-teamspeak-server.sh", + "resources": { + "cpu": 1, + "ram": 256, + "hdd": 2, + "os": "alpine", + "version": "3.22" + } + } + ], + "default_credentials": { + "username": null, + "password": null + }, + "notes": [ + { + "text": "Use `journalctl -u teamspeak-server.service` inside Debian LXC console to check for admin credentials!", + "type": "info" + }, + { + "text": "Use `cat /var/log/teamspeak.err.log` inside Alpine LXC console to check for admin credentials!", + "type": "info" + } + ] } diff --git a/install/alpine-teamspeak-server-install.sh b/install/alpine-teamspeak-server-install.sh new file mode 100644 index 000000000..b99642153 --- /dev/null +++ b/install/alpine-teamspeak-server-install.sh @@ -0,0 +1,69 @@ +#!/usr/bin/env bash + +# Copyright (c) 2021-2025 community-scripts ORG +# Author: tremor021 (Slaviša Arežina) +# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE +# Source: https://teamspeak.com/en/ + +source /dev/stdin <<<"$FUNCTIONS_FILE_PATH" +color +verb_ip6 +catch_errors +setting_up_container +network_check +update_os + +msg_info "Installing dependencies" +$STD apk add --no-cache \ + ca-certificates \ + libstdc++ \ + libc6-compat +msg_ok "Installed dependencies" + +RELEASE=$(curl -fsSL https://teamspeak.com/en/downloads/#server | sed -n '/teamspeak3-server_linux_amd64-/ { s/.*teamspeak3-server_linux_amd64-\([0-9]\+\.[0-9]\+\.[0-9]\+\).*/\1/p; q }') + +msg_info "Installing Teamspeak Server v${RELEASE}" +mkdir -p /opt/teamspeak-server +cd /opt/teamspeak-server +curl -fsSL "https://files.teamspeak-services.com/releases/server/${RELEASE}/teamspeak3-server_linux_amd64-${RELEASE}.tar.bz2" -o ts3server.tar.bz2 +tar xf ts3server.tar.bz2 --strip-components=1 +mkdir -p logs data lib +mv *.so lib +touch data/ts3server.sqlitedb data/query_ip_blacklist.txt data/query_ip_whitelist.txt .ts3server_license_accepted +echo "${RELEASE}" >~/.teamspeak-server +msg_ok "Installed TeamSpeak Server v${RELEASE}" + +msg_info "Enabling TeamSpeak Server Service" +cat </etc/init.d/teamspeak +#!/sbin/openrc-run + +name="TeamSpeak Server" +description="TeamSpeak 3 Server" +command="/opt/teamspeak-server/ts3server_startscript.sh" +command_args="start" +output_log="/var/log/teamspeak.out.log" +error_log="/var/log/teamspeak.err.log" +command_background=true +pidfile="/run/teamspeak-server.pid" +directory="/opt/teamspeak-server" + +depend() { + need net + use dns +} +EOF +chmod +x /etc/init.d/teamspeak +$STD rc-update add teamspeak default +msg_ok "Enabled TeamSpeak Server Service" + +msg_info "Starting TeamSpeak Server" +$STD service teamspeak start +msg_ok "Started TeamSpeak Server" + +motd_ssh +customize + +msg_info "Cleaning up" +rm -r ts3server.tar.bz* LICENSE* CHANGELOG doc serverquerydocs tsdns redist +$STD apk cache clean +msg_ok "Cleaned"