• Be part of the TeaParty!
    Click here for more information

Server TeaSpeak in Windows Server 2019

nessuno123

Member
Hi,
today i want post a little guide to start teaspeak in Windows Server 2019, let's go !

open cmd.exe

commands (Copy and Paste):
Code:
powershell
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Select Y

... reboot ...

restart cmd.exe
Code:
powershell
curl.exe -L -o ubuntu-1804.appx https://aka.ms/wsl-ubuntu-1804
Rename-Item ubuntu-1804.appx ubuntu-1804.zip
Expand-Archive ubuntu-1804.zip ubuntu
del ubuntu-1804.zip
cd ubuntu
.\ubuntu1804.exe
[Follow installation process]
sudo apt update
sudo apt install ansible -y
cd /mnt/c/Users/Administrator
rm -fr ubuntu/install.tar.gz
rm -fr ubuntu/Assets
mkdir teaspeak_server
cd /mnt/c/Users/Administrator/teaspeak_server
wget https://repo.teaspeak.de/server/linux/amd64_optimized/TeaSpeak-1.3.9-beta.tar.gz
tar -xzf TeaSpeak-1.3.9-beta.tar.gz
rm -fr TeaSpeak-1.3.9-beta.tar.gz
======DONE=======

Follow normal first-run instructions (./teastart_minimal.sh).

Your Linux dir is in: C:\Users\Administrator\ubuntu [970 MB Required]
Your teaspeak folder is in: C:\Users\Administrator\teaspeak_server

to start server open cmd.exe
Code:
cd C:\Users\Administrator\teaspeak_server
wsl ./teastart.sh start
or

create a .bat file inside teaspeak folder whit these strings:

