2023-10-08 20:47:47 +00:00

2023-10-08 20:08:31 +00:00
2023-10-08 20:47:47 +00:00
# Tribes 2 Server Setup Guide by ChocoTaco
2023-10-08 20:08:31 +00:00
## A guide for setting up a Tribes 2 server via vps, ssh, and vnc
---
Discord: [Tribes 2 Discord ](https://discord.gg/Y4muNvF )
2023-10-08 20:54:33 +00:00
2023-10-08 20:55:11 +00:00
Tacoserver: [Tacoserver Github ](https://github.com/ChocoTaco1/TacoServer )
2023-10-08 20:08:31 +00:00
2023-10-08 20:37:37 +00:00
---
2023-10-08 20:08:31 +00:00
### Target Environment
2023-10-08 20:11:44 +00:00
- This guide is for Debian 12 (Bookworm)
2023-10-08 20:08:31 +00:00
- This could probably work on other distros varying packages and commands
2023-10-08 20:37:37 +00:00
---
2023-10-08 20:08:31 +00:00
### Choosing a host
- Any VPS host could probably run a t2 server depending on how much you want to pay...
- Vultr is probably to easiest to use - https://www.vultr.com/
- Linode probably a great option too (Now Akamai) - https://www.linode.com/
2023-10-08 20:11:44 +00:00
- GCE (Google Compute Engine) being probably the more difficult option - https://cloud.google.com/compute/
- I'm sure there's others
2023-10-08 20:08:31 +00:00
2023-10-08 20:37:37 +00:00
---
2023-10-08 20:24:14 +00:00
### Connecting to your vps
2024-10-19 19:36:33 +00:00
- SSH as root into your vps (Your root password can usually be found on your host vps website): https://www.linode.com/docs/guides/connect-to-server-over-ssh-on-windows/
2023-10-08 20:37:37 +00:00
- In Linux use
2023-10-08 20:08:31 +00:00
2023-10-08 20:37:37 +00:00
ssh root@ip.address -L 5901:localhost:5901
---
2023-10-08 20:08:31 +00:00
### Setting up Debian
2023-10-08 22:08:24 +00:00
- Once youre in... make a user and set a password. Change `t2server` as whatever username you want...
2023-10-08 22:07:46 +00:00
2023-10-08 20:08:31 +00:00
adduser t2server
2023-10-08 22:07:46 +00:00
- Then...
2023-10-08 20:08:31 +00:00
usermod -aG sudo t2server
2023-10-08 23:03:35 +00:00
- Update packages
2023-10-08 20:11:44 +00:00
sudo apt update & & sudo apt upgrade
2023-10-08 20:08:31 +00:00
2023-10-08 20:13:41 +00:00
---
2023-10-08 20:11:44 +00:00
# Log out as root and log back in as t2server or your newly created user. This is very important...
2023-10-08 20:13:41 +00:00
---
2023-10-08 20:08:31 +00:00
2023-10-08 20:11:44 +00:00
- Install desktop
2023-10-08 20:13:41 +00:00
2023-10-08 20:11:44 +00:00
sudo apt install xfce4 xfce4-goodies tightvncserver xfonts-base firefox-esr synaptic file-roller git winetricks htop curl zenity
2023-10-08 20:08:31 +00:00
2023-10-08 20:11:44 +00:00
- Start vnc server, make password...8 characters
2023-10-08 20:13:41 +00:00
2023-10-08 20:11:44 +00:00
vncserver
2023-10-08 20:08:31 +00:00
2023-10-08 20:11:44 +00:00
- Kill vnc server
2023-10-08 20:13:41 +00:00
2023-10-08 20:11:44 +00:00
vncserver -kill :1
2023-10-08 20:08:31 +00:00
2023-10-08 20:11:44 +00:00
- Open vnc config file
2023-10-08 20:13:41 +00:00
2023-10-08 20:11:44 +00:00
nano ~/.vnc/xstartup
2023-10-08 20:08:31 +00:00
2024-10-20 00:54:22 +00:00
- Copy this inside xstartup at the end, `ctrl-o` save, `ctrl-x` to exit. This says to start our desktop when we start our vnc
2023-10-08 20:13:41 +00:00
2023-10-08 20:11:44 +00:00
#!/bin/bash
xrdb $HOME/.Xresources
startxfce4 &
2023-10-08 20:08:31 +00:00
2023-10-08 20:19:19 +00:00
- Repair permissions
sudo chmod +x ~/.vnc/xstartup
---
### Installing WINE
- Install the wine repo by following the directions here: https://wiki.winehq.org/Debian
2024-10-19 18:32:59 +00:00
sudo dpkg --add-architecture i386 & &
sudo mkdir -pm755 /etc/apt/keyrings & &
sudo wget -O /etc/apt/keyrings/winehq-archive.key https://dl.winehq.org/wine-builds/winehq.key & &
2024-10-19 18:54:15 +00:00
sudo wget -NP /etc/apt/sources.list.d/ https://dl.winehq.org/wine-builds/debian/dists/bookworm/winehq-bookworm.sources & &
sudo apt update
2023-10-08 20:19:19 +00:00
2024-10-19 18:52:29 +00:00
- This will install wine-development, typically theres no issues.
2023-10-08 20:19:19 +00:00
2024-10-19 18:52:29 +00:00
sudo apt install --install-recommends winehq-stable
- If you want the development branch install `winehq-devel`
2023-10-08 20:19:19 +00:00
### Get all the files
2023-10-08 20:31:28 +00:00
- Download:
2023-10-08 20:19:19 +00:00
wget https://www.the-construct.net/downloads/tribes2/tribes2gsi.exe & &
wget https://www.tribesnext.com/files/TribesNext_rc2a.exe & &
wget https://tribes2stats.com/files/mods/classic_v152.zip & &
git clone https://github.com/ChocoTaco1/TacoServer & &
git clone https://github.com/ChocoTaco1/TacoMaps & &
wget https://www.dropbox.com/s/bvh9631a4mtuisf/msvcrt-ruby190.zip & &
wget https://www.dropbox.com/s/tt4utbqkzh791y8/SetPerfCounter.zip
---
2023-10-08 20:43:59 +00:00
### Start your VNC Server
2023-10-08 20:49:50 +00:00
- Change `1800x950` to be whatever resolution you want
2023-10-08 20:19:19 +00:00
vncserver -geometry 1800x950
2023-10-08 20:43:59 +00:00
- Use Real VNC for windows - https://www.realvnc.com/en/
- Use Reminna for linux - https://remmina.org/
- Setup to use `localhost:5901` while youre logged into the server using ssh. Enter your 8 character vnc password. You should be greeted with a Debian desktop.
2023-10-08 20:19:19 +00:00
---
### Setup T2
2024-10-19 19:36:33 +00:00
- Install T2 in wine (Typically installs to `/home/t2server/.wine/drive_c/Dynamix` ).
2023-10-08 20:19:19 +00:00
wine Tribes2gsi.exe
- Install Tribesnext_rc2a
wine TribesNext_rc2a.exe
- Update Classic to 1.5.2 (1.0 is included in Tribes2gsi) Just delete classic folder in Gamedata and extract classic 1.5.2 there
- Extract TacoServer to Classic (Overwriting any existing files)
- Extract Tacomaps to Classic/maps/
- Extract msvcrt-ruby190 to Gamedata (Overwriting any existing files)
- Extract Perf Counter to Classic/scripts/autoexec (This locks server to HighPerformanceCounter=0)
2023-10-08 21:07:10 +00:00
---
2023-10-08 20:19:19 +00:00
2023-10-08 21:08:09 +00:00
- Optional: Download Loop's sha1 fix (Extract Server.dll and wine-injector to GameData Folder, put t2csri_serverside_looped.cs in Gamedata/Classic/scripts/autoexec)
2023-10-08 20:19:19 +00:00
2024-10-20 04:56:25 +00:00
wget https://www.dropbox.com/scl/fi/gu5eixt8q078fnweahov3/t2-auth-faster.zip?rlkey=gy4u4789ylfhvr1iqi2zp30bz& st=ka7s1r74
2023-10-08 20:19:19 +00:00
2023-10-08 21:08:09 +00:00
- Loop's fix requires vcrun22 to work...
2023-10-08 20:19:19 +00:00
winetricks -q --force vcrun2022
---
### Firewall (Optional)
2023-10-08 20:32:12 +00:00
- Install iptables
2023-10-08 20:19:19 +00:00
sudo apt install iptables iptables-persistent
- Make sure iptable ports are open
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT -p udp --dport 80 -j ACCEPT
sudo iptables -I INPUT -p tcp --dport 28000 -j ACCEPT
sudo iptables -I INPUT -p udp --dport 28000 -j ACCEPT
- Also make sure ports are open within the host service youre using with their firewall. Make sure to open port 22 for your ssh port as well.
2023-10-08 20:08:31 +00:00
2023-10-08 20:27:57 +00:00
---
2023-10-08 20:24:14 +00:00
### Starting the Server
2023-10-08 20:29:36 +00:00
- Start t2 server (without loop's fix)
2023-10-08 20:24:14 +00:00
taskset -c 0 wineconsole Tribes2.exe -dedicated -mod Classic
2023-10-08 20:29:36 +00:00
- Start t2 server (with loop's fix)
2023-10-08 20:24:14 +00:00
taskset -c 0 wine wine_injector.exe Server.dll Tribes2.exe 28000 -dedicated -mod Classic
2023-10-08 21:00:27 +00:00
- `taskset -c 0` is locking the server process to one cpu only
2023-10-08 20:24:14 +00:00
2023-10-08 20:27:57 +00:00
---
2023-10-08 20:26:41 +00:00
### Using a bash script
2023-10-08 20:47:11 +00:00
- Ideally you can start your server with a bash script `ie: sh startserver.sh`
2023-10-08 20:24:14 +00:00
#!/bin/sh
BASEDIR=/home/t2server/.wine/drive_c/Dynamix/Tribes2/GameData/
cd ${BASEDIR}
while true; do
echo "Waiting 30 seconds for all wine processes to close..."
sleep 30
wineserver -k9 & & killall wine & & kill $(lsof -t -i:28000) & & kill $(lsof -t -i:80) & & killall winedevice.exe
echo "Removing dsos..."
find ${BASEDIR} -name \*.dso -execdir /bin/rm {} \;
echo "Starting Tribes2 server..."
WINEDEBUG=-all,-fixme taskset -c 0 wineconsole Tribes2.exe -dedicated -mod Classic
done
2023-10-08 21:04:31 +00:00
- Update the start command with whatever you choose to use regarding loop's fix
2023-10-08 20:35:10 +00:00
2024-10-19 18:47:20 +00:00
- You can create a shortcut to this start server script by right-clicking on the desktop and choosing create a launcher
2024-10-20 04:56:25 +00:00
Name: Start Server | Command: sh /home/t2server/startserver.sh | Click "Start in Terminal"
2024-10-19 18:47:20 +00:00
2023-10-08 20:27:57 +00:00
---
2023-10-08 20:24:14 +00:00
### Other Things
2024-10-19 18:48:23 +00:00
- For security you can use an ssh key to login
2024-10-19 18:47:20 +00:00
2024-10-19 18:48:23 +00:00
- Make sure to use Vultr Firewall or something to lock down all ports except 80, 28000, and 22 (ssh)
2024-10-19 18:47:20 +00:00
2023-10-08 20:24:14 +00:00
- Adding an ftp server can also help with file management, granted you locked down the ports
2024-10-20 00:54:22 +00:00
- Higher Priorty: To allow your user to set a higher priority use add at the end of... (I wouldnt recommend this on shared cpus)
2023-10-08 20:24:14 +00:00
sudo nano /etc/security/limits.conf
@t2server - nice -20
2024-10-20 00:54:22 +00:00
New startup would be something with `nice -n -5` added...
2023-10-08 20:24:14 +00:00
nice -n -5 taskset -c 0 wineconsole Tribes2.exe -dedicated -mod Classic
2023-10-08 20:26:41 +00:00
2023-10-08 20:28:48 +00:00
---
2025-08-25 03:36:11 +00:00
### Post Preview Patch
2025-08-25 03:56:22 +00:00
- Updating a server to the newly released preview:
2025-08-25 03:39:11 +00:00
2025-08-25 03:57:17 +00:00
Visit Thread: https://tribesnext.com/forum/discussion/4430/preview-qol-fixes-update
2025-08-25 03:56:22 +00:00
Back up your server T2 folder
Download the latest release
2025-08-25 03:59:03 +00:00
Use wine `TribesNEXT_XXXXXXXXX_preview.exe` to initiate the installer for wine
Or in windows execute the exe
2025-08-25 03:56:22 +00:00
Install to your server T2 GameData folder
2025-08-28 04:44:15 +00:00
If you're using Loops fix or anything like that, remove it from the launch parameters and t2csri_serverside_looped.cs from autoexec
2025-09-12 22:18:16 +00:00
When you patch make sure `T2csri.vl2` updates. Its around 1.3mb
2025-08-25 03:36:11 +00:00
2025-08-25 03:56:22 +00:00
- To take advantage of extra bandwidth set,
2025-08-25 03:39:11 +00:00
2025-09-10 01:41:14 +00:00
$pref::Net::PacketRateToClient = "64";
$pref::Net::PacketSize = "1000";
2025-08-25 03:36:11 +00:00
2025-08-25 03:56:22 +00:00
- To prevent the new UE box from popping up set,
2025-08-25 03:39:11 +00:00
2025-08-25 03:36:11 +00:00
$pref::Engine::ExitOnException = true;
2025-08-25 03:56:22 +00:00
- If you don't want the linux icon showing up use
2025-08-25 03:39:11 +00:00
2025-08-25 03:36:11 +00:00
$Host::Linux = 0;
2025-08-25 03:56:22 +00:00
- Loadingscreen Safeguards:
2025-08-25 03:50:57 +00:00
2025-08-25 03:38:26 +00:00
To ensure clients dont get stuck on the loading screen these changes need to be made
2025-08-25 04:00:22 +00:00
https://github.com/ChocoTaco1/TacoServer/commit/7cd1cb8815e19990ab5a0cf632aedc82726333ed
2025-08-25 03:36:11 +00:00
2025-08-25 03:56:22 +00:00
---
2025-08-25 03:36:11 +00:00
2023-10-08 20:26:41 +00:00
# Success!
2023-10-08 21:02:26 +00:00
## If everything is setup correctly your server should show up on the master server within a few minutes
2023-10-08 20:27:57 +00:00
Good Luck!