Menu
 

Don't Starve Together Caves Server Setup: Cluster, Shards & Ports

Don't Starve Together Caves Server Setup: Cluster, Shards & Ports

If the Forest world starts but a player cannot enter Caves, the problem is usually the server layout rather than the save. Don't Starve Together runs the surface and Caves as two shards that share one cluster. Both processes, their ports and their configuration files have to agree.

What a working cluster contains

PathPurpose
cluster.iniCluster name, password, player limit and sharding switch.
cluster_token.txtKlei-issued token that authenticates the cluster.
Master/server.iniThe Forest (Master) shard and its game port.
Caves/server.iniThe Caves shard and its different game port.
Caves/worldgenoverride.luaWorld-generation preset; use DST_CAVE for Caves.

On Linux the default data root is ~/.klei/DoNotStarveTogether/. On Windows it is under Documents\Klei\DoNotStarveTogether\. The cluster name in the launch command must match the directory name exactly.

Install or update the dedicated server

Klei's dedicated-server instructions use SteamCMD app 343050. Update the server while it is stopped, then validate before bringing either shard back:

steamcmd +force_install_dir "$HOME/dst-server" \
  +login anonymous +app_update 343050 validate +quit

cd "$HOME/dst-server/bin"
./dontstarve_dedicated_server_nullrenderer -console \
  -cluster Cluster_1 -shard Master
./dontstarve_dedicated_server_nullrenderer -console \
  -cluster Cluster_1 -shard Caves

Run the two commands as separate processes (a service manager, tmux or screen is fine). If the binary is under bin64 on your build, use that directory; the important part is that both processes use the same cluster.

Enable sharding without colliding ports

In cluster.ini, set shard_enabled = true. In the Master shard use is_master = true; in Caves use is_master = false, the same master_ip and the same cluster_key. A simple local layout is:

Shardserver_portRole
Master10999 UDPForest / cluster master
Caves11000 UDPCaves / slave shard

The exact numbers are not sacred; uniqueness is. Do not give Master and Caves the same server_port, master_port, Steam authentication port or Steam master-server port on one machine. Forward the configured public game ports and allow them through the host firewall. A Caves shard with the same port as Master normally fails to bind or never becomes joinable.

Make the Caves world a Caves world

Create or verify Caves/worldgenoverride.lua:

return {
    override_enabled = true,
    preset = "DST_CAVE",
}

If the Caves process starts with a surface preset, it may look healthy in the log while generating the wrong level. Let the world finish generating, then test a migration portal with one client before inviting the whole group.

Token, mods and update-day checks

  • Token: generate a fresh Klei cluster token when the log reports an expired or invalid token, and replace cluster_token.txt in the cluster directory (not just the server install directory).
  • Mods: server-side entries belong in the cluster's dedicated_server_mods_setup.lua; keep the same mod set available to clients and update during a maintenance window.
  • Updates: stop both shards, back up the whole cluster folder, run SteamCMD validation, then start Master and Caves together. Never update one shard while the other keeps running an older build.

Fast diagnosis

SymptomCheck first
Master is visible, Caves is missingCaves process, Caves/server.ini, and a unique Caves port.
Both processes exit immediatelyToken path, cluster name, file permissions and SteamCMD validation.
Player enters portal and is disconnectedShard-to-master IP/key, Caves world preset and firewall rules.
Server appears with an unknown or unreachable pingForward the public UDP game ports; do not reuse master_port as a game port.

Sources

Want the cluster, shards, backups and updates handled for you? Reserve a Don't Starve Together server plan; the hosting page explains the current launch status and takes no payment before the door opens.

Planning a Don't Starve Together server?

We are taking reservations. Pick a plan size and lock its price for your first year; no payment is taken before the door opens.

Reserve your Don't Starve Together Server →
Top