@ECHO OFF
title TeaSpeak server Launcher v1.4
if exist teastart.sh (
GOTO menu
) else (
COLOR 0C
ECHO ERROR: Move me into correct TeaSpeak folder!
pause
GOTO e
)
:menu
cls
@ECHO OFF
COLOR 0A
ECHO =================================
ECHO TeaSpeak Server launcher utility
ECHO Scipt Ver. 1.4
ECHO Created by Nessuno123
ECHO for TeaSpeak.de
ECHO =================================
ECHO Select an option to start TeaSpeak Server :
ECHO .
ECHO 00 - Run in minimal mode (First-Run)
ECHO 1 - Start TeaSpeak Server
ECHO 2 - ReStart TeaSpeak Server
ECHO 3 - Stop TeaSpeak Server
ECHO 4 - Status of your TeaSpeak Server
ECHO as - Install autostart [At windows user's login]
ECHO ras - Remove autostart module
ECHO u - Update TeaSpeak Server to the last version
ECHO v - Display local TeaSpeak Version
ECHO uc - Update TeaSpeak Server to a custom version
ECHO w - Open TeaSpeak.de (Website)
ECHO h - Help Thread (Website)
ECHO e - Close launcher
ECHO .
set /p start=What's your choice ?
if %start% == 00 GOTO :0
if %start% == 1 GOTO :1
if %start% == 2 GOTO :2
if %start% == 3 GOTO :3
if %start% == 4 GOTO :4
if %start% == e GOTO :e
if %start% == v GOTO :current_version
if %start% == ras GOTO :ras
if %start% == u GOTO :auto_update
if %start% == w GOTO :web
if %start% == h GOTO :web_help
if %start% == as GOTO :autostart_login
if %start% == uc GOTO :custom_update
COLOR 0C
ECHO ERROR ! Invalid Option !
PAUSE
GOTO menu
:0
msg * Press CTRL+C to terminate the server from the console!
wsl ./teastart_minimal.sh
PAUSE
GOTO menu
:1
wsl ./teastart.sh start
PAUSE
GOTO menu
:2
wsl ./teastart.sh restart
PAUSE
GOTO menu
:3
wsl ./teastart.sh stop
PAUSE
GOTO menu
:4
wsl ./teastart.sh status
PAUSE
GOTO menu
:autostart_login
if exist TeaSpeak_autorun.bat (
ECHO Autostart script is already installed !
PAUSE
GOTO menu
) else (
ECHO Creating AutoStart file [BAT]
PING -n 2 127.0.0.1 > nul
)
ECHO @echo off >> TeaSpeak_autorun.bat
ECHO title TeaSpeak server Autorun [LoopMode]>> TeaSpeak_autorun.bat
ECHO COLOR 0E >> TeaSpeak_autorun.bat
ECHO ECHO Created by: Nessuno123 >> TeaSpeak_autorun.bat
ECHO ECHO For TeaSpeak.de >> TeaSpeak_autorun.bat
ECHO :loop_start >> TeaSpeak_autorun.bat
ECHO ECHO pinging localhost to count time: >> TeaSpeak_autorun.bat
ECHO ping -n 10 127.0.0.1 >> TeaSpeak_autorun.bat
ECHO ECHO Checking for TeaSpeak Server.. [Don't Close this window] >> TeaSpeak_autorun.bat
ECHO if exist tpid.pid ( >> TeaSpeak_autorun.bat
ECHO ECHO pinging localhost to count time: >> TeaSpeak_autorun.bat
ECHO ping -n 10 127.0.0.1 >> TeaSpeak_autorun.bat
ECHO ECHO ! SERVER OK ! >> TeaSpeak_autorun.bat
ECHO goto loop_start >> TeaSpeak_autorun.bat
ECHO ) else ( >> TeaSpeak_autorun.bat
ECHO echo TeaSpeak is down ! >> TeaSpeak_autorun.bat
ECHO echo Restarting... >> TeaSpeak_autorun.bat
ECHO wsl ./teastart.sh stop >> TeaSpeak_autorun.bat
ECHO wsl ./teastart.sh start >> TeaSpeak_autorun.bat
ECHO goto loop_start >> TeaSpeak_autorun.bat
ECHO ) >> TeaSpeak_autorun.bat
ECHO Creating script for shurtcut creation..
PING -n 1 127.0.0.1 > nul
ECHO Set oWS = WScript.CreateObject("WScript.Shell") >> TeaSpeak_autorun.vbs
ECHO sLinkFile = "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\TeaSpeak_autorun.lnk" >> TeaSpeak_autorun.vbs
ECHO Set oLink = oWS.CreateShortcut(sLinkFile) >> TeaSpeak_autorun.vbs
ECHO oLink.TargetPath = "%~dp0\TeaSpeak_autorun.bat" >> TeaSpeak_autorun.vbs
ECHO oLink.Save >> TeaSpeak_autorun.vbs
PING -n 1 127.0.0.1 > nul
cscript //Nologo //B TeaSpeak_autorun.vbs
DEL /Q /F TeaSpeak_autorun.vbs
ECHO Done !!
ECHO TeaSpeak server will start at every user's login !
PAUSE
GOTO menu
:ras
if exist TeaSpeak_autorun.bat (
DEL /Q /F "%~dp0\TeaSpeak_autorun.bat"
DEL /Q /F "%AppData%\Microsoft\Windows\Start Menu\Programs\Startup\TeaSpeak_autorun.lnk"
ECHO Autostart System Removed !
PAUSE
GOTO menu
) else (
COLOR 0C
ECHO ERROR: Autostart System not found !
PAUSE
GOTO menu
)
:auto_update
if exist tpid.pid (
COLOR 0C
ECHO ERROR: ! STOP YOUR TeaSpeak Server BEFORE THE UPDATE !
PAUSE
GOTO menu
) else (
ECHO Checking for TeaSpeak Last version...
wsl wget https://repo.teaspeak.de/server/linux/amd64_optimized/latest
ping -n 1 127.0.0.1 > nul
rename latest last.txt
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
ping -n 1 127.0.0.1 > nul
ECHO Preparing to download...
:set_variable
set /p last=<last.txt
ping -n 5 127.0.0.1 > nul
IF NOT DEFINED last GOTO set_variable
echo Ver: !last!
ping -n 2 127.0.0.1 > nul
ECHO DOWNLOADING:
wsl wget https://repo.teaspeak.de/server/linux/amd64_optimized/TeaSpeak-!last!.tar.gz
ECHO Extracting archive..
wsl tar -xzf TeaSpeak-!last!.tar.gz --overwrite
ECHO Deleting used files
DEL /Q /F TeaSpeak-!last!.tar.gz
DEL /Q /F last.txt
ENDLOCAL
ECHO .
ECHO !DONE - TeaSpeak is updated to the last version !
ECHO .
PAUSE
GOTO menu
)
:web
ECHO Opening website...
START https://teaspeak.de/
PAUSE
GOTO menu
:web_help
ECHO Opening website...
START https://forum.teaspeak.de/index.php?threads/teaspeak-in-windows-server-2019.2064/
PAUSE
GOTO menu
:current_version
if exist buildVersion.txt (
find "# Version: " buildVersion.txt
PAUSE
GOTO menu
) else (
COLOR 0C
ECHO ERROR: Unable to find your local version!
PAUSE
GOTO menu
)
:custom_update
if exist tpid.pid (
COLOR 0C
ECHO ERROR: ! STOP YOUR TeaSpeak Server BEFORE THE UPDATE !
PAUSE
GOTO menu
) else (
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
ECHO What TeaSpeak Server version do you desire ?
)
:set_variable_c
ECHO Set a version: (formatExample: 1.3.21-beta-9)
set /p custom=
ping -n 5 127.0.0.1 > nul
IF NOT DEFINED custom GOTO set_variable_c
ping -n 2 127.0.0.1 > nul
ECHO DOWNLOADING !custom! :
wsl wget https://repo.teaspeak.de/server/linux/amd64_optimized/TeaSpeak-!custom!.tar.gz
ECHO Extracting archive..
wsl tar -xzf TeaSpeak-!custom!.tar.gz --overwrite
ECHO Deleting used files
DEL /Q /F TeaSpeak-!custom!.tar.gz
ENDLOCAL
ECHO .
ECHO !DONE - TeaSpeak is updated to your selected version !
ECHO .
PAUSE
GOTO menu
:e
ECHO .
ECHO Script created by: Nessuno123
ECHO for teaspeak.de
ECHO .
PING -n 2 127.0.0.1 > nul
COLOR 0B
PING -n 2 127.0.0.1 > nul
COLOR 0D
PING -n 2 127.0.0.1 > nul
EXIT
use this file as control panel !

Features:
-Start
-Restart
-Stop
-AutoStart [User-Login] (have a loop controller to check if teaspeak server is live)
-Updater [AutoCheck for latest ver.]
-Custom Updater [Switch between TeaSpeak versions] formatExample= 1.3.21-beta-9



Have fun !
 
Last edited: