Deus Ex Docker Container
This Docker container runs a Deus Ex (1.112fm) multiplayer dedicated server. It is built on the WINE image and runs the retail game in its dedicated server mode, DeusEx.exe -server. The container doesn't download the game, so you provide the files.
Quick Start
services:
deusex:
image: lancommander/deusex:latest
container_name: deusex
ports:
- 7790:7790/udp
- 7791:7791/udp
- 8777:8777/udp
volumes:
- "/data/Servers/Deus Ex/Deathmatch:/config"
environment:
DX_SERVER_NAME: "My Deus Ex Server"
DX_MAP: "DXMP_Cathedral"
DX_GAME_TYPE: "DeusEx.DeathMatchGame"
DX_ADMIN_PASSWORD: "changeme"
DX_MAPS: "DXMP_Cathedral,DXMP_Smuggler,DXMP_Silo,DXMP_Area51Bunker,DXMP_CMD"
DX_MAP_CYCLE: "loop"
user: root
cap_add:
- SYS_ADMIN
security_opt:
- apparmor:unconfined
restart: unless-stopped
Copy a Deus Ex 1.112fm install (the folder with System/DeusEx.exe and Maps/) into Server/ before the first start. You can instead set DX_ARCHIVE_URL to a zip of that folder.
How It Starts
PostInitialization/10-InitializeWinePrefix.ps1(from the WINE image) creates the Wine prefix in/config/wineprefix.PostInitialization/20-InstallDeusEx.ps1checks forServer/System/DeusEx.exe. If it's missing andDX_ARCHIVE_URLis set, the hook downloads the archive, extracts the folder that holdsSystem/DeusEx.exe, and remounts the overlay.PostInitialization/30-ConfigureDeusEx.ps1copiesSystem/Default.initoSystem/Server.ini(DX_INI) if it doesn't exist yet. It does this throughMerged/, so the file lands inOverlay/System/. It then writes the non-emptyDX_*settings into it, sets the map rotation, and removes the GameSpy master server uplinks.START_EXE(/usr/local/bin/dx-server) deletes a staleSystem/Running.iniand runsDeusEx.exe <DX_MAP>?game=<DX_GAME_TYPE> -server ini=Server.ini log=server.logfromSystem/under Wine and Xvfb. This is the command line the game's own Host Game > Dedicated menu uses.
The server prints nothing to docker logs after Wine starts. Its log is System/server.log (in Overlay/), and the engine only writes it out in chunks (on map changes and on exit), so it is often empty or behind. Check that the server is up with a query instead (below).
Configuration Options
Ports
- 7790/udp: Game (
DX_PORT) - 7791/udp: Server query, GameSpy protocol (game port + 1).
\status\returns the name, map, game type, version (gamever 1100), player count and rules (SkillsAvail,KillsToWin...). - 8777/udp: LAN beacon. The in-game LAN browser broadcasts
REPORTQUERYhere, and the server repliesDeusEx 7791.
Environment Variables
See the README for the full table.
Server ini
Overlay/System/Server.ini is yours to edit. Only the keys that have a non-empty DX_* variable are rewritten on start. Delete the file to regenerate it from Default.ini.
- Server info:
[Engine.GameReplicationInfo](ServerName,AdminName,MOTDLine1...). MaxPlayers,MaxSpectators,GamePasswordandAdminPasswordare in[Engine.GameInfo]. They apply to every game type.- Game rules:
[DeusEx.DeusExMPGame]VictoryCondition(Frags/Time),ScoreToWin,SkillsTotal,SkillsAvail,SkillsPerKill,InitialAugs,AugsPerKill,MPSkillStartLevel,fFriendlyFireMult. Basic and Advanced Team Deathmatch ignore these and use fixed values. - Map rotation:
[DeusEx.DXMapList]Maps[0]..Maps[31],CycleType(0 repeat, 1 random, 2 loop) andMapNum(the current position, saved by the game). AnyMaps[n]slot missing from the ini falls back to the built-in list (Silo, Area51Bunker, Cathedral, Cmd, Smuggler), soDX_MAPSalways writes all 32 slots.
The game saves its config back to the server ini on every map change (the full map list, MapNum and so on show up there after the first change).
Hooks
| Hook | When |
|---|---|
PreInstallDeusEx / PostInstallDeusEx | Around the game file check/download |
PreInitializeWinePrefix / PostInitializeWinePrefix | Around Wine prefix creation (WINE image) |
Put .ps1 scripts in config/Scripts/Hooks/<HookName>/.
Troubleshooting
- Nothing in
docker logs/ emptyserver.log: expected, see How It Starts. Query port 7791 with\status\to check the server. - Server not in the LAN browser: the browser finds servers by UDP broadcast to 8777, so the container needs its own LAN address (macvlan/ipvlan) or host networking. Joining by IP works through port mapping.
- Joining by IP: the client's default port is 7790. With another
DX_PORT, join withopen <ip>:<port>from the console. - Clients can't join / version mismatch: the server reports
gamever 1100andminnetver 1100. Clients need 1.112fm. - Settings ignored: they go into
DX_INI, notDeusEx.iniorDefault.ini. CheckOverlay/System/Server.ini. Victory, skill and aug settings have no effect in Basic and Advanced Team Deathmatch. - Rotation includes maps you didn't list: a hand-edited
[DeusEx.DXMapList]with fewer than 32Maps[n]lines is padded with the built-in list. Set the unused slots to empty (Maps[5]=) or useDX_MAPS. DX_MASTER_SERVER_UPLINK=truehas no effect on an existing ini: the uplink server actors were removed from it on an earlier start. AddServerActors=IpServer.UdpServerUplink MasterServerAddress=... MasterServerPort=27900back under[DeusEx.DeusExGameEngine], or delete the ini.System/DeusEx.exe not found:Server/must contain the game folder itself (Server/System/DeusEx.exe), not a folder that contains it.- Exits right after Wine starts:
DeusEx.exeneeds a display. LeaveWINE_XVFBatauto(ortrue) unless you provide aDISPLAY.