Starsiege: Tribes Docker Container
This Docker container runs a Starsiege: Tribes dedicated server. It is built on the WINE image and runs the Windows game's -dedicated mode under Wine and Xvfb. The container doesn't download the game, so you provide the files.
Quick Start
services:
tribes:
image: lancommander/tribes:latest
container_name: tribes
ports:
- 28001:28001/udp
volumes:
- "/data/Servers/Starsiege - Tribes/CTF:/config"
environment:
TRIBES_MISSION: "Raindance"
TRIBES_SERVER_NAME: "My Tribes Server"
user: root
cap_add:
- SYS_ADMIN
security_opt:
- apparmor:unconfined
restart: unless-stopped
Before the first start, copy a Tribes install into Server/, so that Server/Tribes.exe and Server/base/ exist. The community 1.40/1.41 release is recommended; clients must run the same version. You can instead set TRIBES_ARCHIVE_URL to a zip of the game folder.
How It Starts
PostInitialization/10-InitializeWinePrefix.ps1(from the WINE image) creates the Wine prefix in/config/wineprefix.PostInitialization/20-InstallTribes.ps1checks forServer/Tribes.exe. If it's missing andTRIBES_ARCHIVE_URLis set, the hook downloads and extracts the archive and remounts the overlay.PostInitialization/30-ConfigureTribes.ps1writesconfig/lancommander.cswith the non-emptyTRIBES_*settings and$Console::LogMode = 1;(turns onconsole.log). It also writesconfig/lancommanderAdmins.csand adds a line toconfig/Server/adminpasswords.csthat executes it.START_EXE(/usr/local/bin/tribes-server) streamsconsole.logand runsTribes.exe [-mod <mod>]... +exec lancommander.cs [START_ARGS] -dedicated <TRIBES_MISSION>under Wine and Xvfb.
The game's console.cs loads config/Server/serverDefaults.cs and config/Server/ServerPrefs.cs, then the +exec files, then creates the server. A successful start ends with:
Executing missions/Raindance.mis.
...
Dedicated Server Initialized
Configuration Options
Ports
- 28001/udp: Game, server queries and LAN browser (
TRIBES_PORT)
Environment Variables
See the README for the full table.
Missions and map packs
The mission name is the .mis file name without the extension, from any missions/ folder on the game's search path. The game type (CTF, Capture and Hold, Deathmatch ...) comes from the mission. The server cycles through missions of the same type.
Many community installs, including the 1.41 release, add map packs (lt/, dox/, opencall/ ...) to the search path in console.cs. Their missions work without -mod; set TRIBES_MISSION to e.g. BastardForgeLT. Use TRIBES_MOD only for script mods that ship a <mod>/<mod>.cs.
Server and admin config
config/Server/ServerPrefs.cs, serverDefaults.cs, adminpasswords.cs and adminlevels.cs are in your install and yours to edit (changes land in Overlay/). A setting that also has a non-empty TRIBES_* variable is overwritten on start. Don't edit config/lancommander.cs or config/lancommanderAdmins.cs, because they are regenerated on every start.
TRIBES_ADMIN_PASSWORD adds an "Owner Admin" login. Add more admins with admin::addadmin("Name", "password", "<level>"); lines in adminpasswords.cs. Clients log in from the in-game admin menu or the console (remoteEval(2048, AdminPassword, "password");).
Hooks
| Hook | When |
|---|---|
PreInstallTribes / PostInstallTribes | Around the game file check/download |
PreInitializeWinePrefix / PostInitializeWinePrefix | Around Wine prefix creation (WINE image) |
Put .ps1 scripts in config/Scripts/Hooks/<HookName>/.
Troubleshooting
wine: Unhandled page fault on read access to ... at address 00561390right after start: the server ran without a display.Tribes.exeneeds a window system even with-dedicated, so keepWINE_XVFB=true.- The server exits right after
Starting: Tribes.exe -mod <name> ...with no console output: the-modfolder is not a script mod. Map packs on the search path (lt,dox,opencall... in the 1.41 release) must not be loaded with-mod; clearTRIBES_MOD. - Server not in the LAN browser: the browser finds servers by UDP broadcast, so the container needs its own LAN address (macvlan/ipvlan) or host networking. Clients can join by IP through port mapping (
IP:<address>:28001). - Admin password doesn't work: it needs
config/Server/adminpasswords.cs(1.40/1.41 admin scripts). With older versions, the hook logs a warning and ignoresTRIBES_ADMIN_PASSWORD. - The first lines of the console are missing from
docker logs: logging only starts whenconfig/lancommander.csruns, after the game has loaded its scripts and prefs. cursorOn: MainWindow is not a valid SimGui::Canvas,exec: invalid script file .cs.: harmless; the dedicated server runs client UI calls and an empty mod script name.- No console commands: the dedicated console reads from its own Win32 console, not
docker attach. Use the in-game admin menu.