All Steam Game Servers in Docker -- Simple and Fast
I built a framework that lets me run any Steam dedicated server in Docker. Doesn't matter if the server runs natively on Linux or if it only exists as a Windows binary -- both work. Set it up once, and after that a single command handles starting, updating, and configuring.
The whole thing is open source and on GitHub. If you're interested, just grab it and give it a try.
What's This About?
I wanted a clean way to deploy game servers. Without starting from scratch every time. Without manually installing SteamCMD, setting up Wine, or piecing together config files.
The result is a Docker framework that has two parts:
A base image -- it contains everything you need: Debian, SteamCMD, Wine 11.0, a virtual display (Xvfb) for Windows servers, and a healthcheck system that knows whether the server is still updating or already running.
One repo per game -- with a Dockerfile, Docker Compose, and a few small hook scripts. Each repo works on its own. You clone it, adjust your settings, and start. Done.
Right now there are two servers running on it:
| Game | Platform |
|---|---|
| Palworld | Linux (native) |
| Windrose | Windows (via Wine) |
The images are available on Docker Hub and GitHub Packages -- you can pull from either:
# Docker Hub
docker pull rndmjoker/gameserver-steam-palworld:latest
# GitHub Container Registry
docker pull ghcr.io/rndmjoker/gameserver-steam-palworld:latest
Palworld is a native Linux server, Windrose runs as a Windows server headless via Wine. Both tested in production.
What Does the Framework Do for You?
- Automatic updates -- SteamCMD checks for updates on every start. You don't have to worry about it.
- Linux and Windows -- you just set
STEAM_PLATFORM=linuxorSTEAM_PLATFORM=windowsand everything else happens automatically. Wine, Xvfb, Mono, Gecko -- all included. - Configuration via environment variables -- no config files to edit. Anything you want to change, you set as a Docker variable.
- Retry on failure -- SteamCMD likes to fail on the first attempt. The framework automatically retries up to 3 times.
- Healthcheck -- Docker knows whether your server is running or still updating.
- Clean shutdown -- on SIGTERM everything shuts down properly, even Windows servers running through Wine.
- No root -- the container runs as a regular user.
How Does It Work Technically?
There are three layers:
| Layer | What's in it | How often does it change |
|---|---|---|
| Base Image | Debian + Wine + Xvfb + SteamCMD | Almost never |
| Game Image | App ID, binary, ports, hooks | Once per game |
| Runtime | Game data, configs, save games | On every start |
The base image controls the entire flow through an entrypoint. For game-specific stuff there are hook scripts that you simply place in your game repo:
| Hook | When | What for |
|---|---|---|
pre-setup.sh |
At the start | Load defaults |
post-config.sh |
After config generation | Copy configs where the game needs them |
post-update.sh |
After SteamCMD | Install mods |
pre-start.sh |
Before launch | Final preparations |
What happens on startup:
1. Load defaults
2. For Windows: set up Xvfb + Wine prefix
3. Generate config from your environment variables
4. SteamCMD: download or update the game
5. Start the server
What Do You Need?
- A Linux server (or local Linux machine) with Docker
- At least 8 GB RAM (16 GB is better)
- Docker and Docker Compose v2
If you don't have Docker yet:
curl -fsSL https://get.docker.com | sh
How to Set It Up
Build the Base Image
You build the base image once. After that, all your game servers use it.
git clone https://github.com/RndmJoker/gameserver-steam-basic.git steam-basic
cd steam-basic/base
docker build -t steam-server-base:wine-11.0 -t steam-server-base:latest .
Takes about 5-10 minutes. After that you have an image that contains everything.
Start an Existing Game Server
If a server already exists, you don't need to build anything. Just create a docker-compose.yml:
mkdir palworld-server && cd palworld-server
services:
palworld:
# Docker Hub:
image: rndmjoker/gameserver-steam-palworld:latest
# Or from GitHub Container Registry:
# image: ghcr.io/rndmjoker/gameserver-steam-palworld:latest
container_name: palworld-server
restart: unless-stopped
network_mode: host
mem_limit: 12g
volumes:
- serverdata:/home/steam/serverdata
- serverconfig:/home/steam/serverconfig
environment:
- ServerName=My Server
- AdminPassword=secure-password
volumes:
serverdata:
serverconfig:
docker compose up -d
docker compose logs -f
The image gets pulled, the game server downloaded, the config generated, and the server started. On the next restart it just checks if there's an update.
Build Your Own Game Server
If you want to work on the code yourself, clone the repo and build locally:
git clone https://github.com/RndmJoker/gameserver-steam-palworld.git steam-palworld
cd steam-palworld
cp .env.example .env
nano .env
docker compose up -d --build
Create a Completely New Server
For a game that doesn't exist yet, I've built a CLI tool:
cd steam-basic
./tools/create-server.sh vrising 1829350 windows VRisingServer.exe 9876 udp 4g
This generates a ready-to-go directory with Dockerfile, Docker Compose, hooks, and config templates. You just need to fill in the game-specific settings and adjust the hooks.
Networking and Firewall
All servers run in host network mode -- Docker uses your server's network directly. No port mapping, no NAT issues.
If you have an external firewall (most hosting providers do), you need to open the game ports there yourself. Docker doesn't do that automatically in host mode.
Data and Backups
Everything sits on Docker volumes and persists -- even if you rebuild or update the container.
| Volume | Path | Content |
|---|---|---|
serverdata |
/home/steam/serverdata |
Game files and save games |
serverconfig |
/home/steam/serverconfig |
Configs |
SteamCMD works incrementally. A restart without a game patch only takes a few seconds.
Links
- GitHub: github.com/RndmJoker/gameserver-steam-basic
- Docker Hub: hub.docker.com/u/rndmjoker
- License: MIT
Every new game server that gets added will get its own article here, covering setup, settings, and troubleshooting in detail.
If you have questions, need a server for a specific game, or just want to leave feedback, feel free to reach out via the contact form.