Sign inSign up

marcsbrooks/docker-miscreated-server

By marcsbrooks

•Updated about 3 years ago

Run a Steam powered Miscreated game server in Docker (DEPRECATED)

Image
Integration & delivery
0

470

marcsbrooks/docker-miscreated-server repository overview

⁠DEPRECATED

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.

⁠Starting the container

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
⁠Accessing the container
$ docker exec -it <container-id> /bin/bash

⁠Game server defaults

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.

⁠Miscreated (Patch 1.18.x, >= v1.0.1.1126)

Due to recent changes⁠ in the network stack the following items must be addressed prior to starting the server:

  1. You must provide the external IP address during runtime using -sv_bind <ip-address> or the server will fail to initialize.
  2. You can no longer override +sv_servername in your hosting.cfg file since this will always use the runtime defined value.
  3. If you are using Steam UGC content you must omit -sv_bind <ip-address> from runtime options.

⁠Managing the game server

The following command can be executed within the Docker container:

$ service game-server {start|stop|restart}

⁠Overriding game sources

In cases where you have an existing game set-up (e.g. configuration, database, workshops) follow the steps below:

⁠Copy the files to the container
$ 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
⁠Update the file permissions
$ 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
⁠Restart the game server
$ docker -it <container-id> /usr/sbin/service game-server restart

⁠Restart requirements

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
⁠Using a cronjob
$ 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.

⁠Networking workarounds

The most likely culprit to the "I cannot find my server.." issue is one of the following:

  1. 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.
  2. 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.

⁠Adding an IP alias (spoofing your external IP address⁠)
$ sudo ip a add <ip-address>/24 dev <interface-name>
$ sudo sh -c "echo '<ip-address> localhost' >> /etc/hosts"

⁠Additional information

⁠License and Warranty

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.

⁠Author

Marc S. Brooks⁠

Tag summary

Content type

Image

Digest

sha256:984956ee1…

Size

4.6 GB

Last updated

about 3 years ago

docker pull marcsbrooks/docker-miscreated-server