Soldat Docker Container
This Docker container runs a Soldat dedicated server. It is built on the base image and runs the official SoldatServer 2.8.2 for game 1.7.1.1 (the non-Steam Linux build). The server package includes its maps, so you don't need to supply game files.
Quick Start
services:
soldat:
image: lancommander/soldat:latest
container_name: soldat
ports:
- 23073:23073/udp
- 23073:23073/tcp
- 23083:23083/tcp
volumes:
- "/data/Servers/Soldat/CTF:/config"
environment:
SOLDAT_SERVER_NAME: "My Soldat Server"
SOLDAT_GAME_TYPE: "ctf"
SOLDAT_ADMIN_PASSWORD: "changeme"
user: root
cap_add:
- SYS_ADMIN
security_opt:
- apparmor:unconfined
restart: unless-stopped
How It Starts
PostInitialization/20-InstallSoldat.ps1downloadsSOLDAT_SERVER_URLifServer/soldatserveris missing or the URL changed, checksSOLDAT_SERVER_SHA256, unpacks the folder holdingsoldatserverintoServer/and remounts the overlay.PostInitialization/30-ConfigureSoldat.ps1writes the non-emptySOLDAT_*settings intosoldat.iniand the map rotation intomapslist.txt. It does this throughMerged/, so both files land inOverlay/.START_EXE(/usr/local/bin/soldat-server) runs./soldatserver -p <SOLDAT_PORT>fromMerged/, underscriptso that its console output reachesdocker logsstraight away.
A successful start ends with:
Welcome to Soldat 1.7.1
Server name: Soldat Server
...
ctf_Ash by chakapoko maker
Server IP: 0.0.0.0 Port: 23073
Connection for file server started. Port: 23083
Configuration Options
Ports
- 23073/udp: Game (
SOLDAT_PORT). WithSOLDAT_LAN=falsethe lobby and All-Seeing Eye registration use this port too (Registering server @ ...in the log). - 23073/tcp: Admin console for the Soldat Admin program (same port number). It is only open when
SOLDAT_ADMIN_PASSWORD(orAdmin_Password) is set. - 23083/tcp: Map and file downloads for clients (game port + 10).
Environment Variables
See the README for the full table.
soldat.ini and mapslist.txt
Overlay/soldat.ini is yours to edit. Only the keys that have a non-empty SOLDAT_* variable are rewritten on start. server.ini holds the less common options (team-kill bans, scripting).
GameStyle(0 DM, 1 PM, 2 TM, 3 CTF, 4 RM, 5 INF, 6 HTF) and every mode's limit are in[GAME].SOLDAT_SCORE_LIMITgoes into the limit key of the selected game type only.mapslist.txtis rewritten on every start: fromSOLDAT_MAPS, or with every installed map for the game type (ctf_*,inf_*,htf_*, or the unprefixed maps for DM/PM/TM/RM). SetSOLDAT_MAPS=keepto editOverlay/mapslist.txtby hand. Add custom maps asOverlay/maps/<name>.pms.- Logs are in
Overlay/logs/(consolelog-*.txt,log-*.txt,kills/).
Admin console
Connect with Soldat Admin (or any TCP client) to port 23073, send the admin password as the first line, then server commands such as /map ctf_Run, /nextmap, /addbot Kruger or /kick <name>.
Hooks
| Hook | When |
|---|---|
PreInstallSoldat / PostInstallSoldat | Around the server download |
Put .ps1 scripts in config/Scripts/Hooks/<HookName>/.
Troubleshooting
- Clients can't join / version mismatch: the server is 1.7.1 (SoldatServer 2.8.2). Older 1.6 clients can't join. The Steam client checks for a Steam-authenticated server; this image is for the non-Steam client.
[WARNING] Can't keep up, tick took 14831600msright after start: the first tick is measured from an uninitialized timer. It is harmless.- The time limit ends with nobody on the server: Soldat's clock runs without players, so an empty server keeps changing maps.
- No bots join:
Random_Botsdidn't add bots to an empty test server, and neither did/addbotfrom the admin console. Whether bots join once a player is on is untested. Map ... is not installed; left out of the rotation: the map isn't inmaps/as<name>.pms. Names are case-insensitive; the.pmsextension is optional.- Admin console refuses connections: set
SOLDAT_ADMIN_PASSWORD; the server doesn't listen on TCP 23073 without an admin password.