Run a Steam powered Windows game server in Docker.
- Visual Studio Code (optional)
- Docker
Unless the game you are attempting to run was purchased on the Steam marketplace authentication should not be necessary so you can omit the Game configuration arguments in the docker build
command below. In cases you do need to authenticate, on first build attempt a Steam Guard code is generated which is sent to you by either e-mail or SMS. Due to this, you must update the command below to include the GUARDCODE
value and re-run the build process within 30 seconds of receiving the message.
$ docker build -t steamcmd . --build-arg USERNAME=<steam-username> --build-arg PASSWORD=<steam-password> --build-arg GUARDCODE=<steam-guard-code> --build-arg APPID=<steam-appid> --build-arg RUNCMD=<command>
$ docker run -d --network host steamcmd
$ docker exec -it <container-id> /bin/bash
--build-arg |
Description |
---|---|
USERNAME | Steam account Username (optional) |
PASSWORD | Steam account Password (optional) |
GUARDCODE | Steam Guard code (optional) |
APPID | Steam application ID |
RUNCMD | Commands to run in the app directory. |
HEADLESS | yes | no (default: yes) |
RDP_SERVER | yes | no (default: no) |
RDP_PASSWD | System account Password (default: games ) |
In the VS Code Command Palette choose "Open Folder in Container" which will launch the server in a Docker container allowing for realtime development and testing.
By default, a Miscreated Dedicated Server will be launched. To change the game edit the VS Code devcontainer.json
and rebuild the Docker container.
The following command can be executed within the Docker container:
$ service game-server {start|stop|restart}
In cases where you have an existing game set-up (e.g. configuration, database, workshops) you can synchronize these items during the game installation process by adding them to the /files
directory. Mirroring that of the existing game directory, files that already exist will be overwritten.
The most likely culprit to the "I cannot find my server.." issue is one of the following:
- Your router NAT has limited support for UPnP (Universal Plug and Play) which results in game loopback requests being denied. To resolve this you must manually configure port range forwarding in your router to mirror the TCP/UDP ports exposed by the game server. This will ensure routing to your game server occurs within the network.
- Your game server binds to the server internal IP vs router external (public) address. To resolve this you must add an IP alias to your server network device (see below). Once complete, you *may need to configure the game to launch using that same address thereby ensuring the correct IP is broadcasted to the game network.
(*) Entirely dependent on your network set-up (e.g. corporate vs home) and in most cases is not required.
$ sudo ip a add <ip-address>/24 dev <interface-name>
$ sudo echo "<ip-address> localhost" >> /etc/hosts
If the container was started with RDP_SERVER=yes
you can make a remote desktop connection using a client-side application supported by your operating system.
Application | Operating System |
---|---|
Microsoft Remote Desktop | Android |
Microsoft Remote Desktop | OSX, iOS |
Microsoft Remote Desktop | Windows |
Reminna Remote Desktop Client | Linux |
Unless RDP_PASSWD
has been defined, you can login to the server using the following account information:
Username: games
Password: games
- Database of everything on Steam
- Runtime options with Memory, CPUs, and GPUs
- Required Ports for Steam
If you fix a bug, or have a code you want to contribute, please send a pull-request with your changes.
This package is maintained under the Semantic Versioning guidelines.
This package is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.
docker-steamcmd-wine is provided under the terms of the MIT license
Steam is a registered trademark of Valve Corporation.