Skip to content

A base docker image for making self-installing, self-running game servers

Notifications You must be signed in to change notification settings

Ethorbit/steamcmd-server-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

build issues

steamcmd-server

A Docker image based on steamcmd designed for self-installing game servers. Server images can have their own App ID, start and update scripts.

See the existing implementations

Creating container from existing server image

make build

docker run -it --rm -e START_ARGS="" -p 27015:27015/tcp -p 27015:27015/udp -v myserver:/home/steam/Steam/steamapps/common <server image>

Add -e STEAMCMD_LOGIN_USERNAME=username-here and interactively login on first run if you get a susbcription or owner error.

You can also look for pre-built images here.

Creating new server image

Steps

  • Create a new game directory inside servers/ (this doubles as the image name)
  • Build everything: make build
  • Test it: image=<name here> make test
  • If a login error is received during testing, test using a Steam account that owns the content: image=<name here> options='-e STEAMCMD_LOGIN_USERNAME=yoursteamname' make test
  • Upload changes by changing the Makefile's docker_user to match your DockerHub username and running: make push
  • Create a pull request to add the image to this repo.

Environment variables

These variables should be used whereever possible.

  • USER
  • HOME_DIR
  • STEAMCMD_DIR - where steamcmd binaries are
  • SERVERS_DIR - where the server(s) that are installed go
  • SERVER_DIR - the server that is going to run
  • SHARED_DIR - shared directory, symlinks are automatically created to point to these files in the SERVERS_DIR
  • IMAGE_DIR - where files baked into the server image are (like a start or update script), they are copied to SERVER_DIR on container start
  • STEAMCMD_LOGIN_USERNAME - the steam username of the account that owns the game
  • STEAMCMD_UPDATE_SCRIPT - txt update file using steamcmd update syntax
  • STEAMCMD_APPEND_SCRIPT - txt update file that is appended to the default txt file (instructions are run after login)
  • UPDATE_SCRIPT - shell script that executes STEAMCMD_UPDATE_SCRIPT
  • START_SCRIPT - shell script to start the game server
  • START_ARGS - arguments of the server executable which would be read in START_SCRIPT
  • APP_ID - game server's appid

About

A base docker image for making self-installing, self-running game servers

Topics

Resources

Stars

Watchers

Forks