Don't Starve Together dedicated server guide for all platforms (Linux, Mac, Windows) with Docker. Extensive documentation covering mods installation, server config and performance, world generation and setting up admins.
For simplicity of the
docker-compose commands listed below, make sure you’ll be running them from within the installation folder:
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 hit
CTRL-cthe container will receive
SIGINTand will gracefully stop.
It’s only possible to attach to the Master shard (
dst_mastercontainer) as it’s the one who manages the slave (Caves shard,
dst_caves). i.e. Running
c_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
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
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:
Caution! Stopping the containers DOES NOT SAVE THE GAME, it simply gracefully shutdown the server processes and kills the containers.