For simplicity of the docker-compose
commands listed below, make sure you'll be running them from within the installation folder:
cd ~/dst-dedicated-server
The developers are constantly updating the game, which is really good. However if your game client version mismatch the server's, you won't be able to see your server listed in Browse servers.
To updated the game client, simply stop and start the server again. On every startup the containers updates the game version automatically. Bear in mind this might take a minute or two.
From your installation folder, run docker-compose
in detached mode to start the server
docker-compose up -d
☝️ You can follow logs when running in detached mode:
docker-compose logs -f
It's possible to execute game console commands from the terminal by attaching to the Master shard:
docker attach dst_master
⚠️ Caution! Every input will be forwarded to the container when attached. That means if you hitCTRL-c
the container will receiveSIGINT
and will gracefully stop.
☝️ It's only possible to attach to the Master shard (
dst_master
container) as it's the one who manages the slave (Caves shard,dst_caves
). i.e. Runningc_shutdown()
on the Master shard will shutdown all shards, while running it on Caves would shutdown the Caves shard only.
Once attached, you may run any commands to manage the game such as c_save()
, c_spanw()
, c_regenerateworld()
, etc.
❗ To detach from the container, press the CTRL-p CTRL-q
sequence. Hitting CTRL-c
will stop the running container. Check attach docs for more info.
To save the game right before shutdown, attach to the container and execute c_shutdown()
:
docker attach dst_master
c_shutdown()
The Master shard will manage to save the game and send a shutdown signal to the Caves shard as well.
If you simply want to shutdown the containers without saving the game:
docker-compose down
🛑 Caution! Stopping the containers DOES NOT SAVE THE GAME, it simply gracefully shutdown the server processes and kills the containers.