Run a Steam powered Miscreated game server in Docker (DEPRECATED)
470
Due to latest changes in docker-steamcmd-wine you now can configure the game options using a Docker mount rendering the need for game embedded Docker image.
The documentation below has been updated to reflect this.
Once you have successfully pulled the repository run:
$ docker run -d --network host marcsbrooks/docker-steamcmd-wine:latest --mount type=bind,src=path/to/mount/file,dst=/var/run/docker-env
$ docker exec -it <container-id> /bin/bash
The container comes with a vanilla installation of Miscreated Dedicated Server which is configured to support up to 10 players and broadcasts the server name "Miscreated". The server binds TCP/UDP ports 64090-64094 which needs to be opened in your router (NAT) to ensure traffic between remote clients and the local server is routed correctly. Furthermore, it also exposes the RCON (remote control system) which is NOT password protected and should either be disabled by removing the +http_startserver runtime option or restricted by setting http_password in your hosting.cfg file.
Due to recent changes in the network stack the following items must be addressed prior to starting the server:
-sv_bind <ip-address> or the server will fail to initialize.+sv_servername in your hosting.cfg file since this will always use the runtime defined value.-sv_bind <ip-address> from runtime options.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) follow the steps below:
$ docker cp hosting.cfg <container-id>:/usr/games/Steam/steamapps/common/MiscreatedServer/hosting.cfg
$ docker cp miscreated.db <container-id>:/usr/games/Steam/steamapps/common/MiscreatedServer/miscreated.db
$ docker -it <container-id> /bin/chown games:games /usr/games/Steam/steamapps/common/MiscreatedServer/*
$ docker -it <container-id> /bin/chmod 666 /usr/games/Steam/steamapps/common/MiscreatedServer/miscreated.db
$ docker -it <container-id> /usr/sbin/service game-server restart
Since the performance of the game engine degrades significantly as time goes by, the game server forces a restart every 24 hours. However, due to a bug in the game engine this results with the server shutting down permanently. In order to mitigate this, in the host OS, you can set-up a scheduled task (e.g. cronjob, Task Scheduler) that runs the following command:
$ docker exec -it <container-id> /usr/sbin/service game-server restart
$ echo "0 0 * * * /path/to/docker exec -it <container-id> /usr/sbin/service game-server restart > /dev/null" > /var/spool/cron/root
In the case above, to ensure both the host OS (which uses local time) and game server are synchronized, you will need to define schedule_shutdown_utc=0.0 in your hosting.cfg or +schedule_shutdown_utc 0.0 overriding the game server defaults. Failure to do this will result in the server shutting down until the next scheduled restart.
The most likely culprit to the "I cannot find my server.." issue is one of the following:
(*) 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 sh -c "echo '<ip-address> localhost' >> /etc/hosts"
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-miscreated-server is provided under the terms of the MIT license
Miscreated is a registered trademark of Entrada Interactive.
Content type
Image
Digest
sha256:984956ee1…
Size
4.6 GB
Last updated
about 3 years ago
docker pull marcsbrooks/docker-miscreated-server