The Two-Process Model
The Caves shard is not an option inside the Master server process. It is an entirely separate process that must run simultaneously alongside Master. Both processes communicate over the internal shard network. If either process stops, that shard disconnects from players — but the other shard continues running independently.
This means your panel must start and manage two separate server instances for a cluster with Caves. Many panel eggs handle this by running a startup script that launches both processes and monitors both PIDs.
Prerequisites
Before enabling Caves, confirm:
cluster.inihasshard_enabled = trueandenable_cave = truein[SHARD]- The
Cluster_1/Caves/directory exists with its ownserver.ini,leveldataoverride.lua, andmodoverrides.lua - Both shards are configured to communicate on the same ports
cluster.ini Changes
Add or update the [SHARD] section:
[SHARD]
shard_enabled = true
is_master = true
enable_cave = true
Master Shard server.ini
Located at Cluster_1/Master/server.ini:
[NETWORK]
server_port = 10999
[SHARD]
is_master = true
shard_name = Master
[STEAM]
master_server_port = 27018
authentication_port = 8768
Caves Shard server.ini
Located at Cluster_1/Caves/server.ini:
[NETWORK]
server_port = 10998
[SHARD]
is_master = false
master_ip = 127.0.0.1
master_port = 10999
shard_name = Caves
[STEAM]
master_server_port = 27019
authentication_port = 8769
The Caves shard connects back to Master using master_ip = 127.0.0.1 and master_port = 10999. Both shards must use different server_port values and different Steam ports.
Startup Commands
You must start both processes. The order matters — Master should start first:
Master shard:
./bin/dontstarve_dedicated_server_nullrenderer \
-cluster Cluster_1 \
-shard Master \
-persistent_storage_root /home/container
Caves shard:
./bin/dontstarve_dedicated_server_nullrenderer \
-cluster Cluster_1 \
-shard Caves \
-persistent_storage_root /home/container
If your panel runs a single startup command, use a shell script that launches both and waits on both PIDs:
#!/bin/bash
./bin/dontstarve_dedicated_server_nullrenderer -cluster Cluster_1 -shard Master &
./bin/dontstarve_dedicated_server_nullrenderer -cluster Cluster_1 -shard Caves &
wait
Caves leveldataoverride.lua
The Caves shard uses its own world generation file. A minimal example to generate standard caves:
return {
override_enabled = true,
preset = "DST_CAVE",
}
Leave the file empty or omit it to use default caves generation.
Resource Impact
Running Caves adds significant overhead:
- RAM: An additional 300–400 MB on top of the Master shard's usage
- CPU: Approximately 15–20% additional CPU load
- Recommended player limit: Drop from 32 to 16–24 when Caves is enabled
Mod Configuration for Caves
Mods must be enabled in both shards' modoverrides.lua files. The Caves/modoverrides.lua is independent of Master/modoverrides.lua. A mod enabled only in Master will not run in Caves and vice versa.
When a Shard Crashes
If the Caves shard crashes, players in the overworld remain connected but cannot enter the caves. If Master crashes, the entire session ends. The surviving process will log reconnection attempts periodically. Restart the crashed shard to restore full functionality — you do not need to restart the healthy shard.
