Run a KZ server in a Docker container!
The base of this image is a SteamCMD image maintained by Tim Cheung. I am rebasing my project on his image and entrypoint script, as his implementation is significantly better for production usage. I will do my best to keep this up to date with his changes.
$ docker run \
-v=csgo:/home/csgo/server \
--net=host \
gelmo/kz
csgo to ensure persistence of server files.27015 on the host network for optimal network performanceCSGO_GSLTYour Game Server Login Token if you want to run the server on the internet.
CSGO_WS_API_KEYYour Steam Web API Key to download workshop maps.
TIMERGOKZ will always be installed, unless TIMER is set to kztimer
MAPCHOOSERDefault: not set
If MAPCHOOSER is set to yes, the default Sourcemod mapchooser will be enabled.
CSGO_IPDefault: 0.0.0.0
The IP the server is assigned to. In most cases the default value is sufficient, but if you want to run a GOTV server or have issues connecting to the server, the actual IP of the server should be set.
CSGO_PORTDefault: 27015
The port the server is listening to.
CSGO_MAX_PLAYERSDefault: 16
The maximum players allowed to join the server.
CSGO_HOSTNAMEThe server name.
CSGO_RCON_PWDefault: none
The RCON password to administrate the server.
CSGO_PWDefault: none
The password to join the server.
CSGO_TICKRATEDefault: 128
The server game tick interval.
CSGO_CUSTOM_CONFIGS_DIRDefault: /var/csgo
Absolute path to a directory in the container containing custom config files and maps. Changing this is not recommended in order to follow the documentation.
CSGO_DEBUGPrint commands in the log.
CSGO_PARAMSAdditional parameters to pass to srcds_run.
KZ_API_KEYSet this variable to your API key for GlobalAPI, and the globalrecords.cfg file will be created for you. More information on that is available as a guide on the GOKZ forums. The KZ Server Advisor Plugin is already included in this image.
The server can be populated with your own config files and maps by copying the files from the custom configs directory located at CSGO_CUSTOM_CONFIGS_DIR to the csgo folder at each start of the container. CSGO_CUSTOM_CONFIGS_DIR is a mounted directory from the host system. The custom configs and maps directory must have the same folder structure as the csgo folder in order to add or overwrite the files at the paths.
Add configs to /home/user/csgo:
.
├── addons
│ └── sourcemod
│ └── configs
│ └── admins_simple.ini # Will be overwritten
└── cfg
└── server.cfg # Will be added
Mount /home/user/custom-configs to CSGO_CUSTOM_CONFIGS_DIR in the container:
$ docker run \
-v=csgo:/home/csgo/server \
-v=/home/user/csgo:/var/csgo \ # Mount the custom configs directory
--net=host \
gelmo/kz
Once the server has been installed, the container will check for an update at every start.
Restart the container with docker restart.
Container named csgo:
$ docker restart csgo
$ docker run \
-v=csgo:/home/csgo/server \
-v=/home/user/csgo:/var/csgo \
--net=host \
--env CSGO_GSLT=ABC123 \
--env CSGO_WS_API_KEY=123ABC \
--env CSGO_HOSTNAME="ServerName" \
--env CSGO_PW=ServerPass \
--env MAPCHOOSER=yes \
--env KZ_API_KEY=12345678-abcd-1234-abcd-1234567890ab
--name=csgo \
gelmo/kz
This readme will be updated in the future. Todo list:
Content type
Image
Digest
Size
204.3 MB
Last updated
over 6 years ago
docker pull gelmo/kz